{"workflow":{"id":13847,"name":"Production AI Playbook: Human Oversight (Exercise 1)","views":243,"recentViews":2,"totalViews":243,"createdAt":"2026-03-03T22:06:18.363Z","description":"Review AI-drafted customer responses before they go out. This template sets up a chat-based approval flow where an AI agent drafts a reply and a human reviewer approves or rejects it, all within the n8n chat interface.\n\n**What you'll do**\n- Send a customer support message to the AI agent and watch it draft a response.\n- Review the AI's draft in the chat with Approve and Decline buttons.\n- See how approved responses flow forward while declined ones get flagged.\n\n**What you'll learn**\n- How to use the Chat Trigger to start AI-powered conversations\n- How the Chat node's \"Send and Wait for Response\" operation pauses workflows for human input\n- How IF nodes route workflows based on approval decisions\n- How to connect an AI Agent to an LLM (OpenRouter) for response generation\n\n**Why it matters**\nEvery customer-facing message deserves a human sanity check. This template gives you a lightweight approval flow that catches AI mistakes before they reach your customers, without slowing your team down.\n\nThis template is a learning companion to the Production AI Playbook, a series that explores strategies, shares best practices, and provides practical examples for building reliable AI systems in n8n.  \n\n[Link to blog](https://go.n8n.io/PAP-HO-Blog)\n","workflow":{"meta":{"instanceId":"da13b80f35ed9d16adbf337111fadd798f3c80e989940f27089cab3947e57699","templateCredsSetupCompleted":true},"nodes":[{"id":"f5350dfb-7df6-4f5b-a0a3-c4262477ee8e","name":"When chat message received","type":"@n8n/n8n-nodes-langchain.chatTrigger","position":[256,480],"webhookId":"b8fb693f-cb00-4782-9529-d1b9b6a8fe72","parameters":{"options":{"responseMode":"responseNodes"}},"typeVersion":1.4},{"id":"77f32376-29e1-4d45-8ef9-6526b3924781","name":"AI Agent","type":"@n8n/n8n-nodes-langchain.agent","position":[480,480],"parameters":{"options":{"systemMessage":"You are a customer support assistant. When a user shares a customer email or inquiry, draft a professional, helpful response. Be concise, empathetic, and accurate. Never promise features that don't exist or offer discounts unless explicitly authorized. If the inquiry is unclear, ask the user for clarification before drafting a response."}},"typeVersion":3.1},{"id":"37c546d1-e7ab-4f8b-aa5e-e5e04de1670e","name":"OpenRouter Chat Model","type":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","position":[560,704],"parameters":{"options":{}},"credentials":{"openRouterApi":{"id":"m9IRh1pT1eHIdKoX","name":"OpenRouter account 2"}},"typeVersion":1},{"id":"45dd0c5e-78ce-4538-af77-a56fea41275a","name":"If","type":"n8n-nodes-base.if","position":[1056,480],"parameters":{"options":{},"conditions":{"options":{"version":3,"leftValue":"","caseSensitive":true,"typeValidation":"loose"},"combinator":"and","conditions":[{"id":"b57dcf1c-6baa-4241-b7e1-6ae5048ef7a9","operator":{"type":"boolean","operation":"true","singleValue":true},"leftValue":"={{ $json.data.approved }}","rightValue":"true"}]},"looseTypeValidation":true},"typeVersion":2.3},{"id":"04626316-5bac-4924-b65e-e521a9394d83","name":"Gmail - Send Reply","type":"n8n-nodes-base.gmail","position":[1280,384],"webhookId":"0748266f-cb74-45bf-9617-18bce1895a9a","parameters":{"sendTo":"={{ $json.email || \"customer@example.com\" }}","message":"={{ $(\"AI Agent\").first().json.output }}","options":{},"subject":"Re: Your Support Request","emailType":"text"},"credentials":{"gmailOAuth2":{"id":"e6sLCNDapWQ113iL","name":"Gmail account"}},"typeVersion":2},{"id":"a46cc0e1-8e67-4a07-ab24-585e81a231b2","name":"Rejected Response","type":"@n8n/n8n-nodes-langchain.chat","position":[1280,576],"webhookId":"2cb5533b-ac68-4f34-9ea7-946f8f3ec0aa","parameters":{"message":"Response was rejected. Please provide revision feedback and resubmit.","options":{}},"typeVersion":1.2},{"id":"f9d0c2ec-c7bf-4bdf-9479-bb48391575f7","name":"Approved Response","type":"@n8n/n8n-nodes-langchain.chat","position":[1504,384],"webhookId":"00d4b786-dac7-4692-bbf6-713637ce1b36","parameters":{"message":"Response approved and sent to the customer.","options":{}},"typeVersion":1.2},{"id":"9b4ba9ab-feb1-4d09-a574-d75af19fd382","name":"Human Approval","type":"@n8n/n8n-nodes-langchain.chat","position":[832,480],"webhookId":"e360b40f-09b7-4de9-991e-6bd876b5487a","parameters":{"message":"=**Draft Response for Review**\n\n{{ $json.output }}\n\nPlease review the AI-generated response above and approve to send to the customer, or reject to revise.","options":{"limitWaitTime":{"values":{"resumeAmount":4}}},"operation":"sendAndWait","responseType":"approval","approvalOptions":{"values":{"approvalType":"double","approveLabel":"Send to Customer","disapproveLabel":"Revise"}}},"typeVersion":1.2},{"id":"5f0cca1b-e43d-44d2-820d-02931dd9f782","name":"Sticky Note","type":"n8n-nodes-base.stickyNote","position":[-400,256],"parameters":{"width":560,"height":720,"content":"## Customer Support Email Review with Chat Approval\n\n### How it works\n1. **Chat Trigger** receives a customer support scenario via the built-in chat interface.\n2. **AI Agent** drafts a professional email response using the connected LLM.\n3. **Human Approval** node presents the draft in chat with Approve/Reject buttons. The workflow pauses here.\n4. **IF node** routes based on the decision: approved drafts are sent via Gmail, rejected drafts are flagged for manual revision.\n\n### Setup\n- Connect your **LLM credentials** (e.g., OpenRouter, OpenAI) to the Chat Model node\n- Connect your **Gmail credentials** to the Gmail - Send Reply node\n- Set the Chat Trigger's Response Mode to \"Using Response Nodes\"\n- (Optional) Enable \"Limit Wait Time\" on the Human Approval node to prevent indefinite waits\n\n### Customization\n- Swap Gmail for another email provider (Outlook, SMTP)\n- Adjust the AI Agent's system prompt to match your company's tone and policies\n\n\nThis template is a learning companion to the Production AI Playbook, a  series that explores strategies, shares best practices, and provides practical examples for building reliable AI systems in n8n.  \n\n[Link to blog](https://go.n8n.io/PAP-HO-Blog)\n"},"typeVersion":1},{"id":"cdc3acd8-ae03-4512-8011-4321fbd463c1","name":"Sticky Note1","type":"n8n-nodes-base.stickyNote","position":[208,368],"parameters":{"color":7,"width":544,"height":480,"content":"## Draft Response"},"typeVersion":1},{"id":"bead3a0f-64a5-417b-ba2a-c053ef95ee17","name":"Sticky Note2","type":"n8n-nodes-base.stickyNote","position":[784,368],"parameters":{"color":7,"width":208,"height":480,"content":"## Human Review"},"typeVersion":1},{"id":"8ca1ea87-8cd3-4507-b6fb-d2b6ece0cb9a","name":"Sticky Note3","type":"n8n-nodes-base.stickyNote","position":[1024,368],"parameters":{"color":7,"width":688,"height":480,"content":"## Route and Send"},"typeVersion":1}],"pinData":{},"connections":{"If":{"main":[[{"node":"Gmail - Send Reply","type":"main","index":0}],[{"node":"Rejected Response","type":"main","index":0}]]},"AI Agent":{"main":[[{"node":"Human Approval","type":"main","index":0}]]},"Human Approval":{"main":[[{"node":"If","type":"main","index":0}]]},"Gmail - Send Reply":{"main":[[{"node":"Approved Response","type":"main","index":0}]]},"OpenRouter Chat Model":{"ai_languageModel":[[{"node":"AI Agent","type":"ai_languageModel","index":0}]]},"When chat message received":{"main":[[{"node":"AI Agent","type":"main","index":0}]]}}},"lastUpdatedBy":29,"workflowInfo":{"nodeCount":12,"nodeTypes":{"n8n-nodes-base.if":{"count":1},"n8n-nodes-base.gmail":{"count":1},"n8n-nodes-base.stickyNote":{"count":4},"@n8n/n8n-nodes-langchain.chat":{"count":3},"@n8n/n8n-nodes-langchain.agent":{"count":1},"@n8n/n8n-nodes-langchain.chatTrigger":{"count":1},"@n8n/n8n-nodes-langchain.lmChatOpenRouter":{"count":1}}},"status":"published","readyToDemo":null,"user":{"name":"Elvis Sarvia","username":"elvissaravia","bio":"","verified":true,"links":[],"avatar":"https://gravatar.com/avatar/ea69c5850ff18c010244a46216d72964c80a8d752fafefe2be114bdf6d05ae8a?r=pg&d=retro&size=200"},"nodes":[{"id":20,"icon":"fa:map-signs","name":"n8n-nodes-base.if","codex":{"data":{"alias":["Router","Filter","Condition","Logic","Boolean","Branch"],"details":"The IF node can be used to implement binary conditional logic in your workflow. You can set up one-to-many conditions to evaluate each item of data being inputted into the node. That data will either evaluate to TRUE or FALSE and route out of the node accordingly.\n\nThis node has multiple types of conditions: Bool, String, Number, and Date & Time.","resources":{"generic":[{"url":"https://n8n.io/blog/learn-to-automate-your-factorys-incident-reporting-a-step-by-step-guide/","icon":"🏭","label":"Learn to Automate Your Factory's Incident Reporting: A Step by Step Guide"},{"url":"https://n8n.io/blog/2021-the-year-to-automate-the-new-you-with-n8n/","icon":"☀️","label":"2021: The Year to Automate the New You with n8n"},{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/create-a-toxic-language-detector-for-telegram/","icon":"🤬","label":"Create a toxic language detector for Telegram in 4 step"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-build-a-low-code-self-hosted-url-shortener/","icon":"🔗","label":"How to build a low-code, self-hosted URL shortener in 3 steps"},{"url":"https://n8n.io/blog/automate-your-data-processing-pipeline-in-9-steps-with-n8n/","icon":"⚙️","label":"Automate your data processing pipeline in 9 steps"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/5-tasks-you-can-automate-with-notion-api/","icon":"⚡️","label":"5 tasks you can automate with the new Notion API "},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/automation-for-maintainers-of-open-source-projects/","icon":"🏷️","label":"How to automatically manage contributions to open-source projects"},{"url":"https://n8n.io/blog/how-uproc-scraped-a-multi-page-website-with-a-low-code-workflow/","icon":" 🕸️","label":"How uProc scraped a multi-page website with a low-code workflow"},{"url":"https://n8n.io/blog/5-workflow-automations-for-mattermost-that-we-love-at-n8n/","icon":"🤖","label":"5 workflow automations for Mattermost that we love at n8n"},{"url":"https://n8n.io/blog/why-this-product-manager-loves-workflow-automation-with-n8n/","icon":"🧠","label":"Why this Product Manager loves workflow automation with n8n"},{"url":"https://n8n.io/blog/sending-automated-congratulations-with-google-sheets-twilio-and-n8n/","icon":"🙌","label":"Sending Automated Congratulations with Google Sheets, Twilio, and n8n "},{"url":"https://n8n.io/blog/how-to-set-up-a-ci-cd-pipeline-with-no-code/","icon":"🎡","label":"How to set up a no-code CI/CD pipeline with GitHub and TravisCI"},{"url":"https://n8n.io/blog/benefits-of-automation-and-n8n-an-interview-with-hubspots-hugh-durkin/","icon":"🎖","label":"Benefits of automation and n8n: An interview with HubSpot's Hugh Durkin"},{"url":"https://n8n.io/blog/aws-workflow-automation/","label":"7 no-code workflow automations for Amazon Web Services"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-base.if/"}]},"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Flow"]}}},"group":"[\"transform\"]","defaults":{"name":"If","color":"#408000"},"iconData":{"icon":"map-signs","type":"icon"},"displayName":"If","typeVersion":2,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":356,"icon":"file:gmail.svg","name":"n8n-nodes-base.gmail","codex":{"data":{"alias":["email","human","form","wait","hitl","approval"],"resources":{"generic":[{"url":"https://n8n.io/blog/why-business-process-automation-with-n8n-can-change-your-daily-life/","icon":"🧬","label":"Why business process automation with n8n can change your daily life"},{"url":"https://n8n.io/blog/supercharging-your-conference-registration-process-with-n8n/","icon":"🎫","label":"Supercharging your conference registration process with n8n"},{"url":"https://n8n.io/blog/no-code-ecommerce-workflow-automations/","icon":"store","label":"6 e-commerce workflows to power up your Shopify s"},{"url":"https://n8n.io/blog/how-to-get-started-with-crm-automation-and-no-code-workflow-ideas/","icon":"👥","label":"How to get started with CRM automation (with 3 no-code workflow ideas"},{"url":"https://n8n.io/blog/automate-google-apps-for-productivity/","icon":"💡","label":"15 Google apps you can combine and automate to increase productivity"},{"url":"https://n8n.io/blog/your-business-doesnt-need-you-to-operate/","icon":" 🖥️","label":"Hey founders! Your business doesn't need you to operate"},{"url":"https://n8n.io/blog/using-automation-to-boost-productivity-in-the-workplace/","icon":"💪","label":"Using Automation to Boost Productivity in the Workplace"}],"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/app-nodes/n8n-nodes-base.gmail/"}],"credentialDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/"}]},"categories":["Communication","HITL"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"transform\"]","defaults":{"name":"Gmail"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTYiIGhlaWdodD0iMTkzIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCI+PHBhdGggZmlsbD0iIzQyODVGNCIgZD0iTTU4LjE4MiAxOTIuMDVWOTMuMTRMMjcuNTA3IDY1LjA3NyAwIDQ5LjUwNHYxMjUuMDkxYzAgOS42NTggNy44MjUgMTcuNDU1IDE3LjQ1NSAxNy40NTV6Ii8+PHBhdGggZmlsbD0iIzM0QTg1MyIgZD0iTTE5Ny44MTggMTkyLjA1aDQwLjcyN2M5LjY1OSAwIDE3LjQ1NS03LjgyNiAxNy40NTUtMTcuNDU1VjQ5LjUwNWwtMzEuMTU2IDE3LjgzNy0yNy4wMjYgMjUuNzk4eiIvPjxwYXRoIGZpbGw9IiNFQTQzMzUiIGQ9Im01OC4xODIgOTMuMTQtNC4xNzQtMzguNjQ3IDQuMTc0LTM2Ljk4OUwxMjggNjkuODY4bDY5LjgxOC01Mi4zNjQgNC42NyAzNC45OTItNC42NyA0MC42NDRMMTI4IDE0NS41MDR6Ii8+PHBhdGggZmlsbD0iI0ZCQkMwNCIgZD0iTTE5Ny44MTggMTcuNTA0VjkzLjE0TDI1NiA0OS41MDRWMjYuMjMxYzAtMjEuNTg1LTI0LjY0LTMzLjg5LTQxLjg5LTIwLjk0NXoiLz48cGF0aCBmaWxsPSIjQzUyMjFGIiBkPSJtMCA0OS41MDQgMjYuNzU5IDIwLjA3TDU4LjE4MiA5My4xNFYxNy41MDRMNDEuODkgNS4yODZDMjQuNjEtNy42NiAwIDQuNjQ2IDAgMjYuMjN6Ii8+PC9zdmc+"},"displayName":"Gmail","typeVersion":2,"nodeCategories":[{"id":6,"name":"Communication"},{"id":28,"name":"HITL"}]},{"id":565,"icon":"fa:sticky-note","name":"n8n-nodes-base.stickyNote","codex":{"data":{"alias":["Comments","Notes","Sticky"],"categories":["Core Nodes"],"nodeVersion":"1.0","codexVersion":"1.0","subcategories":{"Core Nodes":["Helpers"]}}},"group":"[\"input\"]","defaults":{"name":"Sticky Note","color":"#FFD233"},"iconData":{"icon":"sticky-note","type":"icon"},"displayName":"Sticky Note","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"}]},{"id":1119,"icon":"fa:robot","name":"@n8n/n8n-nodes-langchain.agent","codex":{"data":{"alias":["LangChain","Chat","Conversational","Plan and Execute","ReAct","Tools"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Agents","Root Nodes"]}}},"group":"[\"transform\"]","defaults":{"name":"AI Agent","color":"#404040"},"iconData":{"icon":"robot","type":"icon"},"displayName":"AI Agent","typeVersion":3,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1247,"icon":"fa:comments","name":"@n8n/n8n-nodes-langchain.chatTrigger","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.chattrigger/"}]},"categories":["Core Nodes","Langchain"]}},"group":"[\"trigger\"]","defaults":{"name":"When chat message received"},"iconData":{"icon":"comments","type":"icon"},"displayName":"Chat Trigger","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"},{"id":26,"name":"Langchain"}]},{"id":1281,"icon":"file:openrouter.svg","name":"@n8n/n8n-nodes-langchain.lmChatOpenRouter","codex":{"data":{"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/cluster-nodes/sub-nodes/n8n-nodes-langchain.lmchatopenrouter/"}]},"categories":["AI","Langchain"],"subcategories":{"AI":["Language Models","Root Nodes"],"Language Models":["Chat Models (Recommended)"]}}},"group":"[\"transform\"]","defaults":{"name":"OpenRouter Chat Model"},"iconData":{"type":"file","fileBuffer":"data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjOTRBM0I4IiBmaWxsLXJ1bGU9ImV2ZW5vZGQiIHdpZHRoPSI0MCIgaGVpZ2h0PSI0MCIgdmlld0JveD0iMCAwIDI0IDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjx0aXRsZT5PcGVuUm91dGVyPC90aXRsZT48cGF0aCBkPSJNMTYuODA0IDEuOTU3bDcuMjIgNC4xMDV2LjA4N0wxNi43MyAxMC4yMWwuMDE3LTIuMTE3LS44MjEtLjAzYy0xLjA1OS0uMDI4LTEuNjExLjAwMi0yLjI2OC4xMS0xLjA2NC4xNzUtMi4wMzguNTc3LTMuMTQ3IDEuMzUyTDguMzQ1IDExLjAzYy0uMjg0LjE5NS0uNDk1LjMzNi0uNjguNDU1bC0uNTE1LjMyMi0uMzk3LjIzNC4zODUuMjMuNTMuMzM4Yy40NzYuMzE0IDEuMTcuNzk2IDIuNzAxIDEuODY2IDEuMTEuNzc1IDIuMDgzIDEuMTc3IDMuMTQ3IDEuMzUybC4zLjA0NWMuNjk0LjA5MSAxLjM3NS4wOTQgMi44MjUuMDMzbC4wMjItMi4xNTkgNy4yMiA0LjEwNXYuMDg3TDE2LjU4OSAyMmwuMDE0LTEuODYyLS42MzUuMDIyYy0xLjM4Ni4wNDItMi4xMzcuMDAyLTMuMTM4LS4xNjItMS42OTQtLjI4LTMuMjYtLjkyNi00Ljg4MS0yLjA1OWwtMi4xNTgtMS41YTIxLjk5NyAyMS45OTcgMCAwMC0uNzU1LS40OThsLS40NjctLjI4YTU1LjkyNyA1NS45MjcgMCAwMC0uNzYtLjQzQzIuOTA4IDE0LjczLjU2MyAxNC4xMTYgMCAxNC4xMTZWOS44ODhsLjE0LjAwNGMuNTY0LS4wMDcgMi45MS0uNjIyIDMuODA5LTEuMTI0bDEuMDE2LS41OC40MzgtLjI3NGMuNDI4LS4yOCAxLjA3Mi0uNzI2IDIuNjg2LTEuODUzIDEuNjIxLTEuMTMzIDMuMTg2LTEuNzggNC44ODEtMi4wNTkgMS4xNTItLjE5IDEuOTc0LS4yMTMgMy44MTQtLjEzOGwuMDItMS45MDd6Ij48L3BhdGg+PC9zdmc+Cg=="},"displayName":"OpenRouter Chat Model","typeVersion":1,"nodeCategories":[{"id":25,"name":"AI"},{"id":26,"name":"Langchain"}]},{"id":1313,"icon":"fa:comments","name":"@n8n/n8n-nodes-langchain.chat","codex":{"data":{"alias":["human","wait","hitl","respond","approve","confirm","send","message"],"resources":{"primaryDocumentation":[{"url":"https://docs.n8n.io/integrations/builtin/core-nodes/n8n-nodes-langchain.respondtochat/"}]},"categories":["Core Nodes","HITL","Langchain"],"subcategories":{"HITL":["Human in the Loop"]}}},"group":"[\"input\"]","defaults":{"name":"Chat"},"iconData":{"icon":"comments","type":"icon"},"displayName":"Chat","typeVersion":1,"nodeCategories":[{"id":9,"name":"Core Nodes"},{"id":26,"name":"Langchain"},{"id":28,"name":"HITL"}]}],"categories":[{"id":41,"name":"Ticket Management"},{"id":47,"name":"AI Chatbot"}],"image":[]}}