Skip to main content
Structured outputs allow you to define specific data fields that should be extracted during workflow execution. These are the structured outputs that get returned during production workflow execution in the webhook.

Defining the structured outputs schema

In the workflow editor, go to Settings > Structured Outputs. A Structured Outputs tab will appear in the editor, and you’ll be able to add structured outputs manually, import definitions from a Zod/Pydantic schema, or import definitions from another workflow.

Building and testing structured outputs in the Editor

Once you set the structured output schema, you should automatically see the data/structured_output_schema.json file update with your new schema during editor sessions. The editor agent can read this file and write code to set the structured output according to this schema using the set_structured_output browser tool function. With the example prompt “set structured output field ‘result’ to APPROVED”, the agent might generate the following code:
structured_outputs.py
import asyncio
from servers.browser_tools import set_structured_output

async def main():
    result = await set_structured_output(key="result", value="APPROVED")
    print(result)

asyncio.run(main())
As you test the production workflow in the editor, you will see the structured output values appear in data/structured_outputs.json.

Receiving structured outputs in production flows

Structured outputs are returned during production workflow execution in the webhook.

Use cases

Structured outputs are ideal for:
  • Data extraction: Format specific values from web pages (prices, statuses, IDs, etc.).
  • Status checks: Get clear pass/fail results from form filling workflows.
  • Conforming to internal enums: Map workflows’ statuses to internal enums your codebase already uses.