Response
This node sends a response back to the caller of a Cloud Function.
The Response node terminates the function execution and returns data.
The Response node is the exit point of a Cloud Function. When triggered, it sends a success or error response back to the client. You can return data (like a calculation result or a database record) or just a success signal.
Inputs
General
| Data | Description |
|---|---|
| Result | The data to return to the client. Can be any type (String, Number, Object). |
Actions
| Signal | Description |
|---|---|
| Success | Sends a 200 OK response with the Result data. |
| Failure | Sends an error response (usually 500 or 400) with the Result as the error message. |
Outputs
This node has no outputs as it ends the flow.
Usage
Returning Data
- Perform logic (e.g., database query).
- Connect the result to the Result input.
- Trigger Success.
Returning Error
- If logic fails (e.g., "Item not found"), connect an error message string to Result.
- Trigger Failure.
Detailed Behavior
- Termination: Once this node is triggered, the function execution stops. Any subsequent logic will not run.
- Format: The result is typically JSON-encoded.
Troubleshooting
- Timeout: If you never trigger Success or Failure, the function will eventually time out (usually 10-60 seconds).