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
| 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 | Default | Description |
|---|---|---|---|---|
| Notification Channel | Select | Yes | - | Platform for sending alerts (Slack, Email, Teams) |
| Channel/Recipient | Text | Yes | - | Specific channel name or email address |
| Title | Text | Yes | - | Subject line for the notification |
| Description | Text | No | - | Detailed context about what needs review |
| Data to Review | Object | No | - | Structured data to present to the reviewer |
| Action Options | Array | Yes | Approve, Reject | Available decision options |
| Allow Data Modification | Boolean | No | false | Let reviewer edit the data |
| Timeout | Duration | No | 24 hours | Maximum wait time |
| Timeout Action | Select | No | None | Automatic action if timeout occurs |
| Reassignment | Boolean | No | false | Allow forwarding to another reviewer |
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: Configure Notifications
- Select your notification platform (Slack, Email, Teams)
- Enter the channel or recipient details
- Compose a clear, actionable title
- 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
- Set a reasonable timeout (e.g., 4 hours for urgent, 48 hours for routine)
- 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 editorLarge 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 reviewAI 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 leadFinancial 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 customerOutput Variables
The HITL block outputs the following data:
| Variable | Type | Description |
|---|---|---|
action | string | The selected action (e.g., "Approve", "Reject") |
respondent.id | string | ID of the person who responded |
respondent.name | string | Name of the respondent |
respondent.email | string | Email of the respondent |
responseTime | number | Time taken to respond (milliseconds) |
modifiedData | object | Data if edited by reviewer (when allowed) |
comments | string | Optional comments from reviewer |
timedOut | boolean | True if timeout occurred |
timestamp | string | ISO 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 actionIntegration 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
- Provide Complete Context - Include all information needed to make a decision
- Set Realistic Timeouts - Balance urgency with reviewer availability
- Define Clear Actions - Use unambiguous action labels
- Always Have Fallbacks - Never leave workflows hanging on timeout
- Track Metrics - Monitor response times and decision patterns
- Minimize Fatigue - Don't overload reviewers with unnecessary requests
- Use Appropriate Urgency - Route urgent items to faster channels
- Document Decisions - Store responses for audit trails
- Test Notification Flow - Verify alerts reach the right people
- Consider Time Zones - Account for reviewer availability
Error Handling
| Error | Cause | Solution |
|---|---|---|
| Notification failed | Platform connection issue | Check credentials in workspace settings |
| User not found | Invalid recipient ID | Verify user exists in the platform |
| Channel not accessible | Bot lacks permissions | Grant bot access to the channel |
| Timeout reached | No response within limit | Fallback action executes automatically |
| Invalid action response | Unexpected response format | Check option configuration |
| Platform rate limited | Too many notifications | Batch 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.