# JSON Schema

Use **JSON Schema** when you want a workflow step to define a structured output shape that later steps can reference field by field.

## Configuration

| Option                                                             | Required | Description                                                                           |
| ------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------- |
| Name                                                               | No       | Label for the step in the workflow canvas.                                            |
| Schema Items                                                       | Yes      | Rows in **Schema Items**. Each row has a **Key** and a **Value / Description** field. |
| Add this step from the **Utilities** group in **Search steps...**. |          |                                                                                       |

In **Schema Items**, click **Add Item** to add another field. Each row lets you define the output key and describe the value that key should hold. The **Value / Description** field supports **Insert Variable**.

## Output

Click **Run** in the step header to test the step. Fetch Hive shows the generated result in **Output** after the run completes.

Use the variable picker in a later step to insert the exact output path for your run. The base reference is:

```
{{STEP_IDENTIFIER.output}}
```

If you want the full structured result, reference the base output directly:

```
{{step_2.output}}
```

If your run returns nested keys, the variable picker shows the exact fields you can insert into later steps.

## Example

Add **JSON Schema** from the **Utilities** group in **Search steps...**.

Set **Name** to something like `Article fields`.

In **Schema Items**, add keys such as `title`, `summary`, and `sentiment`.

For each item, describe what the value should contain in **Value / Description**. If a field should depend on earlier workflow data, click **Insert Variable** and add that reference.

Click **Run** and review the structured result in **Output** before using those keys in later steps.

## Notes

* The settings sheet lets you add and remove schema rows with **Add Item** and the delete action on each row.
* This step editor does not show a **When the step fails** control in its settings sheet.
* Use the variable picker after a test run if you want to confirm the exact keys available to later steps.

See also: [Creating and Editing](https://docs.fetchhive.com/workflows/creating-and-editing), [Testing and Iteration](https://docs.fetchhive.com/workflows/testing-and-iteration), and [AI Prompt](https://docs.fetchhive.com/workflows/workflow-steps/ai/ai-prompt)
