How to implement human-in-the-loop workflows on n8n
Human-in-the-loop workflows in n8n allow manual intervention in automated processes using Wait nodes, webhooks, and approval mechanisms. This enables human decision-making at critical points while maintaining automation efficiency.
Prerequisites
- Active n8n instance running
- Basic understanding of n8n workflow creation
- Access to webhook URLs
- Email or Slack integration configured
Step-by-Step Instructions
Create a new workflow with trigger
Add data processing nodes
Insert a Wait node for human intervention
Create notification mechanism
- Summary of the data requiring review
- The webhook URL for responding
- Instructions for approval/rejection
- Any relevant context or attachments
Build approval interface or form
- Approval/rejection options
- Comment fields for feedback
- Hidden fields to pass through original data
Process human decisions
{{ $json.decision === 'approved' }}). Create separate branches for:- Approved items - continue with automation
- Rejected items - send to different process or stop
- Timeout cases - handle expired decisions
Implement post-decision actions
Test and monitor the workflow
- Notifications are sent correctly
- The approval interface works
- Both approval and rejection paths function properly
- Timeout handling works as expected
Common Issues & Troubleshooting
Wait node times out before human can respond
Increase the timeout period in the Wait node settings or implement a notification reminder system before timeout occurs. Consider using Cron nodes to send reminder notifications.
Webhook URL not receiving responses from approval form
Verify the webhook URL is accessible and check CORS settings if using web forms. Ensure the form is sending data as JSON with correct Content-Type headers. Test the webhook URL directly using tools like Postman.
Human reviewer not receiving notification emails
Check email node configuration and verify SMTP settings. Ensure email addresses are correct and check spam folders. Test email delivery with a simple message first, then add workflow context.
Workflow execution hanging or not resuming after approval
Check that the webhook response data matches the expected format in subsequent nodes. Verify the IF node conditions are correctly configured. Review execution logs for any errors in data processing after the Wait node.