Human-in-the-Loop (HITL) approval lets an AI email workflow prepare a draft for a person to review. It gives that proposal a stable approval ID, stores it with a pending state, shows a reviewer enough context to decide, waits for a response, and only then allows the workflow to claim a send attempt.
Partner disclosure. This guide includes a partner link to n8n Cloud. If you sign up through it, FloxoLab may earn a commission at no extra cost to you.
Short answer: in n8n, use Gmail Send and Wait for Approval for a simple approve-or-reject gate. Use a Wait node with On Form Submitted plus a Data Table when the reviewer also needs to edit, reject with a reason, or let the request expire.
| Need | Best starting pattern | Important limit |
|---|---|---|
| Approve or reject only | Gmail Message → Send and Wait for Approval | Good for a simple decision, not a full edit-and-escalation process |
| Approve, edit, reject, or timeout | Data Table + reviewer notification + Wait form | The form link is sensitive and the documented form mode has no authentication setting |
| Identity-proof approval | Wait webhook with Basic, Header, or JWT auth, or an authenticated internal portal | More setup, but the reviewer identity is stronger than a typed email address |
The safe workflow architecture
Trigger or incoming request → AI creates proposed subject and body → Validate recipient, policy, and required fields → Ledger: create or reuse pending approval_id → Notify reviewer with safe context and resume URL → Wait: On Form Submitted, with a time limit → Switch: approve / edit / reject / timeout → Revalidate the saved, approved message → Ledger: approved or approved_edited → sending → Gmail: one attempt for the claimed send → Ledger: sent, send_failed, or send_unknown
This guide begins after an AI draft already exists. It is separate from classifying and routing incoming email. The approval gate controls an outbound action that could reach a customer, supplier, applicant, or lead.
A similar separation matters in software delivery. See how Claude Ship and Codex handle pull requests when review findings, fixes and approval belong to different parts of the workflow.
Why the model must not connect directly to Send
A language model can produce fluent text while using the wrong price, recipient, promise, date, or tone. Prompt instructions help, but they do not create an operational control. If the model node connects directly to Gmail Send, a bad draft can leave the business before anyone sees it.
Put validation and approval between generation and delivery. Validate machine-checkable rules first, such as an allowed recipient domain, non-empty subject, maximum length, banned attachments, and required account references. Then ask the human to judge the parts that need context.
Step 1: start with the simplest n8n setup
For a small team that does not want to maintain a server, n8n Cloud is the easiest starting point. n8n describes Cloud as the option where it handles the infrastructure. Create one workflow, connect the AI provider you already use, add a Gmail credential, and test only with internal addresses until every branch behaves correctly.
If the decision is only approve or reject, test Gmail Message → Send and Wait for Approval first. The current Gmail node supports an Approve Only mode and an Approve and Disapprove mode. n8n itself recommends the Wait node for more complex approvals, which is the full pattern below.
Step 2: turn the AI output into a real draft record
Add an Edit Fields node after the model and keep only the fields needed for review. Derive approval_id from a stable source event or record ID, message purpose and stored approval revision. For example, hash a canonical encoding of [source_record_id, message_purpose, approval_revision]. Use a source ID that includes the originating system if IDs can overlap. A UUID also works if created once and saved against that unique tuple before sending the reviewer notification. Store the original revision with the triggering event or review request. On a replay, reuse that revision, ID and draft even if a newer revision exists. A new random UUID on every execution cannot deduplicate retries.
approval_id recipient subject_proposed body_proposed source_record_id message_purpose approval_revision status created_at expires_at
Create the initial row with status = pending and store expires_at as a UTC date-time. If the ID already exists, keep its content, state and deadline. A replay must neither reset the row to pending nor issue a second independent review. A deliberate replacement gets a new revision and approval.
Gmail also has a separate Draft resource. The current n8n Gmail Draft operations document create, delete, get, and list. They do not document a built-in Draft Send operation. Use a provider-side Gmail draft only as an optional inspectable copy unless you deliberately add the Gmail API users.drafts.send call. Do not assume a Gmail Draft node automatically delivers the draft later.
Step 3: create the approval table
For a first version, create an email_approvals Data Table with these columns:
approval_id source_record_id message_purpose approval_revision recipient subject_proposed body_proposed subject_approved body_approved status reviewer decision_reason created_at expires_at decided_at send_attempt_id sending_started_at sent_at provider_message_id
The Data Table node supports conditional updates and upserts. Use it as the ledger only when all writers to an approval are serialized, including retries and replacements. An existence check followed by an insert can race, and upsert can overwrite a decision. The node docs do not guarantee atomic compare-and-set, custom-key uniqueness or multi-row transactions. If writers can overlap, use a transactional database with a unique approval key and make the state change and claim a single conditional update that returns the row it changed.
Step 4: notify the reviewer and pause
Send the reviewer an internal email containing the approval ID, recipient, proposed subject, a safe excerpt, expiry time, and the Wait form link. The Wait node exposes $execution.resumeUrl, which is unique to the execution. The node that sends this link must run in the same execution as the Wait node.
Configure Wait → On Form Submitted with:
- A required dropdown named
decisionwithApprove,Edit, andReject. - An optional text field for the approved subject.
- An optional textarea for a revised body.
- An optional rejection reason.
- A reviewer identifier for the audit log.
- Limit Wait Time → At Specified Time set to the stored
expires_at, such as 24 hours after creation.
If the reviewer chooses Edit but provides no replacement body, do not send. Keep it out of Send and route it to manual review. A corrected submission requires a valid review decision. n8n's form fields are not documented as conditionally required, so enforce this rule after submission with an If or Switch node.
Treat the resume URL like a secret. The Wait form documentation does not list the Basic, Header, or JWT authentication choices available in the webhook mode. Do not post the link in a broad channel. For sensitive approvals, use an authenticated webhook or internal portal and record the authenticated user.
Step 5: branch every possible outcome
| Outcome | State change | Next action |
|---|---|---|
| Approve | pending → approved |
Copy the proposed subject and body into approved fields |
| Edit | pending → approved_edited |
Validate and store the human replacement before sending |
| Reject | pending → rejected |
Store the reason; never connect this branch to Send |
| No form data at the limit | pending → expired |
Escalate or create a fresh approval request, never auto-approve |
When Wait resumes, reload the approval by its original ID. Accept a decision only while that row is still pending and its stored UTC deadline is in the future. Persist the decision only if those same conditions still hold at the write. After the deadline, mark the pending row expired even if a decision arrived. If the row is still current but the decision is missing or invalid, stop and route it to review.
Email is the clearest reviewer channel for this example. Slack, Telegram, Google Chat, email, or a webhook can carry an alert, but do not assume every notification node has the same approval features. Keep the decision state and send guard in the workflow even when the alert channel changes.
Step 6: prevent duplicate clicks and duplicate sends
Immediately before the send claim, reload and revalidate the final approved payload, including a human-edited subject and body. Check the stored recipient and any allowed CC/BCC, subject, length, required references, links and attachment rules. Use only the approved fields for Send. If validation fails, block the attempt and route it to review. A changed payload needs fresh approval. In the serialized version, use Data Table Update with All Conditions:
approval_id = current ID status = approved (or approved_edited in its own branch) expires_at > current UTC time Update: status = sending send_attempt_id = new ID for this attempt sending_started_at = current UTC time
Use separate branches for approved and approved_edited so the ID, expected state and expiry must all match. Proceed only if one row was changed. In a transactional implementation, return the approved payload from that same atomic claim and keep it immutable while sending. sending, send_failed, send_unknown, sent, rejected and expired must never trigger another send directly.
On the Gmail Send node, turn off Retry On Fail when the provider offers no idempotency guarantee. Under Gmail Send options, turn off Append n8n attribution, which is enabled by default. Put any required disclosure or trace reference into the draft before approval. Once Gmail accepts the send, update the row to sent and store provider_message_id and sent_at. Apply each result only to its matching send_attempt_id.
A provider-side draft is optional. If you use users.drafts.send, store one draft ID per approval and verify the draft still matches the approved payload. Gmail’s draft ID is stable even when the underlying message changes. A successful send removes the draft and creates a new Sent message. This does not establish exactly-once delivery. A missing draft by itself does not prove that Gmail sent it.
Gmail Message Send has no documented idempotency-key field. After a timeout or a lost response, search Sent mail by a reference included in the approved subject or body and verify the message. If no matching message appears, keep the result unresolved. Do not resend from the Gmail node, or from an execution retry that would bypass the claim.
Handle failure after approval
| Failure | Safe response |
|---|---|
| Recipient or payload validation fails | Return to review with the reason. Leave Send blocked until validation and any fresh approval pass. |
| Credential or definite provider rejection | sending → send_failed only when Gmail definitively did not accept the message. After repair, an operator can restore approved or approved_edited for the identical, still-valid payload. Revalidate and claim a new attempt. |
| Provider timeout with an uncertain result | sending → send_unknown. Reconcile to sent when acceptance is confirmed, or to send_failed only when non-acceptance is confirmed. Otherwise keep it blocked. |
| Email sends, audit update fails | Keep it at sending until the recorded attempt can be reconciled. Move a stale, unresolved attempt to send_unknown without reopening it for sending. |
| Reviewer link expires | Keep the old ID blocked. Create a fresh revision only after closing the old approval. |
When issuing a replacement, mark the old eligible row expired and create the new revision with a new ID and deadline in the same transaction, or under the same serialized writer. An already expired row stays closed. Revoke the old token where you control it. Even if a Wait URL still resumes an execution, the state and deadline checks block the old decision. If the old attempt is sending or send_unknown, resolve it before creating another approval for the same message.
This is the same reason duplicate-safe API retries need a persistent ledger. A timeout is not proof of failure. Use the deeper n8n API retry guide when the final email provider is called through HTTP Request or another state-changing API.
Test the approval workflow before using real recipients
| Test | Expected result |
|---|---|
| Approve unchanged | One email uses the proposed subject and body; audit row becomes sent |
| Edit subject and body | Only the human-approved values are delivered and stored |
| Choose Edit with no body | No send; request returns to review |
| Reject | No send; reason and reviewer are recorded |
| Let the request expire | No send; status becomes expired and the owner is alerted |
| Submit or click twice | For the same approval, only one attempt may claim the send. Run concurrent tests against the transactional version, where the claim is atomic. |
| Fail Gmail after approval | The workflow records failed or unknown, alerts an owner, and does not blind-retry |
| Retry the execution | sent, sending and send_unknown block another send. |
| Submit an edit that breaks a send rule | The final validation blocks Gmail and returns the request to review. |
| Submit the old link after creating a replacement | The old ID stays expired. A decision on it cannot approve the replacement. |
Privacy and audit rules
The Wait node offloads paused execution data to the n8n database and reloads it when the workflow resumes. That means every upstream field carried into the wait can remain in stored execution data. Reduce the item before the wait. Do not carry a full mailbox thread, attachments, payment details, health information, or unrelated customer history when the reviewer only needs a short excerpt and a secure system link.
- Store the approval ID, decision, approved content hash or final content, reviewer, and timestamps.
- Treat a reviewer name typed into an open form as self-reported, not authenticated identity.
- Execution data redaction is available on n8n Enterprise, both Cloud and self-hosted. It hides node payloads while keeping execution metadata visible. It does not remove the data from storage. On Starter, Pro, Business and Community, minimize payloads and configure which finished executions to save.
- Set a retention policy for the approval table and execution history.
- Keep successful execution data only as long as operations and audit needs require.
n8n enables pruning of finished execution data by default. Its documented self-hosted defaults are 14 days by age and 10,000 finished executions by count, while waiting executions are not eligible for pruning. The approval timeout is therefore an operating control as well as a reviewer deadline.
Practical questions
Can the AI send automatically after enough approvals?
You can later auto-send low-risk categories, but earn that exception with real review data. Start by measuring edit rate, rejection rate, send failures, and the types of mistakes reviewers catch. Keep high-value, legal, financial, hiring, complaint, and unusual-recipient messages behind approval.
Should the approval live in email or chat?
Use the channel the responsible person already monitors, but keep the durable state in the workflow or business system. An alert is not the audit record. For a simple decision, Gmail's built-in approval operation is convenient. For edits, timeouts, and stronger identity, use the Wait pattern or an authenticated portal.
Is the n8n execution history enough for an audit?
Usually not by itself. Execution retention can be changed or pruned, and open form identity may be self-reported. Keep a compact business audit row with the approval ID, final decision, final approved content or hash, reviewer identity level, timestamps, and provider result.
Sources checked
We rechecked the Wait, Data Table, Gmail and data-redaction documentation on November 29, 2026.
- n8n Cloud and self-hosted setup choices
- n8n Wait node resume modes, unique resume URL, authentication, forms, and time limits
- n8n Gmail Send and Wait for Approval and Message Send operations
- n8n Gmail Draft operations
- n8n Data Table conditional row updates and upserts
- n8n workflow execution saving, timeout, and redaction settings
- n8n execution data reduction and pruning behavior
- Google Gmail API draft creation, update, and send behavior
n8n Cloud for small teams
Test the approval gate without maintaining a server
n8n Cloud is the simplest starting point if you want to focus on review states, safe sends, and testing instead of hosting. Affiliate disclosure: FloxoLab may earn a commission if you sign up through this link, at no extra cost to you.
Need the approval states mapped before launch?
Send the trigger, draft fields, reviewer channel, email provider, deadline, and failure rules. We will help define the smallest approval workflow that keeps customer email under human control.
Map the approval gate