Route craft brewery orders with OpenAI, Google Sheets, and Gmail
Ready for 3.0What this workflow does
This AI workflow has 14 nodes and runs when an HTTP GET request hits its webhook URL. Along the way it connects Google Sheets, OpenAI Chat Model and Gmail.
How it runs
Trigger: When an HTTP GET request hits its webhook URL.
- Normalize Order Intake (Edit Fields (Set)): sets or maps fields
- Look Up Territory & Allocation Map (Google Sheets): uses Google Sheets
- Validate Territory & Compliance (AI Agent): runs an AI agent, with model: Territory Compliance Model; output parser: Parse Territory Decision
- Shape Territory Decision (Edit Fields (Set)): sets or maps fields
- Route Order Decision (Switch): routes items into branches
- Send Order Approval Confirmation (Gmail): uses Gmail
- Flag Territory Conflict to Compliance (Gmail): uses Gmail
- Flag License Ineligibility to Compliance (Gmail): uses Gmail
- Flag Allocation Cap Breach to Sales Ops (Gmail): uses Gmail
- Combine Routing Branches (Merge): merges the data from its input branches
…plus 1 more step. See the full node list below.
Services it uses
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (9)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Structured Output Parser
@n8n/n8n-nodes-langchain.outputParserStructured - Switch
n8n-nodes-base.switch - Gmail
n8n-nodes-base.gmail - Merge
n8n-nodes-base.merge
From the author
Quick overview This workflow receives retailer orders via webhook, looks up territory and allocation data in Google Sheets, uses OpenAI to apply three-tier compliance rules, then emails sales ops or compliance via Gmail and logs the decision back to Google…