Skip to content

Data to JSON

Data to JSON takes the data coming from an earlier step in your flow and hands it over in JSON format, the most common way applications exchange information: a list of fields, each with a name and a value.

Use it when the next step, for example an external service or a database, expects the information as JSON rather than in NappAI’s own data format.

When to use it

  • Send a customer’s details to your CRM’s API, which only accepts JSON.
  • Prepare the body of a request before an API Request component.
  • Store the result of a flow in a system that keeps its records as JSON.
  • Gather several records that arrive separately into a single list.

Configuration

FieldWhat it does
Data (required)The data you want to convert. You can connect one or several records.

Output

The JSON output returns:

  • A single JSON object when one record comes in.
  • A list of JSON objects when several come in.

Along the way, values that are text containing only a number (for example "42") come out as numbers, and the texts true and false come out as yes/no values. The receiving service doesn’t have to interpret them. Texts that carry an identifier rather than a quantity, such as "08001", "+34600123456" or "3.10", stay as text so no digit is lost.

You can connect the output to any component that accepts JSON, such as API Request.

Example

A web form reaches your flow with a lead’s name, email and age. You connect that data to Data to JSON and its output to API Request, which creates the contact in your CRM. The CRM receives the age as a number, not as text.