Create purchase orders from Google Sheets using Groq AI and Gmail
Ready for 3.0Ready for 3.0. This template uses no nodes that n8n 3.0 removes. No removed nodes, versions or helpers found. Static check, last run 2026-10-19.
Nodes used (9)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Google Sheets
n8n-nodes-base.googleSheets - Filter
n8n-nodes-base.filter - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - No Operation, do nothing
n8n-nodes-base.noOp - HTTP Request
n8n-nodes-base.httpRequest - Edit Fields (Set)
n8n-nodes-base.set - Gmail
n8n-nodes-base.gmail
What it does
Quick overview This workflow runs every 15 minutes to read approved, new requisitions from Google Sheets, validate supplier and policy rules, call an LLM risk-assessment API via HTTP, then create a purchase order record, update requisition status, write audit logs, and notify the procurement team via Gmail. How it works 1. Runs every 15 minutes on a schedule. 2. Reads requisitions from Google Sheets and keeps only rows where ApprovalStatus is "Approved" and ProcessingStatus is "New". 3. Looks up each requisition’s supplier in a Google Sheets supplier master sheet and merges the supplier details into the requisition. 4. Stops processing for items that don’t meet the duplicate/eligibility criteria, and validates supplier status, contract status, compliance, and max spend limit. 5. For validated requisitions, sends the requisition and supplier details to an LLM risk-assessment endpoint via HTTP and parses the JSON decision, risk score, and reason. 6. Generates a purchase order number, appends the purchase order to a Google Sheets PurchaseOrders sheet, updates the requisition to "Processed", logs the outcome to an AuditLogs sheet, and emails the procurement team via Gmail. 7. For failed validations, appends a failure event to the AuditLogs sheet and updates the requisition status in Google Sheets to "Rejected". Setup 1. Connect Google Sheets OAuth2 credentials and ensure your spreadsheet contains the Requisitions, Suppliers, PurchaseOrders, and AuditLogs sheets with the expected column names (for example ReqID, SupplierID, ApprovalStatus, ProcessingStatus, MaxLimit, ComplianceStatus). 2. Configure the HTTP Request credential (header-based auth) and set the AI risk-assessment endpoint URL to your LLM provider (the workflow is formatted for a Groq/OpenAI-compatible chat-completions API). 3. Connect Gmail OAuth2 credentials and set the recipient address in the Gmail send step. 4. Confirm the Supplier master data uses matching SupplierID values and includes fields like Status, ContractActive, ComplianceStatus, and MaxLimit so validation can run correctly. Additional info How To Customize Nodes Schedule - Procurement Scan Adjust polling frequency: Every 5 minutes Every hour Daily Weekly Filter - Approved & New Requests Modify approval requirements. Examples: Approved only Department-specific approvals Multi-stage approval statuses Code - Procurement Validation Add custom procurement rules such as: Department budgets Vendor category restrictions Preferred supplier enforcement Spending thresholds by department Country-specific compliance checks AI - Risk Assessment Customize the prompt to evaluate: Fraud risk Vendor performance Cost anomalies Procurement policy adherence Budget risk You can also switch to any compatible AI provider. Purchase Order Generation Customize PO numbering formats. Example: text PO-2025-00001 or text PO-FINANCE-00001 Gmail Notification Add: Finance notifications Department manager alerts Supplier notifications Executive reporting emails Add-ons You can extend this workflow with additional capabilities such as: ERP Integration Push approved purchase orders into: SAP Oracle Microsoft Dynamics NetSuite Slack Notifications Send procurement updates directly to Slack channels. Microsoft Teams Alerts Notify procurement teams in Teams. PDF Purchase Orders Automatically generate PDF purchase orders and store them in cloud storage. Approval Escalation Route high-value purchases for additional approval. Vendor Performance Scoring Track supplier reliability and performance over time. Digital Signatures Add electronic approval and signature workflows. Budget Management Validate requests against department budgets before PO creation. Use Case Examples 1. Office Supply Procurement Automatically create purchase orders for approved office supply requests after validating supplier compliance and spending limits. 2. IT Equipment Purchases Process approved laptop, monitor, and hardware requests with AI-supported risk evaluation and