n8n Human in the Loop: Approval Workflows That Work
Master n8n human-in-the-loop workflows. Build approval gates with Slack, email, AI routing. Self-hosted webhook guide. Step-by-step tutorial for teams automating decisions.
- Human-in-the-loop pauses a workflow to get human approval before proceeding, balancing safety with speed.
- Use Send and Wait node to pause and notify via Slack (fast), email (formal), or custom webhook.
- Configure timeouts, escalations, and multi-tier approvals to handle edge cases and SLA violations.
- Self-hosted n8n requires a reverse proxy (Cloudflare Tunnel, Nginx) to make resume URLs reachable from outside your firewall.
- AI-scored approvals reduce manual reviews by routing low-risk items to auto-execute and high-risk to human gates.
Human-in-the-loop in n8n is a workflow pattern where you pause automation to let a person make a decision before proceeding. Your workflow triggers, processes data, then stops and asks: approve or reject? The person responds, and the workflow resumes from that exact point. It bridges the gap between fully automated systems (which miss edge cases) and fully manual ones (which are slow).
What is Human-in-the-Loop in n8n, and When Do You Use It?
Human-in-the-loop (HITL) is a decision gate inside a workflow. A trigger fires, the workflow runs up to a checkpoint, then pauses and notifies a human for input. The human approves or rejects. The workflow either continues or stops based on their choice. This is different from just logging data for someone to review later: the workflow itself waits.
When do you need this? Use HITL when the cost of error is high enough to justify a person's time. Financial approvals are the classic case: a workflow detects a refund request, but before executing a $500 payout, you want someone to eyeball it. AI-generated content is another: your workflow uses ChatGPT to draft a customer email, but you don't want to send it without human review. So too with data mutations: before a workflow deletes or modifies customer records in bulk, have someone confirm.
Why not just let the AI handle it? Because AI sometimes hallucinates, misinterprets context, or makes calls that look safe by one metric but risky by another. A human takes two seconds to spot the error. HITL is cheaper than the fallout.
Without HITL, you get either full automation (fast but risky) or full manual work (safe but painfully slow). HITL lets you automate the boring parts and have a human guard the important decision.
How the Wait Node Works: Pausing Workflows for Human Input
n8n gives you two main ways to pause: the Wait node and the Send and Wait node. Both freeze the workflow mid-execution and hold the execution state until something triggers a resume.
The Wait node is the simpler tool. You drop it into your workflow, configure it with a timeout (how long to wait before giving up), then route what happens next based on success or failure. The workflow simply pauses. By itself, the Wait node does not notify anyone: you have to add a notification node before it (like Send Slack Message) to tell a human they need to do something.
The Send and Wait node combines notification and waiting. You configure it to send a Slack message with approval buttons or an email with a resume link, then it waits for the recipient to click. When they do, the workflow resumes with their choice available as a variable. Send and Wait is what you use for most approval workflows.
Execution state during the wait is stored in n8n's database, not in RAM. That means if your server restarts while a workflow is paused, the execution does not vanish: it persists. When someone approves, the system looks up that execution record and resumes from the exact node where it paused. For self-hosted n8n, this requires the EXECUTIONS_DATA_SAVE_ON_WAIT environment variable set to true, so n8n knows to save execution state to disk.
Timeout handling is critical. Set a timeout value (e.g., 86400 seconds for 24 hours). If no one approves within that window, the workflow stops. You then route the timeout branch to either: continue (assume rejected), terminate (stop and log the failure), or escalate (send to a manager's queue). Most teams terminate and log, then set up an alert so a human investigates why the approval sat unreviewed.
On self-hosted instances, the resume URL that n8n generates must be accessible from the approver's browser. If your n8n instance is behind a firewall, you need a reverse proxy or tunnel (Cloudflare Tunnel, Ngrok, etc.) to make the resume endpoint reachable. This is a common self-hosted gotcha: everything works in development, then fails in production because the approval link times out before it can reach the internal server.
Approval via Slack: Send and Wait with Block Kit Buttons
Slack approval is the fastest way to build HITL for most teams. Send and Wait can post a Slack message with two buttons (or more if you configure it): "Approve" and "Reject". Click one, the workflow resumes.
To set it up: First, create a Slack app in your workspace and give it the chat:write and chat:write.public permissions. Copy the bot token and add it to n8n as a Slack credential. Next, in your workflow, add the Send and Wait node and select Slack as the destination. Configure the message text (keep it short and clear), then add the buttons. Each button is a key-value pair: button text (e.g., "Approve") maps to a response value (e.g., "approved"). When someone clicks, that value flows back into your workflow as $response.
Security matters here. Slack does not authenticate which user clicks the button by default: anyone in the channel sees the message. Use the "Limit to specific users" option to restrict who can click. Enter the Slack user IDs (not names) of people who should approve. n8n checks the click source and rejects unauthorized attempts.
What happens when you click? Slack handles the click on its end and sends a payload to n8n's webhook endpoint. n8n receives it, looks up the paused execution, and resumes the workflow with the response value set. The person who clicked sees immediate feedback in Slack (the message updates to show their choice).
Pros: Slack approvals are fast and low-friction. People see the message in their daily Slack feed, context is right there, and they click without leaving Slack. Cons: Slack is not persistent. If your approval message scrolls out of view or you archive the channel, the button stops working (Slack deletes the action endpoint). Also, Slack throttles interactive responses, so very high-volume approval workflows can hit rate limits.
Use Slack approval for routine decisions that need quick turnaround: expense reimbursements, content publication signoffs, minor refunds.
Approval via Email: Secure Links with Signed Tokens
Email approval is for decision-makers who do not live in Slack or need a formal paper trail. Send and Wait can email a resume link that the recipient clicks. The link contains a token that proves the response is authentic.
Here is how it works: n8n generates a unique resume URL with a signed token (HMAC-SHA256) that encodes the execution ID and the approval option (e.g., "approved" or "rejected"). The URL structure looks like: your-n8n-instance/api/v1/webhooks/resume/ABC123 with a token and response parameter appended. You embed this into an HTML email, so the recipient just clicks the link. When they do, the token is validated, the workflow resumes, and their choice is recorded.
Security considerations: Use POST requests, not GET. A GET request is idempotent in theory but terrible in practice: email scanners (Proofpoint, Safelinks) pre-fetch links to check for malware, which unintentionally triggers the approval. With POST, clicking the link opens a small page with an explicit button. Crawlers do not press buttons. Also, sign every token with your n8n instance secret so only valid resume URLs from your instance are honored.
Email is best for formal approvals: sign-offs that need a record, C-level decisions, or cases where Slack is not available. It is slower (email takes time to arrive and may be missed) but more reliable for documenting who approved what and when.
Common mistake: Sending the resume link in plain text. Use proper HTML email with a styled button so it looks official and the click target is clear. Also, include a summary of what is being approved in the email body. Someone opens their email, sees a link with no context, and might not know if they should click it.
AI Tool Approvals: Routing Decisions Before Human Review
This is where HITL gets smart. Instead of treating all approvals the same, use an AI tool (like Claude, OpenAI, or a local LLM) to score the decision before routing to a human. High-risk items go to a Slack approval. Low-risk items execute automatically. Medium-risk items might go to email for a slower review.
Example workflow: A tool generates content (social media posts, emails, etc.). Before posting, the workflow sends the content to Claude via the AI tools node. Claude scores it 1-10 on risk (is it brand-safe, does it make claims without evidence, etc.). The score flows into an If node: if score > 7, route to your company's CMO for Slack approval; if score 4-7, send email approval to a team lead; if score < 4, post automatically and log it.
This is not perfect AI judgment (AI still hallucinates). But it is a filter: it catches 80% of real issues before human review and lets routine items through. Your team approves 2 things a day instead of 50.
Another pattern: multi-tier escrow. For financial approvals, route to a first approver (team lead). If approved, route to a second approver (manager). Only after both sign off does the action execute. Set timeouts per tier so if the first approver misses the window, it escalates to the second, and if both miss it, it escalates to a VP or cancels.
AI approval layers require clear feedback loops. Log what the AI scored, what the human decided, and whether they matched. Over time, you retrain your model or adjust the thresholds based on false positives.
Building Your First Complete Approval Workflow
Let's build an invoice approval workflow from scratch. Here is the node sequence:
- Webhook Trigger: Receives a JSON payload with invoice details (amount, vendor, date).
- HTTP Fetch: Looks up the vendor in your database to verify legitimacy (optional but smart).
- Slack Message (notification only): Sends a quick summary to the finance channel saying an invoice arrived.
- Wait Node with Slack Send and Wait: Posts a message to the finance team lead with two buttons: "Approve" and "Reject". Sets a 24-hour timeout.
- If Node: Routes based on the response. If
$response == "approved", continue to step 6. If "rejected" or timeout, go to step 7. - HTTP POST (success path): Sends an API call to your accounting software to record and pay the invoice. Then routes to step 8.
- HTTP POST (rejection path): Logs the rejection, sends an email to the submitter explaining why it was declined, routes to step 8.
- Slack Notification (completion): Notifies the finance team that the invoice was processed (approved or rejected).
- Stop: End.
Test this locally first. Use the Manual Trigger to inject test invoices: one for $500 from a known vendor, one for $5000 from an unknown vendor, one for $50,000 to test high-value handling. Walk through the approval, confirm the right branch executes, and check that your accounting software received the correct data.
Common pitfalls: Forgetting to pass the invoice ID into the downstream HTTP call, so your accounting system does not know which invoice to pay. Putting the If node in the wrong place and routing rejection to the payment step. Setting the timeout too short (1 minute) and triggering escalation before anyone sees the message. Use a 24-hour or 48-hour default for most workflows.
Once it works locally, deploy it to your self-hosted or cloud n8n instance. Test with a small invoice first, then scale to real traffic.
Timeouts, Escalations, and Resume URLs on Self-Hosted Instances
When a workflow pauses on a Wait or Send and Wait node, what actually happens? The execution record is written to the database with a status of "waiting". Your n8n server keeps a background job that checks for expired timeouts. If a timeout expires and no resume signal has arrived, the job marks the execution as "timed out" and routes it to whatever you configured (stop, escalate, continue).
On self-hosted n8n, the resume URL generated by Send and Wait must be reachable from the internet. If your n8n server is on a private network inside your firewall, the generated resume link will use an internal IP address. An external user cannot click such a link. You need a reverse proxy.
Common solutions: Cloudflare Tunnel (easiest: one command and your internal server is reachable via a Cloudflare subdomain without opening ports). Nginx reverse proxy on a public server. Or ngrok for testing.
Set the N8N_URL environment variable to point to your external domain so n8n generates resume links using your public address instead of the internal one.
What happens on server restart? If your n8n process crashes or you restart it while workflows are paused, the paused executions do not vanish. They are in the database. When the server comes back up, it reads them and resumes them when triggered. This is why EXECUTIONS_DATA_SAVE_ON_WAIT is critical: without it, paused executions are stored in RAM and are lost on restart.
Database cleanup: Paused executions sit in your database until they are resumed or timeout expires. If you have thousands of old paused executions, consider archiving them or setting up a retention policy. Paused executions take disk space and slow down database queries if the table grows too large.
Troubleshooting Common HITL Issues
Slack message fails with "dispatch_failed" error: The webhook URL that n8n generated is not reachable, or the Slack token is invalid. Check that your Slack app token is current and that n8n can make outbound HTTPS requests (no firewall blocking it). If you are self-hosted, verify the N8N_URL is reachable from the internet.
Workflow loses context after the Wait node: You put data into a variable before the Wait node, but it is gone after. Reason: the If node or downstream nodes do not have that variable in scope. Solution: use a Set node right before the Wait node to consolidate all context into a single object. Example: { "invoiceId": $json.id, "amount": $json.amount, "vendor": $json.vendor }. After the Wait node, that object is accessible as $node["Set"].json.
Email approval links fire prematurely: Your company uses Safelinks or Proofpoint email scanning, which crawls links to check for malware. Clicking the link even once fulfills the approval. Solution: Use a POST-based resume URL, not GET. n8n sends the recipient to a form page with an explicit button; crawlers do not press buttons.
Multiple people click the same approval button: If you did not set "Limit to specific users," anyone in the Slack channel can click. The first click wins and the workflow resumes. The second click fails. Solution: always set "Limit to specific users" and enter the specific Slack user IDs (get these from the user profile in Slack).
Approval sits "waiting" forever and never times out: You set a timeout in the Wait node, but the workflow never triggered timeout logic. Reason: timeouts are checked by n8n's background job, which runs on a schedule. If you set the timeout value incorrectly (e.g., in milliseconds instead of seconds) or the job is not running (server crashed), timeouts do not fire. Check your n8n logs and verify the timeout is in seconds (86400 = 24 hours).
Frequently Asked Questions
What is the difference between the Wait node and Send and Wait?
The Wait node pauses a workflow. You add notification nodes separately (Slack, email) before it. Send and Wait combines notification and pause: it sends a message with buttons or a link, then waits for the response. Use Send and Wait for most approvals. Use Wait alone if you are integrating with a custom system that triggers the resume separately.
Can I have multiple approval steps in one workflow?
Yes. Add a Send and Wait node, route to an If node, then add another Send and Wait node after. Workflow can pause multiple times. Set different timeout values for each if needed. Use different Slack channels or email addresses to route different tiers of approval to the right people.
What happens if someone rejects an approval?
The If node sees the response value and routes to the rejection branch. You then decide: cancel the action, notify someone, escalate to a manager, or log it and move on. Build your If node with a case for each possible response and route accordingly.
Does HITL work on the free tier of n8n?
Yes, HITL works on Community (free) tier. The Wait and Send and Wait nodes are available. If you are self-hosting, there are no tier restrictions. If you use n8n cloud, check the plan to ensure Send and Wait and Slack integration are included.
How do I make sure approvals are logged for compliance?
Add a database node (PostgreSQL, MySQL, etc.) or a Google Sheets node after the approval and before the If node. Record the execution ID, the timestamp, who approved, and what was approved. This creates an audit trail. For higher security, use a dedicated audit logging service.
Can I use human-in-the-loop with AI agents?
Yes. An AI agent can run up to a decision point, then pause for human review. This is useful when an agent is making high-stakes decisions (financial, legal, safety-critical). Route the agent output to a human via HITL, then resume the agent with the human's input.
The Bottom Line
Human-in-the-loop is not a bottleneck: it is a safeguard. It lets you automate 80% of the work and have a person guard the 20% where errors matter. n8n's Wait and Send and Wait nodes make it straightforward to build, and Slack or email integrations put the approval right in front of whoever needs to make the call.
Start small. Build one approval workflow for your highest-risk process (financial, legal, or customer-facing). Get it working locally, test with real data, then deploy to production. Add more workflows as your team gets comfortable with the pattern.
For robust handling of approvals at scale, consider how execution state persists, timeouts are managed, and resume URLs are secured. On self-hosted instances, this means reverse proxies and proper environment configuration, but the payoff is control over data and no vendor lock-in.
Ready to build your approval workflow? Start by exploring how Opsily hosts n8n with reliable webhook handling and persistent storage for paused executions.