Skip to content

JSON (String) to Data

JSON (String) to Data takes a text written in JSON format, like the ones many APIs return or the one an AI model produces when you ask for a structured answer, and turns it into records. From there, other components can read each field by name, filter it or store it.

If the text has small formatting mistakes, such as an extra comma or an unclosed quote, the component tries to fix them before converting it.

When to use it

  • An agent answers with JSON and you want to use its fields in the next steps.
  • You receive JSON text in a webhook or an email and need to handle it as data.
  • You want to type some test data by hand while building a flow.

Configuration

FieldWhat it does
JSON StringThe JSON text you want to convert. It can be an object ({...}) or a list of objects ([{...}, {...}]). You can type it or connect it from another component.

Output

The Data output returns:

  • One record, if the text is an object.
  • A list of records, one per item, if the text is a list of objects.
  • If the text is a plain value (a number, a word) or a list of plain values, each value goes into a record under the text field.

If the field is empty or the text cannot be read, the component stops with an error.

Example

An agent classifies customer emails and answers like this: {"category": "billing", "urgency": "high", "customer": "Ruiz Garages"}.

  1. Connect the agent’s answer to JSON String.
  2. Connect Data to Filter Data Values to keep the high urgency emails and send them to the right team.