Human In The Loop Block
The Human In The Loop (HITL) block introduces human oversight into automated workflows. It sends an approval link over a messaging or email platform, pauses the execution, and resumes down either the Approved or Rejected branch once a person decides.
Why Human In The Loop? Even the most sophisticated AI systems benefit from human judgment. HITL ensures critical decisions have human oversight while maintaining automation efficiency.
Key Features
- Pause and Resume - The execution is set to
PAUSEDat the HITL block and resumes when a reviewer submits a decision - Platform Attachment - The approval link is delivered by an attached block (Slack, Telegram, Gmail, Send Email, Twilio, or WhatsApp)
- Two-Way Branch - Fixed Approved / Rejected outputs, each with its own downstream flow
- Reviewer Response Capture - Optionally save the reviewer's written response into a workflow variable
- Editable Review Data - The approval page shows the output of every upstream block and lets the reviewer edit the values
- Context for Reviewer - Key label/value facts appended to the notification so the reviewer can act without looking anything else up
- Signed Approval Links - Each link carries an HMAC token that the approval page and resume endpoint verify
When to Use Human In The Loop
| Scenario | Description |
|---|---|
| High-Stakes Decisions | Financial approvals, legal compliance, customer escalations |
| AI Output Verification | Review AI-generated content before publishing |
| Exception Handling | Route unusual cases to humans for judgment |
| Quality Assurance | Spot-check automated processes for accuracy |
| Sensitive Operations | Actions requiring authorization (data deletion, access grants) |
| Complex Edge Cases | Situations AI cannot reliably handle |
Configuration
| Parameter | Type | Required | Description |
|---|---|---|---|
| Prompt Message | Textarea | No | Shown to the reviewer at the top of the approval page, alongside the approval link |
| Save review to variable | Variable | No | When set, the approval form shows a Your Review text field and writes its value into this variable on resume |
| Context for Reviewer | Label/Value pairs | No | Key facts appended to the outgoing notification. Values support {{variable}} templates |
The Platform attachment is required. The HITL block has a single Platform attachment slot. If nothing is attached, the block fails with Platform attachment is required for Human In The Loop block. — it does not fall back to any default channel.
Supported Platform blocks
Attach exactly one of these to the Platform slot. The block appends the approval link (and any context items) to that block's message body before sending it:
| Platform block | Where the link is appended |
|---|---|
| Slack | options.message |
| Telegram | options.message (parse mode defaults to Markdown) |
| Gmail | options.sendEmail.body |
| Send Email | options.body |
| Twilio | options.message |
options.messageOptions.text (sent as a text message) |
Any other block type attached to the slot will be executed, but no link is appended to it — so the reviewer never receives a way to respond.
Setup Guide
Step 1: Add the HITL Block
- Open your workflow in the editor
- Navigate to Logic blocks
- Drag the Human In The Loop block onto your canvas
- Connect it in the workflow where human review is needed
Step 2: Attach a Platform block
- Add one of the supported platform blocks to the canvas
- Connect it to the HITL block's Platform attachment endpoint
- Configure its credentials and recipient (channel, chat id, or email address)
- Write any message body you want; the approval link is appended to it automatically
Step 3: Write the Prompt Message
Describe what the reviewer needs to decide. This text appears in the Input Required panel of the approval page.
Step 4: Add Context for the Reviewer
Add label/value pairs so the notification carries the facts needed to decide:
Customer Name → {{customerName}}
Order ID → {{orderId}}
Amount → {{orderTotal}}These are appended to the notification under a *Context:* heading.
Step 5: Capture the Reviewer's Response (optional)
Select a workflow variable under Save review to variable. The approval page then shows a Your Review textarea, and the text is written into that variable when the reviewer submits — so downstream blocks can reference it.
Step 6: Connect Both Branches
Connect the Approved and Rejected endpoints to their downstream flows. Both branches are always present; there are no custom action options.
The Approval Page
The link points at /approvals/{workflowId}/{executionId}/{blockId}?token=… in the builder app and shows:
- Input Required — the configured prompt message
- Review Data — an accordion of every upstream block's output, rendered as editable fields. The reviewer can change values before deciding, and the edited data is sent back with the decision
- Your Review — a free-text field, only when a review variable is configured
- Reject and Approve buttons
Page states
| Execution status | What the reviewer sees |
|---|---|
PAUSED | The review form |
RUNNING / COMPLETED | "Already submitted — this request has already been reviewed" |
FAILED or other | "Workflow <status>" — this workflow is not currently waiting for input |
A second submission (a double click, or another browser tab) returns HTTP 409 and the reviewer is shown the same confirmation rather than an error.
The approval page is served by the builder app, at the URL in NEXTAUTH_URL. Reviewers do not need an Indite account — the signed token in the link is what authorises reading the execution and submitting the decision.
Output Variables
The decision is delivered as a branch, not as an output field — the block itself records no action variable. What you can read downstream is:
| Source | Description |
|---|---|
| The Approved / Rejected branch | Which edge fires is how you react to the decision |
| The review variable | The reviewer's written response, when Save review to variable is configured |
| Edited upstream data | Values the reviewer changed in the Review Data panel are passed back on resume |
There are no respondent, responseTime, timedOut, or timestamp output fields. Branch on the edge rather than on an output value.
Workflow Branching
Human In The Loop
│
├── Approved ──→ Continue normal workflow
│
└── Rejected ──→ Send rejection notification → End workflowInternally each edge carries a fixed conditionId (approved-condition or rejected-condition). When the execution pauses, every outgoing edge is parked; on resume the engine prunes the branch that was not chosen, so only one side ever runs.
Use Case Examples
Content Approval Workflow
AI Generates Content → Human In The Loop (Platform: Slack) → Approved → Publish
→ Rejected → Notify author
Configuration:
- Prompt: "New AI-generated blog post needs approval before publishing."
- Context: Title → {{postTitle}}, Audience → {{targetAudience}}
- Save review to variable: editorNotesLarge Order Verification
Order Received → Condition (Amount > 10000) → Human In The Loop (Platform: Send Email)
→ Approved → Process Order
→ Rejected → Cancel and notify customer
Configuration:
- Prompt: "This order exceeds the $10,000 threshold. Please review and approve."
- Context: Order ID → {{orderId}}, Customer → {{customerName}}, Total → {{orderTotal}}AI Response Quality Gate
User Query → LLM Agent → AI Judge → (low score) → Human In The Loop (Platform: Slack)
→ Approved → Send response
→ Rejected → Regenerate
Configuration:
- Prompt: "The AI judge flagged this response. Please review before it is sent."
- Context: Question → {{userQuery}}, Draft → {{aiResponse}}
- Save review to variable: reviewerEditBest Practices
- Always attach a Platform block — the block fails without one
- Provide Complete Context — use context items so the reviewer does not have to look anything up
- Connect Both Branches — an unconnected Rejected branch silently ends the flow
- Write an Explicit Prompt — the default text is only "Please review and select an option to continue."
- Use the Review Variable — capture why a decision was made, not just which button was pressed
- Keep Review Data Small — every upstream block's output is rendered on the page
- Treat Links as Secrets — anyone holding the signed link can decide
- Minimize Fatigue — gate HITL behind a condition or AI Judge so humans only see real edge cases
Error Handling
| Error | Cause | Solution |
|---|---|---|
Platform attachment is required for Human In The Loop block. | Nothing attached to the Platform slot | Attach a supported platform block |
Human in the Loop block requires a valid platform attachment. | Attached block is missing from the executable workflow | Re-attach the block and republish |
| Notification failed | The platform block itself errored | Check that block's credentials and recipient; the HITL block returns the platform block's error |
| "Execution not found" on the approval page | Wrong or truncated link, or a missing/invalid token | Re-send the link exactly as generated |
| "Already submitted" | A decision was already recorded | No action needed — the workflow has resumed |
Troubleshooting
Notifications not arriving:
- Verify the attached platform block's credentials in workspace settings
- Confirm the bot or integration has access to the target channel
- Check the execution logs: the HITL log line names the platform it sent through
Approval link 404s or errors:
NEXTAUTH_URLmust point at the publicly reachable builder URL — the link is built from it- The token is part of the link; a link copied without the
?token=…query string will not authorise
Workflow stuck waiting:
- There is no timeout. A paused execution waits indefinitely until someone decides
- Check the execution status is
PAUSEDand re-send the approval link if needed
Pro Tip: Combine Human In The Loop with the AI Judge block to create intelligent escalation - only involve humans when the AI's own score falls below your threshold.