Configure a Return Node in a Workflow

Configure a Return node to stop processing a workflow branch and return a value to the calling node.

Return nodes are typically used in reusable workflow components, such as reference blocks. Define the return value directly or use expressions to reference workflow variables and outputs from previous nodes.
  1. Go to AI Agent Studio and open the Workflows tab.
  2. Edit a workflow and add a Return node to it.
  3. Enter a name and description for the node. The code is populated automatically based on the name.
  4. Select an error handler node to define failure handling.
  5. Use expressions to specify the value the Return node must send to the calling node. For more information, see Expressions in AI Agent Studio.
  6. Publish the workflow.

When the workflow reaches the Return node, the current workflow branch ends, and the configured value is returned to the calling node. The returned value can then be used by downstream workflow nodes, applications, agents, or other workflow components.