Dify - Workflow Output Node Configuration

Site: dify|https://dify.ai/

Get plain text:

curl -H "Accept: text/plain" https://jugoya.ai/guides/dify/output-node

Overview

Guide for configuring Output nodes in Dify workflows to properly reference LLM output variables.

Adding Output Variable

  1. Click the Output node in the workflow canvas
  2. In the settings panel, find "output variable *" section
  3. Click the "+" icon to add a new variable
  4. Two fields appear:
    • Variable name: Input field for the output variable name
    • Set variable: Clickable area to select source variable

Selecting LLM Output

  1. Click on the "Set variable" area (NOT the trash icon on the right)
  2. A "Search variable" textbox appears with autocomplete dropdown
  3. The dropdown shows available variables grouped by node:
    • LLM: text, reasoning_content, usage
    • User Input: files
    • SYSTEM: sys.user_id, sys.app_id, etc.
  4. Click "LLM" to expand, then click "text" to select

Variable Reference Format

After selection, the Output node shows the variable reference:

  • Display format: LLM / text String
  • This connects the LLM node's text output to the workflow's API response

Common Mistakes

  • Clicking the trash icon instead of "Set variable" area
  • Not clicking the "+" button first to add variable form
  • Using wrong variable syntax in LLM node (use {{query}} not {{#sys.query#}})

Test Before Publishing

  1. Click "Test Run" to verify workflow execution
  2. Check that all nodes complete successfully:
    • User Input → LLM → Output
  3. Verify output contains LLM response text