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 pauses execution and waits for a person to review data, make decisions, or take action before the workflow continues.

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 - Workflow halts at the HITL block and resumes when a human responds
  • Multi-Channel Notifications - Alert reviewers via Slack, Email, MS Teams, or custom webhooks
  • Interactive Decisions - Present options like Approve, Reject, Escalate, or custom actions
  • Data Presentation - Display relevant context to help humans make informed decisions
  • Configurable Timeouts - Set deadlines with automatic fallback actions
  • Audit Trail - Track who responded, when, and what action they took
  • Parallel Reviews - Request input from multiple reviewers simultaneously

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

ParameterTypeRequiredDefaultDescription
Notification ChannelSelectYes-Platform for sending alerts (Slack, Email, Teams)
Channel/RecipientTextYes-Specific channel name or email address
TitleTextYes-Subject line for the notification
DescriptionTextNo-Detailed context about what needs review
Data to ReviewObjectNo-Structured data to present to the reviewer
Action OptionsArrayYesApprove, RejectAvailable decision options
Allow Data ModificationBooleanNofalseLet reviewer edit the data
TimeoutDurationNo24 hoursMaximum wait time
Timeout ActionSelectNoNoneAutomatic action if timeout occurs
ReassignmentBooleanNofalseAllow forwarding to another reviewer

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: Configure Notifications

  1. Select your notification platform (Slack, Email, Teams)
  2. Enter the channel or recipient details
  3. Compose a clear, actionable title
  4. Add description with context

Step 3: Define Review Data

Structure the data reviewers will see:

{
  "summary": "{{ai.summary}}",
  "confidence": "{{ai.confidence}}%",
  "originalInput": "{{user.query}}",
  "suggestedAction": "{{ai.recommendation}}"
}

Step 4: Set Action Options

Define available decisions:

  • Approve - Continue workflow as planned
  • Reject - Stop workflow or trigger rejection flow
  • Request Changes - Route back for modification
  • Escalate - Forward to senior reviewer
  • Custom options for your use case

Step 5: Configure Timeout Behavior

  1. Set a reasonable timeout (e.g., 4 hours for urgent, 48 hours for routine)
  2. Choose fallback action:
    • Execute default action
    • Escalate to another reviewer
    • Cancel workflow
    • Retry notification

Use Case Examples

Content Approval Workflow

AI Generates Content → Human In The Loop → Approve? → Publish

Configuration:
- Title: "Blog Post Ready for Review"
- Description: "New AI-generated content needs approval"
- Data: Post title, content preview, target audience
- Options: Approve, Request Edits, Reject
- Timeout: 24 hours → Auto-escalate to editor

Large Order Verification

Order Received → Check Amount > $10K → Human In The Loop → Process Order

Configuration:
- Title: "Large Order Requires Approval"
- Description: "Order exceeds $10,000 threshold"
- Data: Order ID, customer info, items, total amount
- Options: Approve Order, Hold for Review, Cancel Order
- Timeout: 4 hours → Flag for management review

AI Response Quality Gate

User Query → AI Generate Response → AI Judge → If Low Confidence → Human In The Loop

Configuration:
- Title: "AI Response Needs Human Review"
- Description: "Low confidence score ({{confidence}}%) - please verify"
- Data: User question, AI response, confidence metrics
- Options: Send as-is, Edit and Send, Regenerate
- Timeout: 30 minutes → Escalate to team lead

Financial Transaction Approval

Transaction Created → Risk Score Check → Human In The Loop → Execute Transaction

Configuration:
- Title: "Transaction Approval Required"
- Description: "High-risk transaction flagged for review"
- Data: Transaction details, risk factors, customer history
- Options: Approve, Decline, Request Additional Verification
- Timeout: 2 hours → Auto-decline and notify customer

Output Variables

The HITL block outputs the following data:

VariableTypeDescription
actionstringThe selected action (e.g., "Approve", "Reject")
respondent.idstringID of the person who responded
respondent.namestringName of the respondent
respondent.emailstringEmail of the respondent
responseTimenumberTime taken to respond (milliseconds)
modifiedDataobjectData if edited by reviewer (when allowed)
commentsstringOptional comments from reviewer
timedOutbooleanTrue if timeout occurred
timestampstringISO timestamp of response

Workflow Branching

Use conditional logic after HITL to route based on decisions:

Human In The Loop

    ├── action === "Approve"
    │   └── Continue normal workflow

    ├── action === "Reject"
    │   └── Send rejection notification → End workflow

    ├── action === "Request Changes"
    │   └── Route back to content generation

    └── timedOut === true
        └── Execute fallback action

Integration with Notification Platforms

Slack Integration

  • Interactive message with action buttons
  • Real-time responses captured automatically
  • Supports threading for context
  • Can mention specific users or groups

Email Integration

  • Clean HTML email with action links
  • Secure one-click response tokens
  • Mobile-friendly design
  • Supports CC/BCC for visibility

Microsoft Teams Integration

  • Adaptive cards with interactive elements
  • Integrates with Teams approval workflows
  • Supports channel or direct messages

Custom Webhook

  • Send to any system with REST API
  • Include custom headers and authentication
  • Handle responses via callback URL

Best Practices

  1. Provide Complete Context - Include all information needed to make a decision
  2. Set Realistic Timeouts - Balance urgency with reviewer availability
  3. Define Clear Actions - Use unambiguous action labels
  4. Always Have Fallbacks - Never leave workflows hanging on timeout
  5. Track Metrics - Monitor response times and decision patterns
  6. Minimize Fatigue - Don't overload reviewers with unnecessary requests
  7. Use Appropriate Urgency - Route urgent items to faster channels
  8. Document Decisions - Store responses for audit trails
  9. Test Notification Flow - Verify alerts reach the right people
  10. Consider Time Zones - Account for reviewer availability

Error Handling

ErrorCauseSolution
Notification failedPlatform connection issueCheck credentials in workspace settings
User not foundInvalid recipient IDVerify user exists in the platform
Channel not accessibleBot lacks permissionsGrant bot access to the channel
Timeout reachedNo response within limitFallback action executes automatically
Invalid action responseUnexpected response formatCheck option configuration
Platform rate limitedToo many notificationsBatch requests or space them out

Troubleshooting

Notifications not arriving:

  • Verify platform credentials are valid
  • Check that the bot/integration is added to the channel
  • Confirm recipient email addresses are correct

Responses not captured:

  • Ensure webhook callback URLs are accessible
  • Check that response tokens haven't expired
  • Verify the reviewer used the interactive buttons

Workflow stuck waiting:

  • Check if timeout is configured
  • Verify notification was actually sent (check logs)
  • Consider adding manual override capability

Pro Tip: Combine Human In The Loop with the AI Judge block to create intelligent escalation - only involve humans when AI confidence is below a threshold.

Indite Documentation v1.4.0
PrivacyTermsSupport