Workflows
Blocks
Logic
Human In The Loop

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 PAUSED at 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

ScenarioDescription
High-Stakes DecisionsFinancial approvals, legal compliance, customer escalations
AI Output VerificationReview AI-generated content before publishing
Exception HandlingRoute unusual cases to humans for judgment
Quality AssuranceSpot-check automated processes for accuracy
Sensitive OperationsActions requiring authorization (data deletion, access grants)
Complex Edge CasesSituations AI cannot reliably handle

Configuration

ParameterTypeRequiredDescription
Prompt MessageTextareaNoShown to the reviewer at the top of the approval page, alongside the approval link
Save review to variableVariableNoWhen set, the approval form shows a Your Review text field and writes its value into this variable on resume
Context for ReviewerLabel/Value pairsNoKey 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 blockWhere the link is appended
Slackoptions.message
Telegramoptions.message (parse mode defaults to Markdown)
Gmailoptions.sendEmail.body
Send Emailoptions.body
Twiliooptions.message
WhatsAppoptions.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

  1. Open your workflow in the editor
  2. Navigate to Logic blocks
  3. Drag the Human In The Loop block onto your canvas
  4. Connect it in the workflow where human review is needed

Step 2: Attach a Platform block

  1. Add one of the supported platform blocks to the canvas
  2. Connect it to the HITL block's Platform attachment endpoint
  3. Configure its credentials and recipient (channel, chat id, or email address)
  4. 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 statusWhat the reviewer sees
PAUSEDThe 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:

SourceDescription
The Approved / Rejected branchWhich edge fires is how you react to the decision
The review variableThe reviewer's written response, when Save review to variable is configured
Edited upstream dataValues 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 workflow

Internally 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: editorNotes

Large 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: reviewerEdit

Best Practices

  1. Always attach a Platform block — the block fails without one
  2. Provide Complete Context — use context items so the reviewer does not have to look anything up
  3. Connect Both Branches — an unconnected Rejected branch silently ends the flow
  4. Write an Explicit Prompt — the default text is only "Please review and select an option to continue."
  5. Use the Review Variable — capture why a decision was made, not just which button was pressed
  6. Keep Review Data Small — every upstream block's output is rendered on the page
  7. Treat Links as Secrets — anyone holding the signed link can decide
  8. Minimize Fatigue — gate HITL behind a condition or AI Judge so humans only see real edge cases

Error Handling

ErrorCauseSolution
Platform attachment is required for Human In The Loop block.Nothing attached to the Platform slotAttach a supported platform block
Human in the Loop block requires a valid platform attachment.Attached block is missing from the executable workflowRe-attach the block and republish
Notification failedThe platform block itself erroredCheck that block's credentials and recipient; the HITL block returns the platform block's error
"Execution not found" on the approval pageWrong or truncated link, or a missing/invalid tokenRe-send the link exactly as generated
"Already submitted"A decision was already recordedNo 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_URL must 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 PAUSED and 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.

Indite Documentation v1.7.1
PrivacyTermsSupport