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

# Output

> Return workflow results to the end user or API caller

Use the Output node to deliver specific variable values from your workflow to the end user or API caller. Add it where you need to surface results.

<Info>
  The Output node was previously named *End* and was required in every workflow.

  It is now optional—workflows run successfully without one, but any workflow or branch without an Output node returns no data to the caller.

  Output nodes are only available in Workflows. Chatflows use the [Answer](/en/use-dify/nodes/answer) node instead.
</Info>

## Configure Output Variables

Each Output node requires at least one output variable. To add a variable, assign a name and select the source from any upstream node's output.

<Info>
  The variable name you assign becomes the key in API responses.
</Info>

You can add multiple output variables to a single Output node and reorder them by dragging.

## Supported Variable Types

Output variables support the following types:

`string`, `number`, `integer`, `boolean`, `object`, `file`, `array[string]`, `array[number]`, `array[object]`, `array[boolean]`, `array[file]`

## Multiple Output Nodes

A workflow can contain more than one Output node. The Output node does not stop workflow execution—other parallel branches (if any) continue running after it completes.

All output variables from every executed Output node are combined into one final result. Each Output node adds its variables to the result as the workflow reaches it:

* On the **same branch**, variables are added in the order the Output nodes are placed.

* On **parallel branches**, whichever Output node executes first adds its variables first.

<Warning>
  Always use unique variable names across all Output nodes in a workflow.

  When two Output nodes use the same output variable name, the later one overwrites the earlier value.
</Warning>

## API Response Structure

When you call a workflow through the API, output variables appear in the `outputs` object of the response.

<Tabs>
  <Tab title="Blocking Mode">
    All outputs return in a single response once the workflow completes:

    ```json theme={null}
    {
      "workflow_run_id": "...",
      "status": "succeeded",
      "outputs": {
        "result_text": "The processed output...",
        "score": 95
      }
    }
    ```
  </Tab>

  <Tab title="Streaming Mode">
    Outputs arrive in the final `workflow_finished` event:

    ```json theme={null}
    {
      "event": "workflow_finished",
      "data": {
        "outputs": {
          "result_text": "The processed output...",
          "score": 95
        }
      }
    }
    ```
  </Tab>
</Tabs>

Each output variable name maps directly to a key in the `outputs` object.

## For Workflow Tools

When you [publish a workflow as a tool](/en/use-dify/workspace/tools#workflow-tool), the Output node defines the tool's return schema. Each output variable name becomes a key in the tool's result, accessible to the parent workflow that invokes the tool.
