Skip to content

10.4 Human-in-the-Loop Workflows

Complete automation isn't always what you want. Sometimes you need human judgment, approval gates, or review steps before taking important actions. This section shows you how to design workflows that combine the speed of automation with the wisdom of human oversight.


What Is Human-in-the-Loop?

The Concept

Human-in-the-Loop (HITL) means placing humans at strategic points in automated workflows.

Not: Humans vs. Machines

Instead: Humans + Machines working together

Machines excel at

  • Processing speed
  • Consistency
  • Handling volume
  • Pattern recognition
  • Data extraction
🧠

Humans excel at

  • Judgment calls
  • Nuanced decisions
  • Creative solutions
  • Edge case handling
  • Risk assessment

HITL combines both strengths


Real-World Analogy: Airport Security

Full automation (no humans)

Baggage → X-ray scan → Algorithm decides → Auto-allow/deny

Problem: Algorithm might miss threats or flag innocuous items

⚠️

Full manual (no automation)

Baggage → Human inspects each bag thoroughly

Problem: Too slow, inconsistent, expensive

Human-in-the-loop (hybrid)

Baggage → X-ray scan → Algorithm flags suspicious → Human reviews flagged items → Decision

Result: Fast + Accurate + Safe

Automation handles 95% automatically, humans focus on 5% edge cases


In Taibles

Human-in-the-loop patterns:

  1. Approval gates: Automation generates, human approves
  2. Review and edit: Automation drafts, human refines
  3. Exception handling: Automation tries, human fixes failures
  4. Override controls: Automation decides, human can override
  5. Selective execution: Human chooses what to run
Human-in-the-Loop Pattern
Automation stops for human review before continuing
Research
Auto
Automatic
Draft Email
Auto
Automatic
Human Review
Manual
Send Email
Manual
How it works:
  1. 1. System automatically generates email draft
  2. 2. You review the draft and make any edits
  3. 3. You check an "Approved" checkbox when ready
  4. 4. Send Email column only runs if approved
  5. 5. You manually click "Send" button for final safety
✅ Advantages
  • • Safe (human oversight)
  • • Can edit before sending
  • • Accountability tracked
  • • Prevents mistakes
⚠️ Considerations
  • • Slower (waits for human)
  • • Requires attention
  • • Need review process
  • • Not fully automated
🛡️ Best for: Sending emails, making purchases, or any action that can't be undone

Pattern 1: Approval Before Action

Use Case

Problem: Automation generates output that requires approval before executing critical action

Examples:

  • Marketing email drafted by AI → Review → Send
  • Lead qualifies automatically → Review → Create CRM record
  • Invoice data extracted → Review → Process payment
  • Social media post generated → Review → Publish

Key principle: Automation prepares, human approves, automation executes


Implementation Architecture

Column sequence:

1
Input data
Manual entry
2-4
Automated processing
Run mode: Once
5
Draft/Result
Output from automation
6
Approval flag
Manual boolean toggle - HUMAN REVIEW
7
Execute action
Run mode: Manual + Condition

Key components:

  • Automated draft column produces content
  • Approval toggle (checkbox) for human to check
  • Action column has condition + manual trigger

Example: Outbound Email Campaign

Business scenario: Generate personalized outreach emails, but require review before sending


Step 1: Create Input Columns

Column NameTypePurpose
Prospect EmailTextTarget recipient
Prospect CompanyTextCompany name
Prospect RoleTextJob title

Add 10-20 rows with prospect data


Step 2: Create Research Column

Column: Company Research

Company Research

LLM Column
Run mode
Once
Dependencies
Prospect Company
Prompt
Research this company and find:
- What they do
- Recent news or achievements
- Pain points they might have
- Why they might need our service

Company: [Prospect Company]

Provide 3-4 sentences of relevant information.
What this does:
Automatically researches each company when you add a new prospect. The system uses AI to find background information for personalization.

Result: Background research for personalization


Step 3: Create Email Draft Column

Column: Email Draft

Email Draft

LLM Column
Run mode
Once
Dependencies
Prospect EmailProspect CompanyProspect RoleCompany Research
Prompt
Write a personalized outbound sales email to:

Name: [Prospect Email]
Company: [Prospect Company]
Role: [Prospect Role]

Research: [Company Research]

The email should:
- Be 3-4 sentences max
- Reference specific company context
- Offer clear value proposition
- Include soft call-to-action
- Sound human and conversational (not salesy)

Subject line and body:
What this does:
Creates a personalized email draft using the research data. The AI writes naturally and includes specific company context to make each email unique.

Result: AI-generated personalized email draft


Step 4: Create Approval Column

Column: Approved for Send

Approved for Send

Boolean Column
Default value
Unchecked (false)
Manual entry
Yes
How users interact:
1.
User reads Email Draft column
Reviews the AI-generated email
2.
If satisfied, clicks toggle
In Approved for Send column
3.
Toggle changes appearance
✗ Unchecked
✓ Checked
What this does:
This checkbox lets you approve emails one by one. Only emails with the checkbox checked can be sent. This prevents accidentally sending unreviewed emails.

