{"product_id":"n8n-workflow-route-brewery-orders-via-webhook-sheets-gmail","title":"n8n Workflow: Route Brewery Orders via Webhook, Sheets \u0026 Gmail","description":"\u003ch3\u003eRoute Brewery Orders Automatically—Webhook In, Smart Compliance Out\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow receives brewery retailer orders via \u003cstrong\u003eWebhook\u003c\/strong\u003e, checks territory and allocation rules in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, uses \u003cstrong\u003eOpenAI\u003c\/strong\u003e to apply three-tier compliance logic, then sends the right email via \u003cstrong\u003eGmail\u003c\/strong\u003e and logs every decision for audit-ready tracking.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives retailer orders\u003c\/strong\u003e as a \u003cem\u003ePOST\u003c\/em\u003e request to a webhook endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eNormalizes order fields\u003c\/strong\u003e into consistent data points, including retailer, state, license type, SKU category, quantity, and delivery date.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eLooks up territory \u0026amp; allocation\u003c\/strong\u003e in a Google Sheets tab named \u003cstrong\u003e“Territory \u0026amp; Allocation Map”\u003c\/strong\u003e using \u003ccode\u003eretailerId\u003c\/code\u003e to find:\n    \u003cul\u003e\n      \u003cli\u003eassigned territory state\u003c\/li\u003e\n      \u003cli\u003eSKU license restriction rule\u003c\/li\u003e\n      \u003cli\u003elimited-release cap remaining\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEvaluates a structured compliance decision\u003c\/strong\u003e with an \u003cstrong\u003eOpenAI\u003c\/strong\u003e chat model, applying rules for:\n    \u003cul\u003e\n      \u003cli\u003eterritory exclusivity\u003c\/li\u003e\n      \u003cli\u003elicense-type eligibility\u003c\/li\u003e\n      \u003cli\u003elimited-release allocation caps\u003c\/li\u003e\n    \u003c\/ul\u003e\n    The result includes category, confidence, reasoning, and an approved quantity.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRoutes outcomes by decision\u003c\/strong\u003e and sends a \u003cstrong\u003eGmail\u003c\/strong\u003e notification:\n    \u003cul\u003e\n      \u003cli\u003eto \u003cstrong\u003esales ops\u003c\/strong\u003e for approval\/allocation-cap issues\u003c\/li\u003e\n      \u003cli\u003eto \u003cstrong\u003ecompliance\u003c\/strong\u003e for territory conflicts and license ineligibility\u003c\/li\u003e\n    \u003c\/ul\u003e\n  \u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends a full decision record\u003c\/strong\u003e to Google Sheets “\u003cstrong\u003eDistribution Order Log\u003c\/strong\u003e” for audit history.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eAutomatically triage incoming retailer orders that must respect territory exclusivity and SKU license restrictions.\u003c\/li\u003e\n  \u003cli\u003eHandle limited-release SKUs by validating against caps remaining before approvals are sent to sales ops.\u003c\/li\u003e\n  \u003cli\u003eCreate an audit trail of every compliance decision in a central Google Sheets log.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n nodes:\u003c\/strong\u003e webhook, set, merge, switch, sticky note, gmail\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations:\u003c\/strong\u003e Google Sheets (Territory \u0026amp; Allocation Map lookup + Distribution Order Log append), Gmail notifications\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAI logic:\u003c\/strong\u003e OpenAI chat model to produce a structured decision for compliance routing\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45938189238451,"sku":"N8N-19040","price":34.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/qU6eBqzEX7Y7V6LE3feNL_wOYURDmW.png?v=1788340056","url":"https:\/\/buyflowscripts.com\/products\/n8n-workflow-route-brewery-orders-via-webhook-sheets-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}