Extract Data
Extract structured data from unstructured text using AI.
Extract Data
The Extract Data node uses AI to extract structured information from unstructured text. Define the fields you want to extract, and the AI will parse the input and return a structured object or array.
Overview
Use the Extract Data node when you need to:
- Parse emails, documents, or messages for specific information
- Convert unstructured text into structured data
- Extract multiple data points from a single input
- Build data pipelines that process text content
Configuration
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The AI model to use for extraction. |
fields | array | Yes | List of fields to extract from the input. |
isList | boolean | No | When enabled, extracts multiple items as an array. Default: false. |
Field Configuration
Each field in the fields array has the following properties:
| Property | Type | Required | Description |
|---|---|---|---|
name | string | Yes | The field name (must be a valid identifier: start with letter/underscore, alphanumeric only). |
type | string | Yes | The data type: "text", "number", or "boolean". |
description | string | Yes | Description of what to extract. Be specific for better accuracy. |
Loop Mode
When isList is disabled, the Extract Data node supports Loop Mode:
| Field | Type | Default | Description |
|---|---|---|---|
loopMode | boolean | false | Enable to process each item in an array input separately. |
maxIterations | number | 100 | Maximum number of iterations when loop mode is enabled. |
concurrency | number | 1 | Number of parallel executions. |
onError | string | "stop" | Error handling: "stop" or "continue". |
Note: Loop Mode is automatically disabled when isList is enabled, as the node already handles multiple extractions.
Inputs
The Extract Data node accepts inputs from connected upstream nodes. All connected inputs are automatically concatenated and processed together.
Output
Single Object Mode (isList: false)
| Variable | Type | Description |
|---|---|---|
result | object | An object containing the extracted fields. |
Access individual fields using dot notation: result.fieldName
List Mode (isList: true)
| Variable | Type | Description |
|---|---|---|
result | array | An array of objects, each containing the extracted fields. |
Example Use Cases
Contact Information Extraction
Fields:
| Name | Type | Description |
|---|---|---|
name | text | The person's full name |
email | text | Email address |
phone | text | Phone number |
company | text | Company or organization name |
Input:
Hi, I'm John Smith from Acme Corp. You can reach me at john.smith@acme.com or call 555-123-4567.Output:
{
"name": "John Smith",
"email": "john.smith@acme.com",
"phone": "555-123-4567",
"company": "Acme Corp"
}Order Details Extraction (List Mode)
Fields:
| Name | Type | Description |
|---|---|---|
product | text | Product name |
quantity | number | Number of items ordered |
price | number | Price per unit |
Input:
Order contains: 2x Widget Pro ($29.99 each), 5x Basic Widget ($9.99 each), 1x Premium Widget ($49.99)Output:
[
{ "product": "Widget Pro", "quantity": 2, "price": 29.99 },
{ "product": "Basic Widget", "quantity": 5, "price": 9.99 },
{ "product": "Premium Widget", "quantity": 1, "price": 49.99 }
]Sentiment Analysis Fields
Fields:
| Name | Type | Description |
|---|---|---|
sentiment | text | Overall sentiment: positive, negative, or neutral |
confidence | number | Confidence score from 0 to 100 |
keyPhrases | text | Main topics or phrases mentioned |
Best Practices
-
Write clear field descriptions: The AI uses descriptions to understand what to extract. Be specific about format and content.
-
Use appropriate data types: Choose
numberfor numeric values,booleanfor yes/no fields, andtextfor everything else. -
Valid field names: Field names must start with a letter or underscore and contain only alphanumeric characters (e.g.,
customerName,order_id). -
Use List Mode for multiple items: When extracting multiple similar items (like order line items), enable
isListinstead of creating separate fields. -
Test edge cases: Verify extraction works with variations in input format and missing data.