Purpose: Human reviews email draft and toggles to approve

How it works:

  1. User reads Email Draft column
  2. If satisfied, clicks toggle in Approved for Send column
  3. Toggle changes from ✗ (unchecked) to ✓ (checked)

Step 5: Create Send Email Column

Column: Email Sent

Email Sent

Send Email Column
Run mode
Manual
Dependencies
Email DraftApproved for Send
Condition (safety check):
Approved for Send = true
This condition ensures emails only send if the Approved for Send checkbox is checked.
Email Settings
To:[Prospect Email]
From:your_email@company.com
Subject:(extracted from Email Draft)
Body:[Email Draft]
⚠️ Important - Manual Mode:
This column will NOT run automatically. You must:
  1. 1. Select the rows you want to send
  2. 2. Right-click and choose "Run column"
  3. 3. The email will only send if approved

Important: Even after approval, this column requires manual execution


How Users Work With This

Step 1

Automation runs automatically

  1. 1. Add row with prospect data
  2. 2. Company Research executes →Done
  3. 3. Email Draft executes → Done
  4. 4. User receives notification or checks taible
Step 2

Human review

  1. 1. Click row to review
  2. 2. Read Email Draft column content
  3. 3. Decision point:
  4. Good email: Check Approved for Send toggle ✓
  5. Bad email: Leave unchecked, optionally edit draft manually
  6. Edit needed: Copy and modify (see Pattern 2)
Step 3

Manual execution

  1. 1. Filter view: Show only rows where Approved for Send = true
  2. 2. Select approved rows:
  3. • Click checkbox on each approved row
  4. • Or use "Select All" if filtered
  5. 3. Right-click selection
  6. 4. Choose "Re-run column" from menu
  7. 5. Select column: Email Sent
  8. 6. Click "Confirm"
  9. 7. Emails send to approved prospects only

Result:

  • ✓ Emails sent only after approval
  • ✓ Condition prevents sending to unapproved rows
  • ✓ Manual mode prevents accidental bulk sending

Why Both Approval Toggle AND Manual Run?

Question: "If I toggle approval, why can't it auto-send?"

Answer: Two-layer safety

1

Approval Toggle

"This content is good"
  • Reviews individual email quality
  • Can approve multiple at once
  • Reversible (can un-toggle)
Content reviewed and approved
2

Manual Run

"Send it NOW"
  • Explicit action to execute
  • Conscious decision moment
  • Prevents accidental bulk execution
  • Allows batch control (send 10, wait, send next 10)
Run Column
User clicks to execute
🛡️ Combined Protection:
Both layers work together: You can approve 50 emails on Monday (Layer 1), then send them in controlled batches throughout the week (Layer 2). This prevents accidents and gives you control over timing.

Example scenario:

Monday morning: Review and approve 50 emails (toggle all)
Monday afternoon: Send batch 1 (select and run 10 rows)
Tuesday morning: Send batch 2 (select and run 10 rows)
Wednesday: Send remaining 30

Benefit: Stagger outreach, manage reply volume, test results


Pattern 2: Review and Edit

Use Case

Problem: Automation produces good drafts, but human wants to refine before using

Examples:

  • Blog post draft → Edit → Publish
  • Contract generated → Customize → Send
  • Response drafted → Personalize → Reply

Difference from Pattern 1: Human edits the output, not just approves


Implementation Options

A

Edit in Downstream Tool

Draft → Approve → Send to external tool → Edit there

Best for: Email clients, CMS
B

Manual Column

Draft → Copy to manual column → Edit → Use edited version

Best for: Full control
C

Smart Fallback

Draft → Optional override → Smart merge → Use best version

Best for: Efficiency

Option A: Edit in Downstream Tool

📝
AI Draft
Generate text
User Approves
Review & approve
📧
Send to Tool
Email client, CMS
✏️
Edit There
Modify before send
Example:
  • • Email Draft generates text
  • • User approves
  • • Action copies to external tool (email client, CMS, etc.)
  • • User edits in that tool before final send/publish

Example:

  • Email Draft generates text
  • User approves
  • Action copies to external tool (email client, CMS, etc.)
  • User edits in that tool before final send/publish

Option B: Manual Column for Final Version

🤖
AI Draft
Auto-generated
📋
Manual Column
User copies & edits
🚀
Use Edited Version
Final action

Implementation:

Column 1: AI Draft

LLM
Run mode: Once
Purpose: Generates content automatically

Column 2: Final Content

Manual Text
Type: Text (multiline)
User action: Copy from AI Draft, then edit

Column 3: Published

Boolean
User action: Click when ready to publish

Column 4: Publish Action

Action
Dependencies: Final Content, Published
Condition: Published = true
Run mode: Manual
Uses: [Final Content] (edited version)

User workflow:

  1. AI Draft generates content automatically
  2. User copies content from AI Draft cell
  3. User pastes into Final Content cell
  4. User edits Final Content as needed
  5. User toggles Published when satisfied
  6. User manually runs Publish Action

