JSON Extractor Agent

The JSON Extractor agent extracts specific values from a nested JSON object (or any agent output) and flattens them into named variables for use by downstream agents. It is a deterministic agent -- no LLM is involved.

Use Cases

  • An upstream agent returns complex nested JSON and you need specific fields for downstream processing.
  • You need to flatten a deeply nested API response into a simple, flat structure.
  • You want to expose extracted fields as template variables in a Fixed Response.
  • You want to supply structured data to a Categorizer's qualification criteria.

Inputs

InputTypeRequiredDescription
input_jsonAnyYesThe nested data to extract from. Shown in the builder as JSON. Accepts output from any upstream agent -- JSON objects, lists, Text with Sources, extraction results, and more.

Outputs

OutputTypeDescription
output_jsonStructA flat key-value object containing the extracted fields. Shown in the builder as Variables. Each extracted field is available as a template variable (e.g., {{variable_name}}) in downstream agents.

Configurations

ParameterDescriptionDefault
Add sample inputA sample JSON value used to validate the input shape and populate the JSON Path picker with the list of available fields. You can upload a .json file or paste JSON directly.Required
JSON Extractor ConfigurationThe list of mapping rules. Each rule defines one output variable. See Configuring Mapping Rules below.Required

Configuring Mapping Rules

Click Create JSON Mapping to add a rule. Each rule has five fields:

  • Variable name -- the output key. Must start with a letter or underscore and contain only letters, numbers, and underscores (camelCase recommended). Cannot be changed once saved.
  • Data type -- the expected type of the extracted value. Supported types: String, Number, Boolean, Datetime. Cannot be changed once saved.
  • Required -- Mandatory or Optional. A Mandatory field with no matching value and no default raises an error at runtime; an Optional field is skipped or falls back to its default.
  • JSON Path -- the path into the sample input to extract the value from. The builder shows a dropdown of valid paths derived from your sample JSON, filtered by the selected data type. You pick a path from the list rather than typing it.
  • Default value -- optional fallback returned when the path is not found at runtime. Typed according to the selected data type.

How to Use This Agent

Extract fields from an API response before sending an email:

trigger -> intelligent_actions("Look up customer order") -> json_extractor -> fixed_response("Order {{orderId}} for {{customerName}}") -> send_email
  • Extract Entities -- for extracting structured data from unstructured text (uses an LLM).
  • Convert to Text -- for converting JSON to a text representation.

Last updated: Jul 3, 2026