๐งพ Automate invoice processing & stock management with AI, Gmail, Sheets & Slack
โก 250 views ยท ๐งพ Invoice Processing
Description
โ What problem does this workflow solve?
Order processing often involves manual invoice reading, stock checking, and back-and-forth communication between procurement and operations teams. This workflow automates the entire procurement decision flow โ from reading incoming order emails to extracting structured data, checking stock, and creating either a purchase requisition or a work order automatically.
๐ก Main Use Cases
- ๐ฅ Auto-extract order and invoice details from incoming emails
- ๐ฆ Validate stock availability before processing orders
- ๐ Auto-create Purchase Requisitions when stock is insufficient
- ๐ Auto-create Work Orders when stock is available
- ๐ง Notify procurement or operations via email & Slack
- ๐ Log every action in Google Sheets for tracking and audit
๐ง How It Works โ Step-by-Step
1. ๐ง Gmail Trigger
The workflow begins when a new email arrives at a specific email address.
The invoice file is automatically downloaded for processing.
2. ๐ Extract Invoice Record
The attached invoice is processed using OCR or a document extraction tool.
Raw details such as:
- Order ID
- Item code
- Quantity
- Customer information
are extracted for further processing.
3. ๐ค AI-Powered Data Structuring
OpenAI structures the extracted fields into a clean and consistent format:
order_iditem_codequantitycustomer_name
This ensures all data is normalised before stock validation.
4. ๐ฆ Stock Check
The workflow checks inventory data stored in Google Sheets.
It compares:
- Required quantity
- Current stock
If stock is insufficient, it triggers the purchase requisition path.
If stock is available, it initiates the work order path.
5. ๐ Conditional Flow
If stock is insufficient:
- Creates a Purchase Requisition record in Google Sheets
- Sends an email notification to the procurement team for approval
If stock is sufficient:
- Creates a Work Order entry in Google Sheets
- Sends a Slack summary message to the operations team
This ensures teams are notified instantly, and work continues without delays.
๐ Logging & Reporting
Every step โ extracted data, PR created, WO created, notifications sent โ is logged in Google Sheets.
This provides a full audit trail for procurement and operations teams.
๐ค Who can use this?
Ideal for:
- Procurement teams
- Operations departments
- Manufacturing & warehouse units
- Businesses processing high-volume emailed orders
- Any team needing structured, automated order workflows
๐ Benefits
- โฑ Faster order processing
- ๐ง Fewer manual errors from invoice reading
- ๐ฆ Smarter procurement decisions based on real stock
- ๐ Automated communication loops
- ๐ Transparent audit logs for every order
๐ Nodes Used
Google Sheets, Slack, Gmail, Gmail Trigger, AI Agent, OpenAI Chat Model
๐ฅ Import
Download workflow.json and import into n8n:
Workflow menu โ Import from File