Build with AI

How do you keep a human in the loop on an automation?

· By Robert Scales · 4 min read

Short answer

Add a step that pauses the workflow after the AI has done its part and before anything leaves your hands, sends the draft to a person, and continues only if that person approves. In n8n, the Gmail node's Send and Wait for Approval operation does this in one step, and the Wait node handles longer or more detailed reviews.

"Human in the loop" means a person checks the work at a chosen point before an automated process continues. With AI in a workflow, that point matters more than ever. A language model can draft a reply, sort a request or fill in a form in seconds, but it can also misread a message, invent a detail or strike the wrong tone, and it does so with the same confidence as when it is right.

The fix is not to remove the AI. It is to let it prepare the work and keep the decision with a person: the workflow pauses, someone reads the draft, and nothing goes out until they click approve. This guide builds that in n8n, a visual workflow automation tool that connects apps through a chain of steps called nodes.

The pattern: draft, pause, decide

Every approval flow has the same four parts:

  1. A trigger, the event that starts the workflow, such as a new form entry or email.
  2. An AI step that prepares something: a draft reply, a summary, a suggested category.
  3. A pause that sends the draft to a reviewer and waits.
  4. A branch that does one thing if the reviewer approves and another if they decline.

n8n offers two ways to build the pause. The Gmail node has an operation called Send and Wait for Approval: it emails a person a message with an approval button, and the workflow stops until they click it. You can choose Approve Only, or Approve and Disapprove for two buttons, and rename the buttons. n8n's documentation recommends it for simple approvals. For anything more involved, the Wait node can pause until a form is submitted, until a link is called, or until a set time, and it saves the workflow's data while it waits, so a review can take hours or days.

A worked example: approving AI replies to customer questions

Here is a small workflow for a business that receives questions through a website form. Names and wording are illustrative.

#NodeSettings
1Form or webhook triggerReceives the customer's name, email and question
2OpenAI, Message a ModelPrompt below; your OpenAI credential
3Gmail, Send and Wait for ApprovalTo: the reviewer; Subject: "Reply to approve"; Message: the question and the draft; Type of Approval: Approve and Disapprove
4IFSplits on the reviewer's answer
5aGmail, Send (approved branch)Sends the draft to the customer
5bNote or task (declined branch)Logs the question for a person to answer by hand

The prompt in step 2 sets the AI's limits as clearly as the reviewer's job:

Prompt
You draft replies for a small bookkeeping office. Write a short, polite reply
(under 120 words) to the customer question below.
- Use only the facts in the "Office facts" section. If the answer is not there,
  say a staff member will follow up within one business day.
- Never quote prices, deadlines or tax advice.
- Sign as "The office team".

Office facts: Open Monday to Friday, 9 to 5. Documents can be dropped off or
uploaded through the client portal.

Customer question: {{ $json.question }}

The {{ $json.question }} part is an n8n expression: it inserts the question from the trigger. In step 3, put both the original question and the draft in the email body so the reviewer can judge the reply without opening anything else.

Before you build the IF node in step 4, run the workflow once with a test question and look at the output of the approval step in the execution view. That shows you exactly which field holds the answer, so the condition you write matches what the node really returns.

Two settings keep the workflow safe. Credentials, the stored logins for OpenAI and Gmail, live in n8n's credential store, never in a prompt or a note. And the declined branch should do something useful, such as creating a task, so a rejected draft never simply disappears.

Try it: Build steps 1 to 3 with yourself as the reviewer and send three test questions: one the office facts answer, one about prices, and one off-topic. Approve only the replies you would send unchanged, and note what the AI got wrong in the others. Those notes are your next prompt revision.

Choosing between the two kinds of pause

Send and Wait for Approval is quickest when the decision is yes or no and the reviewer works from email. Switch to the Wait node when you need more: its On Form Submitted option can ask the reviewer for an edited version or a reason, and On Webhook Call gives each run a unique resume link ($execution.resumeUrl) that you can place in a chat message or another tool, protected by authentication if you wish. The Wait node's Limit Wait Time setting makes the workflow carry on after a set period, so connect that path to a safe default, such as "do not send, alert a person," rather than to the send step.

Where should approval steps go?

Put a pause just before any action you cannot take back or that others will see: sending an email or message, publishing a post, paying or refunding, deleting records, or changing data in another system. Those are the moments when an AI mistake stops being a draft and becomes an event.

Put it after the AI step, not before. The reviewer should judge the finished draft, with the original input beside it, rather than approve a request and hope the output is fine. If a workflow has several AI steps, one review of the final result usually beats several reviews of intermediate pieces, which people quickly learn to click through.

Finally, match the pause to the risk. Internal summaries for your own reading may need no approval at all. Replies to customers, anything involving money, and anything sent in your name deserve one every time, at least until you have reviewed enough runs to trust the pattern, and you should keep sampling them after that.

Sources

  1. Gmail node message operations (n8n docs, commit a7dc52d) — n8n Docs (GitHub), February 11, 2025
  2. Wait node (n8n docs, commit a7dc52d) — n8n Docs (GitHub), February 11, 2025
  3. OpenAI node documentation — n8n Docs, September 16, 2024

Get the free Guide to Artificial Intelligence

Sign up for the weekly newsletter and receive the free guide: what changed in AI this week, one lesson, one prompt to try. Unsubscribe in one click.

How we handle your address

Back to top

Display

Your choices are saved in this browser only. No data is sent.

Text size
100%
Colours
Reading
More settings
Accessibility statement