Skip to main content
AI responses are easiest to automate when the model returns a small, schema-defined object instead of prose.

Design the schema around decisions

Start from what later actions need. For an intake workflow, that might be:
Use enums for values that control a branch. Use nullable fields when the source may legitimately omit a value. Avoid collecting fields no downstream action uses.

Configure Chat

  1. Add OpenAI Chat.
  2. Connect the source text to Prompt.
  3. Add images or PDFs under Files when the model must inspect them.
  4. Turn on Structured Output.
  5. Paste the JSON schema.
  6. Expose the detected properties you need as outputs.
Enabling Structured Output replaces the normal text Response with Structured Response. Review existing connections when changing this setting.

Route and validate

Connect enum outputs to conditions or case selection. Connect extracted text only to actions that accept missing or nullable values when the schema permits them. For high-impact work, add deterministic validation after the model:
  • check that an email address is valid,
  • confirm a number is in the allowed range,
  • require human review before sending or deleting,
  • reject categories outside the schema,
  • preserve the original source for audit and correction.

Handle failure deliberately

Enable the Chat action’s Succeeded? and Error meta outputs. Use them to send failures to a recovery branch without treating invented fallback data as real extraction.
A valid schema controls the response shape, not the truth of its contents. Treat model-produced values as untrusted whenever they can spend money, modify access, send external messages, or make irreversible changes.
Use Files and structured data for downstream object and file handling, and Troubleshoot workflow runs when a model or provider request fails.