Skip to content

Parse Data

Parse Data turns records with fields (for example, a customer’s or an order’s details) into text. You write a template with the field names in braces and the component fills it in with the values of each record.

It’s the simplest way to prepare information for an AI model, an email or a message.

When to use it

  • Turn a list of orders into text an agent can read and summarize.
  • Prepare an email body with each customer’s name, product and amount.
  • Turn search results into text before showing them in a chat.
  • Create new records with a single formatted text field plus some of the original fields.

Configuration

FieldWhat it does
Data (required)The records you want to turn into text. Connect it from the previous component.
TemplateThe template. Write any text you like and put the fields in braces: {name}. For fields nested inside others, use dots: {customer.address.city}. The default is {text}.

Advanced options

FieldWhat it does
SeparatorWhat goes between one record and the next in the Text output. The default is a line break.
Result KeyName of the field that holds the text in the Processed Data output. The default is text.
Metadata keysFields from the original record you want to keep in Processed Data, separated by commas. Nested fields such as customer.email work; in the result they are stored under the last part of the name (email).

Output

The component has two outputs. When you connect one, the other is hidden:

  • Text: a single text with every record written according to the template, one after another.
  • Processed Data: one record per input record, with the text in the Result Key field and the fields listed in Metadata keys.

Example

A store wants an agent to write the daily sales summary. It connects the list of orders to Parse Data with this template:

Order {number}: {customer.name} bought {product} for {amount} €

The Text output has one line per order and goes to the agent, which writes the summary.

Good practices

  • Check that the names in braces match your records’ fields exactly.
  • Use Processed Data if you will go through the records one by one later; use Text if you will send everything together to a model or a message.