Email Order to Procurement Automation
Reads purchase orders that arrive by email, extracts them with AI, creates a sales order, checks stock and, if there's a shortage, raises a purchase requisition and a work order.

On this page
How it works
- A Gmail trigger picks up an order email with its attachment.
- The document is extracted into structured data.
- A sales order is created and stock is checked.
- Shortages create a purchase requisition and a work order.
- A summary is posted to Slack and emailed.
Use cases
- Manufacturers
- B2B suppliers
- Make-to-order businesses
What you need
This workflow connects to these apps.
- OpenAI
- Slack
You'll need an n8n instance, on n8n Cloud or self-hosted, and these credentials. Our credentials guide shows how to create each one.
- Gmail account
- Google Sheets account
- OpenAI account
- Slack account
Data setup
Create these tables with these exact column names before the first run.
| Table | Columns |
|---|---|
| Order tracking → Customer orderGoogle Sheets | Order idSKUCustomer NameEmailPhoneItem NameQuantityPriceTotal |
| Order tracking → Product inventoryGoogle Sheets | Item Name |
| Order tracking → Purchase RequisitionGoogle Sheets | Request Dateitem nameSKU / Item CodeCurrent QuantityQuantity RequestedPriority |
| Order tracking → Work Order CreateGoogle Sheets | order idSKUitem nameCustomer nameQuantity to ProducePlanned Due Date |
Setup
- Download the JSON and import it into n8n with Import from File, or copy it and paste it onto an empty canvas. The import guide walks through both.
- Connect the credentials listed above.
- Point the Sheets, Airtable, Drive, and Slack nodes at your own files and channels.
- Replace placeholder emails, phone numbers, and form links with your own.
- Times use the America/New York timezone and dates use MM/DD/YYYY. Change them if you need to, then test and activate. The setup guide covers this step by step.
Nodes
| Node | Type |
|---|---|
| Gmail Trigger | gmailTrigger |
| Extract from File | extractFromFile |
| Structured Output Parser | outputParserStructured |
| OpenAI Chat Model | lmChatOpenAi |
| Send a message | gmail |
| Extract Invoice Record | agent |
| Sales Order Creation | googleSheets |
| Stock & Shortage Check | googleSheets |
| If Negative | if |
| Create Purchase Requisition | googleSheets |
| Create Work Order | googleSheets |
| Send Order Summary | slack |
Frequently asked questions
Reads purchase orders that arrive by email, extracts them with AI, creates a sales order, checks stock and, if there's a shortage, raises a purchase requisition and a work order. It's a 13-node n8n workflow.
An n8n instance, on n8n Cloud or self-hosted, and credentials for Gmail, Google Sheets, OpenAI, and Slack. It uses only nodes that ship with n8n, so there's nothing else to install.
It works with 4 tables in Google Sheets. Create them with the column names listed under Data setup on this page before the first run.
Download the JSON, then in n8n create a new workflow, open the menu in the top right, and choose Import from File. You can also copy the JSON and paste it onto an empty canvas.
Yes. It's free to download, import, and change, with no sign-up. You only pay for the apps it connects to, where those aren't free on your plan.



