Human-in-the-Loop (HIL)
The Human-in-the-Loop node introduces approval gates into your automation workflows. When a workflow reaches an HIL step, it pauses execution and sends an approval request email. The workflow resumes only after a recipient responds with an approval or rejection. This is essential for workflows that require human judgment, compliance sign-off, or managerial authorization before proceeding.
Before You Use This Node
| What you may need | Where to set it up | Why it matters |
|---|---|---|
| Email connection (for a custom sender) | Connections | Any sender other than the built-in platform mailer requires a saved connection. |
| Recipient addresses | Global Variables | Reuse the same recipient list across approval workflows. |
| Supporting files for approval decisions | Files | Store files centrally when recipients need to review documents or reports. |
Actions
| Action | Description |
|---|---|
hil:approvalEmail | Send an approval request email and wait for a response |
hil:approvalEmail
Sends an approval request email and pauses the workflow until a recipient responds. Configuration lives under approvalEmailDetails, with button labels under approvalOptions.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
to | string | Yes | Recipient address(es) for the approval email |
subject | string | Yes | Subject line of the approval email |
body | string | Yes | Body content of the email (HTML supported). Should explain what is being approved |
sender | string | No | Which sender to use. Defaults to qinfinite (see below) |
connectionId | string | Conditional | Required when sender is any value other than qinfinite |
cc | string | No | CC recipients; resolved and passed through as ccCsv |
bcc | string | No | BCC recipients; resolved and passed through as bccCsv |
approvalOptions.approveLabel | string | No | Text on the approve button |
approvalOptions.disapprovalLabel | string | No | Text on the reject button |
The sender field
qinfinite(default) — uses the platform's built-in mail configuration (spring.mail.*). No connection is needed.- Any other value — a custom sender that requires
connectionId. IfconnectionIdis missing, the step fails withHIL_VALIDATION_ERROR.
How It Works
- The workflow reaches the HIL step and enters a waiting state.
- An approval email is sent to the configured recipients. The email contains Approve and Reject buttons (links) that call back to the Qinfinite platform.
- When a recipient clicks a button, the platform records the decision.
- The workflow resumes on the appropriate branch (approved or rejected).
The approve and reject callbacks are handled by the platform — the callback URLs are built in and embedded in the email automatically; you do not configure them.
How the Approval Email Looks
The approval email is sent either from the platform's built-in mail service (default qinfinite sender) or from the connection identified by connectionId for a custom sender. Each email contains:
- The subject you configured in the HIL step parameters.
- The body content, rendered as HTML, providing context about what is being approved.
- Two prominent buttons: Approve and Reject, labeled per
approvalOptions.approveLabelandapprovalOptions.disapprovalLabel. These are hyperlinks that point back to the platform's callback endpoint.
Connection
- With the default
qinfinitesender, the HIL node uses the platform's built-in email service and no separate connection is required. - With a custom sender, a saved email connection referenced by
connectionIdis required.
The callback URLs for approve/reject actions are generated and embedded by the platform. Ensure the platform's callback endpoint is network-accessible to recipients. If recipients are outside the corporate network, they need firewall rules or VPN access to reach the callback endpoint, or the endpoint must be exposed to the internet.
Output
The HIL result reports the approval outcome, which you can use to drive downstream logic.
Using the Decision in Next Steps
The approval outcome can drive downstream workflow logic:
- Conditional branching: Connect the HIL node's output to a Conditional node that evaluates the decision and routes the workflow accordingly (for example, proceed on approval, notify on rejection).
- Example flow: HIL node outputs a decision, followed by a Conditional node that branches on the approval result. The true branch proceeds with the approved action; the false branch sends a notification that the request was denied.