Prompt
How do I automate a task that requires human approval halfway through?
Latest observation
Nov 6, 2026
OpenAI APIWeb search: off
You generally have two good patterns for this:
1) Split the workflow into automated steps + an approval checkpoint
Design the task as a state machine:
- Automate step A
- Pause and request human approval
- Resume with step B only if approved
- Handle reject/timeout paths
This is the most common approach in workflow tools like:
- Zapier / Make / n8n
- GitHub Actions / GitLab CI with approval gates
- Airflow / Prefect / Dagster
- Custom app + database/state store + queue
Typical implementation
- Store the job state:
pending_approval,approved,rejected,expired - Send the approver a notification:
- Slack / Teams message
- web portal
- Approver clicks Approve or Reject
- Your system receives that event and continues the workflow
2) Use a workflow engine with built-in human-in-the-loop support
If this is a recurring business process, use software built for “human-in-the-loop” workflows. These tools let you:
- pause execution
- wait for external input
- resume later
- track audit history
Examples:
- Temporal
- AWS Step Functions with a callback/task token pattern
- Azure Durable Functions
- Camunda / Zeebe
- Power Automate
- ServiceNow workflows
A simple architecture
- Worker executes automated steps
- Database stores workflow state
- Approval UI or message link captures approval
- Webhook/API endpoint resumes the workflow
Example flow
- System generates a report
- System sends Slack message: “Approve sending report?”
- Human approves via button/link
- System records approval
- System sends report automatically
Important design considerations
1. Don’t block a process waiting synchronously
Avoid making one process sit idle waiting for a human. Instead:
- save state
- exit
- resume later when approval arrives
2. Add timeouts and fallback paths
Decide what happens if nobody responds:
- auto-reject after 24 hours
- escalate to another approver
- send reminders
3. Keep an audit trail
Log:
- who approved
- when
- what was approved
- original inputs and version
4. Protect the approval action
Use secure approval links:
- unique token
- expiration
- authentication required for sensitive tasks
If you want a quick low-code option
A common lightweight setup is:
- Trigger → automation runs step 1
- Approval message in Slack/Email
- Webhook from “Approve” button
- Second automation continues step 2
Rule of thumb
- Simple one-off workflow: automation tool + approval button/link
- Enterprise / long-running process: workflow engine with human tasks
- Custom app: state machine + approval endpoint
If you want, I can sketch:
- a no-code version,
- a Python example,
- or a Temporal / Step Functions design.