Overview
This node implements a human approval gate with decision routing, designed to integrate manual approval steps into an automated workflow. It sends data to an external review system where approvers can approve, decline, or request changes. Based on the approval decision, the workflow branches accordingly.
Common scenarios include:
- Requiring managerial approval before proceeding with sensitive operations.
- Implementing compliance checks that need human validation.
- Routing workflows dynamically based on user feedback or quality control.
For example, a marketing automation workflow might pause to get approval on an email campaign draft. If approved, it proceeds to send emails; if declined, it stops or triggers a notification; if changes are requested, it routes back for edits.
Properties
| Name | Meaning |
|---|---|
| Function Name | Name shown to approvers (defaults to the node's name). |
| Description | Description of what this approval step does (e.g., "Send welcome email to new customers"). |
| Polling Interval (Seconds) | How often (in seconds) the node checks the external system for an approval decision (1–300). |
| Timeout (Minutes) | Maximum time to wait for approval before timing out; 0 means unlimited wait. |
| LLM Explanation | Optional AI-generated explanation describing why this approval is needed. |
Output
The node outputs three separate branches corresponding to the approval decision:
Approved: Items approved by the reviewer. Each output item includes the original input data plus a
_velatirobject containing:reviewTaskId: The unique ID of the approval task.state:"approved".requestedChange(optional): Any change requests noted.
Declined: Items rejected by the reviewer, with similar metadata but
stateset to"declined".Change Requested: Items for which the reviewer requested changes, with
stateset to"change_requested"and any requested change details.
If an unexpected state or error occurs, the item is routed to the Declined output with an error message included in the JSON.
No binary data output is produced by this node.
Dependencies
- Requires connection to an external approval API service via an API key credential.
- The node makes HTTP POST requests to create review tasks and GET requests to poll their status.
- Requires proper configuration of the API domain and authentication token in n8n credentials.
- The polling interval and timeout settings control how frequently and how long the node waits for approval.
Troubleshooting
- Timeout Errors: If the approval is not completed within the specified timeout, the node throws an error indicating a timeout. Increase the timeout or check if approvers are responding timely.
- Invalid API Response: If the external API returns an unexpected response or missing review task ID, the node will error. Verify API credentials and endpoint availability.
- Unexpected Approval State: If the API returns an unknown state, the node routes the item to Declined with an error message. Check the external system's state values.
- Network Issues: HTTP request failures may cause errors. Ensure network connectivity and valid API keys.
- Continue On Fail: If enabled, the node continues processing other items even if some fail, outputting errors in the Declined branch.
Links and References
- n8n Documentation on Creating Custom Nodes
- External approval system API documentation (not provided here; refer to your API provider)
- General concepts of human-in-the-loop workflows and approval gates