> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cassidyai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Use structured output fields

> Define specific data fields and types so your Workflow actions produce consistently formatted, machine-readable results.

Structured output fields let you define the exact data format you want an action to produce. Instead of receiving freeform text that you need to parse, the AI fills in specific fields with the correct data types -- making outputs consistent, reliable, and easy to reference in later steps.

<Info>Structured output fields are available on these actions: **Generate Text**, **Generate Text with Agent**, **Run Code**, and **Research Agent**.</Info>

## Set up structured output fields

<Steps>
  <Step title="Open the action settings">
    In the [Workflow editor](/workflows/building), click the action you want to configure. The settings sidebar opens.

    <Frame>
      <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-action-settings.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=ba26463675ba9a8432ebb896d4ce0086" alt="Action settings sidebar showing the Structured Output Fields section" width="2848" height="2156" data-path="images/workflows/structured-output-action-settings.png" />
    </Frame>
  </Step>

  <Step title="Add fields">
    Under **Structured Output Fields**, you have two options:

    * **Add Fields Automatically** -- Cassidy analyzes your prompt and generates a suggested set of fields.
    * **+ Add Field** -- manually create each field yourself.

    <Frame>
      <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-add-fields.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=7dd2eb326902e9810731d911f77a4cb3" alt="Add Fields Automatically and Add Field buttons in the Structured Output Fields section" width="902" height="502" data-path="images/workflows/structured-output-add-fields.png" />
    </Frame>
  </Step>

  <Step title="Configure each field">
    For each field, specify:

    * **Field Name** -- a descriptive label (e.g., "Full Name", "Location", "Score").
    * **Type** -- the data type for this field (see the table below).
    * **Description** -- help the AI understand what value to fill in (e.g., "The person's complete full name as listed on LinkedIn").

    <Frame>
      <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-edit-field.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=d03cdcd9f4a66452030a008df65596c4" alt="Edit Field dialog showing Field Name, Type, Description, Required toggle, and Allow Multiple Values toggle" width="742" height="808" data-path="images/workflows/structured-output-edit-field.png" />
    </Frame>
  </Step>

  <Step title="Set field options">
    Customize each field further:

    * **Required** -- toggle on if this field must always be populated.
    * **Allow Multiple Values (List)** -- toggle on if the AI should return more than one value (e.g., a list of skills or multiple work experiences).

    <Frame>
      <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-field-options.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=15e8ce31a9a9b10ce5ab146a5c126ff5" alt="Field configuration showing Required and Allow Multiple Values (List) toggles" width="842" height="188" data-path="images/workflows/structured-output-field-options.png" />
    </Frame>
  </Step>

  <Step title="Reference the output in later steps">
    In subsequent actions, [insert a variable](/workflows/building#reference-variables-between-steps) and you will see each structured field as an individual variable you can reference by name.

    <Frame>
      <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-variable-reference.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=f21ae8253735d9dc0257a482e49c2645" alt="Variable selector dropdown showing individual structured output fields from a previous action" width="1254" height="898" data-path="images/workflows/structured-output-variable-reference.png" />
    </Frame>
  </Step>
</Steps>

## Available field types

| Type         | Description                                      | Example                                                                             |
| ------------ | ------------------------------------------------ | ----------------------------------------------------------------------------------- |
| **Text**     | A single text value                              | `"Jane Smith"`                                                                      |
| **Number**   | A numerical value                                | `42`                                                                                |
| **Yes/No**   | A true/false toggle                              | `true`                                                                              |
| **Dropdown** | A single value from a list of options you define | `"CA"` from a list of state codes                                                   |
| **Object**   | A collection of sub-fields with their own types  | A work experience with Company Name (Text), Job Title (Text), and Duration (Number) |

When using the **Object** type, you add sub-fields within the object by repeating the same field configuration process. Objects can be combined with **Allow Multiple Values** to create lists of structured records.

## Example: parse a LinkedIn profile

To illustrate, here is how you might extract structured data from a scraped LinkedIn profile:

1. **Full Name** -- Type: Text, Description: "The person's complete name"
2. **Location** -- Type: Dropdown, Options: `CA`, `NY`, `TX`, `FL` (state codes), Description: "The US state where the person is located"
3. **Past Experiences** -- Type: Object, Allow Multiple Values: on
   * **Company Name** -- Type: Text
   * **Job Title** -- Type: Text
   * **Duration in Years** -- Type: Number

<Frame>
  <img src="https://mintcdn.com/cassidy/fKT2RiTD5Kge6TLJ/images/workflows/structured-output-completed-example.png?fit=max&auto=format&n=fKT2RiTD5Kge6TLJ&q=85&s=71b3dbddbfa6e248026438c990211da4" alt="Completed structured output configuration for the LinkedIn profile parsing example with Full Name, Location, and Past Experiences fields" width="992" height="824" data-path="images/workflows/structured-output-completed-example.png" />
</Frame>

The action produces a clean, structured result where each field is individually referenceable in downstream steps.

## Next steps

<CardGroup cols={2}>
  <Card title="Reference variables" icon="hashtag" href="/workflows/building#reference-variables-between-steps">
    Learn how to pass structured output data between Workflow steps.
  </Card>

  <Card title="Run Workflows in bulk" icon="table" href="/workflows/bulk-runs">
    Apply structured outputs across an entire dataset.
  </Card>
</CardGroup>
