Return Response
Send data back from a function to the calling flow.
Return Response
The Return Response block is specifically designed for use within Functions. It determines what data is sent back to the flow that called the function and signals whether the execution was successful or resulted in an error.
Core Concept
If a function is a specialized worker you've hired, the Return Response is the report they hand back to you when they've finished their task. This report includes the result of their work and a status indicating if they succeeded.
Configuration
| Field | Required | Description |
|---|---|---|
| Response Status | — | Choose between success or error. This determines which path the Execute Function block will take in the main flow. |
| Response Body | ✅ | The data you want to return to the calling flow. This can be a single value, a variable, or a JSON object. |
The data provided in the Response Body will be stored in the Response Variable defined in the Execute Function block that called this function.
Error Handling
BODY_MISSING— Triggered when no Response Body is provided in the configuration.
(Note: This error does not populate an Output Variable. It terminates the flow via the error edge.)
Example
Returning a user profile after a lookup:
- In your Function flow, add a Return Response block.
- Set the Response Status to
success. - Set the Response Body to the variable
{user_profile}which was populated by a previous database block. - In your main flow, the Execute Function block will now follow the Success path, and the variable you specified (e.g.,
fnResult) will contain the user profile data.
