Extract Data
Extract Data goes through one or more records and keeps only the fields you name. This reduces the information that reaches the next steps: an agent gets only what it needs, a spreadsheet only the columns you care about.
It also accepts messages, for example an agent’s reply, and works with their data in the same way.
When to use it
- An API returns dozens of fields per product and you only want the name, description and category.
- You are going to save customers in a spreadsheet and want to choose which columns are written.
- You want to keep every field that starts the same way, for example all the
address_...fields.
Configuration
| Field | What it does |
|---|---|
| Data | The record, list of records or message you want to extract fields from. |
| Extract keys | List of fields to keep, one per line. End a name with * to include every field that starts that way: address_* keeps address_street, address_city, and so on. |
Output
The Extracted Data output returns a list with one record for each input record, holding only the chosen fields, whether they hold text, numbers, yes/no values or lists. If a chosen field itself contains several fields, those move to the top level of the result.
Example
An online shop gets its full catalogue and wants to send it to an agent that answers product questions.
- Connect the product list to Data.
- In Extract keys, type
name,descriptionandcategory. - Connect Extracted Data to the agent, or to Parse Data to turn it into text.
Related components
- Extract Key: takes a single field.
- Filter Data Keys: includes or excludes fields, also inside nested fields.
- Entities extraction: finds values inside a text with the help of AI.