{
  "id": 15943701,
  "title": "n8n Guardian Gates: How Approval Workflows Prevent Agents from Sending the Wrong Invoice",
  "url": "https://urgent.news/2026/10/21/n8n-guardian-gates-how-approval-workflows-prevent-agents-from-sending",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-21T20:06:29.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/mech_app_ai/n8n-guardian-gates-how-approval-workflows-prevent-agents-from-sending-the-wrong-invoice-4bpo"
  },
  "original_language": "en",
  "account": "Small offices often draft 60 client emails per month, but inevitably one email contains the wrong amount. Undoing an email sent to a customer is impossible. Instead of manually checking every draft, a better solution is to implement a policy gate that separates draft generation from irreversible send actions. This ensures that the agent can read data, sort records, and compose text, while any action that affects a customer or deletes a record is blocked until a human approves it.\n\nUsing n8n and a third-party approval service called Guardian, you can enforce this policy. Guardian acts as a gate in front of the irreversible send action, returning one of three responses: Allowed, Needs approval, or Denied. The workflow continues to the send action only if Guardian returns Allowed, or pauses at the approval step if Guardian returns Needs approval or Denied.\n\nTo implement the approval gate, place a Guardian node between draft generation and the send action. The approval flow involves triggering the workflow with a schedule or webhook, having the agent draft the email using an LLM node, then sending the payload to the Guardian API for policy evaluation. The workflow branches based on Guardian's response, allowing the email to be sent if Allowed, pausing for approval if Needs approval, or denying and logging the action if Denied.\n\nThe Guardian policy is defined in JSON rules that match on payload fields. For client emails, the policy might include conditions for client vs. internal recipients and actions like send, delete, or update. The payload sent to Guardian should include all necessary information for a human reviewer without requiring additional queries to the CRM or accounting system.\n\nIf an approval request remains unanswered for 24 hours, Guardian supports timeout policies to auto-deny, auto-approve (for low-stakes actions), or escalate to a manager. In n8n, handle expiration by listening for Guardian's timeout webhook and logging the event, with the option to retry the approval request with a different reviewer if needed.\n\nIf a failure occurs after approval, such as a send action error, the approval token should be single-use. If the send fails, log the error and do not retry without a new approval to prevent accidental double-sends. State management is crucial—store drafts in the Guardian payload, an n8n database, or an external store like S3 or Redis, depending on draft size and scalability requirements. Finally, ensure observability by setting up logging and monitoring for workflow performance and approval outcomes.",
  "summary": "An agent that drafts 60 client emails a month will eventually send one with the wrong amount. You cannot unsend an email to a customer. The standard workaround is to check every draft by hand, which turns a 10-minute automation into a 3-hour review session. The better pattern is a policy gate that separates draft generation from irreversible send actions. Let the agent read data, sort records,…",
  "key_points": [
    "n8n workflow prevents agents from sending wrong invoices",
    "Guardian acts as approval gate, returns Allowed/Needs approval/Denied",
    "JSON policy rules define conditions for client vs. internal recipients"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}