Result: Human has full editing control


Option C: Smart Fallback Logic

🤖
AI Draft
✏️
Optional Manual Override
🎯
Smart Column
Uses Best Available

Implementation:

Column 3: Final Content (Smart Fallback)

Custom Code
Logic:
If Manual Override has content:
→ Use manual version
Else if AI Draft has content:
→ Use AI version
Else:
→ No content
Benefits:
  • ✓ Most rows use AI (fast, no manual work)
  • ✓ Edge cases get manual override
  • ✓ Single source of truth (Final Content)
  • ✓ Downstream columns don't need to know source

Benefits:

  • ✓ Most rows use AI (fast, no manual work)
  • ✓ Edge cases get manual override
  • ✓ Single source of truth (Final Content)
  • ✓ Downstream columns don't need to know source

Pattern 3: Exception Handling

Use Case

Problem: Automation works 90% of the time, but failures need human intervention

Examples:

  • Data extraction → 90% clean, 10% needs correction
  • Lead scoring → 95% confident, 5% need review
  • Invoice processing → Most parse correctly, some need help

Principle: Automate the majority, escalate exceptions


Implementation: Validation + Conditional Review

Extract Data
Validate
Quality OK?
No ✗
Human Review
Correction
Retry
Yes ✓
Auto-Process
Done

Example: Invoice Data Extraction

Scenario: Process invoices from various formats

Component placeholder - content will be added based on the pattern

User Workflow

Happy path (90% of invoices):

Component placeholder - content will be added based on the pattern

Exception path (10% of invoices):

Component placeholder - content will be added based on the pattern

Efficiency gain:

  • ✓ 90% auto-processed (zero manual work)
  • ✓ 10% exceptions flagged automatically
  • ✓ Human focuses only on failures
  • ✓ 10× faster than manual processing

Pattern 4: Selective Execution

Use Case

Problem: Not every row should be processed automatically

Examples:

  • Research data on some leads, not all
  • Expensive operation only for high-value items
  • Risky action only after review

Solution: Manual run mode + filtering


Implementation: Manual Columns with Smart Filtering

Example: Expensive Lead Research

Component placeholder - content will be added based on the pattern

User workflow:

  1. Import 1,000 leads
  2. Lead Score auto-calculates for all
  3. Qualified auto-calculates for all
  4. Filter view: Qualified = true (shows 150 leads)
  5. Review filtered list, manually select 50 high-priority
  6. Right-click selection
  7. Run "Deep Research" column on selected rows only
  8. Research executes for 50 rows ($250 total vs. $5,000 for all)

Benefit: Human judgment + automation = optimal cost/value


Common HITL Patterns Summary

Component placeholder - content will be added based on the pattern

Best Practices

Practice 1: Make Reviews Efficient

Bad: Review every single row individually

Good: Batch review with filtering

Component placeholder - content will be added based on the pattern

Efficiency: 20× faster review process


Practice 2: Provide Context for Review

Bad: Just show generated output

Good: Show input data + reasoning + output

Component placeholder - content will be added based on the pattern

Benefit: Human can make informed decisions faster


Practice 3: Learn from Corrections

Pattern: Track what humans override

Component placeholder - content will be added based on the pattern

Use aggregated data to:

  • Improve prompts
  • Adjust thresholds
  • Train better models
  • Identify edge cases

Practice 4: Set Default to Safe State

Component placeholder - content will be added based on the pattern

Balancing Automation and Control

Finding the Right Balance

Component placeholder - content will be added based on the pattern

Decision Framework

When to require human approval:

Yes (add approval gate):

  • Actions with external consequences (emails, payments, posts)
  • Expensive operations (>$1 per execution)
  • Regulatory/compliance requirements
  • Brand reputation risk (public communications)
  • Legal implications (contracts, agreements)

No (fully automate):

  • Data extraction and enrichment
  • Scoring and classification
  • Internal data transformation
  • Low-risk calculations
  • Read-only operations

Summary: Human-in-the-Loop Workflows

You now understand human-in-the-loop workflows:

Core concept: Blend automation with human judgment

Four main patterns:

  • Approval gates (toggle + condition + manual run)
  • Review and edit (draft + manual column + fallback logic)
  • Exception handling (validate + escalate failures)
  • Selective execution (manual mode + filtering)

Implementation techniques:

  • Boolean toggles for approval
  • Conditional execution on approval
  • Manual run mode for safety
  • Custom code for validation
  • Filtering for efficient review

Best practices:

  • Batch review workflows
  • Provide decision context
  • Learn from corrections
  • Default to safe state

Complete example: Outbound email campaign

  • AI drafts personalized emails
  • Human reviews and approves
  • Manual batch execution
  • Two-layer safety (toggle + run)

Next Steps

Now that you understand human-in-the-loop workflows, Section 10.5 will cover:

  • Integration patterns with external services
  • Bidirectional synchronization
  • Multi-tool enrichment with fallbacks
  • Building robust integrations

Let's master external integrations!

Built with VitePress