Skip to main content

Overview

Human in the Loop (HITL) allows you to pause workflow execution and require manual approval before proceeding with sensitive or important actions. Perfect for workflows involving financial transactions, data deletions, or any operation that benefits from human judgment.
Add oversight to automation while maintaining the efficiency of workflows. Approve or reject actions before they execute.

How It Works

When a workflow reaches an action configured with manual approval:
  1. Workflow pauses execution
  2. Notification sent to designated approver(s)
  3. Approver reviews details and makes decision
  4. Workflow continues or stops based on approval/rejection
Integration Trigger

Configuring Manual Approval

Manual approval is configured at the action level, giving you granular control over which steps require oversight.

Example Use Cases

Financial Transactions

Trigger: Invoice received
→ Agent: Extract invoice details
→ Action: Create payment (Requires Approval)
  ├─ Approver: Finance Manager
  ├─ Message: "Approve payment of ${{agent.amount}} to {{agent.vendor}}"
  └─ Timeout: 24 hours
→ Condition: Approved?
  → Yes: Process payment
  → No: Send rejection notification
Why approval needed: Financial transactions should have oversight, especially for amounts over a certain threshold.

Data Deletion

Trigger: Cleanup request
→ HTTP Request: Fetch old records
→ Code: Filter records older than 90 days
→ Action: Delete records (Requires Approval)
  ├─ Approver: Data Administrator
  ├─ Message: "Approve deletion of {{code.record_count}} records"
  └─ Shows preview of records to be deleted
→ Condition: Approved?
  → Yes: Proceed with deletion
  → No: Archive instead
Why approval needed: Data deletion is irreversible and requires verification.

Customer Communications

Trigger: Form submission
→ Agent: Generate response
→ Action: Send email to customer (Requires Approval)
  ├─ Approver: Customer Success Team
  ├─ Message: "Review response to {{trigger.customer_name}}"
  ├─ Shows: Email draft generated by agent
  └─ Timeout: 2 hours
→ If approved: Send email
→ If rejected: Return to draft
Why approval needed: Customer-facing communications represent your brand and may need quality review.

Integration Changes

Trigger: Manual or scheduled
→ Agent: Review configuration changes
→ Action: Update production system (Requires Approval)
  ├─ Approver: Engineering Lead
  ├─ Message: "Approve deployment of {{agent.changes}}"
  └─ Shows: Change summary
→ Condition: Approved?
  → Yes: Apply changes
  → No: Rollback and notify
Why approval needed: Production changes carry risk and benefit from review.

Approval Decision Routing

Use a Condition node after approved actions to handle both outcomes:
Action (with approval required)
→ Condition: Was action approved?
  ├─ Yes → Continue with next steps
  └─ No → Send rejection notification
          → Log decision
          → End or alternative path
Access the approval decision in subsequent nodes:
{{action_node.approved}}        → true/false
{{action_node.approver}}        → Who approved
{{action_node.approval_time}}   → When approved
{{action_node.rejection_reason}} → If rejected, why

When to Use Human in the Loop

✅ Good use cases:
  • Financial transactions over a threshold
  • Data deletions or irreversible operations
  • Customer communications requiring review
  • Production system changes
  • Compliance-sensitive actions
  • High-value decisions
❌ Avoid for:
  • Routine, low-risk actions
  • Steps that need to run immediately
  • Actions that happen hundreds of times daily
  • Workflows where humans become a bottleneck

Combining with Conditions

Smart approval workflows use conditions to require approval only when needed:
Agent: Calculate invoice amount

Condition: Amount > $5000?
├─ Yes → Action: Create payment (Requires Approval)
│        └─ High-value payment needs review
└─ No → Action: Create payment (No Approval)
         └─ Low-value auto-approved
This pattern gives you:
  • Automation for routine cases
  • Oversight for exceptional cases
  • Efficient use of human time

Best Practices

Don’t require approval for every step—focus on actions with real risk or significant impact. Too many approvals slow down automation benefits.
Include all relevant information in the approval message. Show dollar amounts, recipient names, data preview—anything the approver needs to decide confidently.
Balance urgency with availability. A 2-hour timeout for time-sensitive actions, 24 hours for less urgent decisions.
Plan what happens when actions are rejected. Send notifications, log the decision, or route to an alternative path.
Run test workflows to ensure approval notifications arrive correctly and the interface shows the right information.

Next Steps