Intelligent purchase order generator with AI supplier selection
Needs changesWhat this workflow does
This AI workflow has 14 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Gmail, Google Drive, OpenAI Chat Model and Htmlcsstopdf (community). It also calls hooks.slack.com over HTTP.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Validate Request (Code): runs custom JavaScript code
- Prepare AI Context (Edit Fields (Set)): sets 1 field: aiContext
- AI Supplier Selector (AI Agent): runs an AI agent, with model: OpenAI Chat Model
- Enrich with Supplier Data (Code): runs custom JavaScript code
- Needs Approval? (If): checks a condition and branches into true / false
- Request Approval (Gmail): uses Gmail
- Generate PO Document (Code): runs custom JavaScript code
- HTML to PDF (Htmlcsstopdf): uses Htmlcsstopdf
- Archive in Drive (Google Drive): uses Google Drive
- Email to Supplier (Gmail): uses Gmail
…plus 2 more steps. See the full node list below.
Services it uses
HTTP calls to: hooks.slack.com
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in AI Supplier Selector (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) AI Supplier Selector (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (10)
- Webhook
n8n-nodes-base.webhook - Code
n8n-nodes-base.code - Edit Fields (Set)
n8n-nodes-base.set - AI Agent
@n8n/n8n-nodes-langchain.agent - If
n8n-nodes-base.if - Gmail
n8n-nodes-base.gmail - Htmlcsstopdf
n8n-nodes-htmlcsstopdf.htmlcsstopdf - Google Drive
n8n-nodes-base.googleDrive - HTTP Request
n8n-nodes-base.httpRequest - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi
From the author
Transform procurement from manual chaos to intelligent automation - AI-powered supplier selection analyzes urgency, cost, and delivery requirements to recommend optimal vendors, then automatically generates professional POs, manages approval workflows, and…