n8n

How to Automate Outlook Purchase Order Processing?

Capture purchase orders sent to a shared inbox and turn each attached Excel form into structured data. The flow screens messages, extracts key fields, checks totals, and sends clear replies. It suits teams that handle many purchase orders and need faster intake.

It watches an Outlook mailbox for new emails and uses AI to spot real purchase order submissions. If the attachment is not an Excel file, a polite reply asks for the right format. When the file is valid, the sheet is read into rows, converted into a markdown table, and passed to an AI extractor with a defined schema. Dates are corrected, simple checks confirm the order number and totals, then the sender gets either an acceptance or a rejection message. A final step leaves room to pass the clean data to your ERP or accounting tool.

Setup needs Microsoft Outlook and OpenAI credentials. Most teams see data entry time drop from about 15 minutes to around 2 minutes per order, with fewer mistakes and faster replies to buyers. It fits procurement and ops teams that receive XLSX forms from vendors and want consistent intake without manual typing.

What are the key features?

  • Outlook trigger watches a shared inbox for new purchase order emails
  • AI text classifier filters true submissions from general questions or replies
  • File check confirms the attachment is an Excel file before processing
  • Extract from File reads XLSX rows including empty cells for full context
  • Code step converts the sheet into a markdown table that AI can read
  • Information Extractor pulls order number, dates, totals, vendor, and line items using a schema
  • Date fix normalizes Excel date formats for reliable use
  • Validation step checks for missing order numbers and mismatched totals
  • Automated replies confirm acceptance or explain rejection with Outlook

What are the benefits?

  • Reduce manual entry per order from 15 minutes to 2 minutes
  • Automate 80 percent of basic checks like totals and missing fields
  • Improve data accuracy by 30 percent through simple validation rules
  • Handle up to 5 times more order emails without extra staff
  • Connect Outlook and OpenAI without custom code

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Microsoft Outlook and OpenAI. See the Tools Required section above for links to create accounts with these services.
  3. Open the Outlook Trigger node. In the credentials dropdown, click Create new credential and connect your Microsoft Outlook account. Use the shared mailbox if you receive purchase orders there and make sure you have permission to access it.
  4. In the Outlook Trigger settings, pick the folder to watch and set filters if needed, such as subject contains purchase order. Save the node and activate the workflow later after testing.
  5. Open the OpenAI nodes. In the credential dropdown, click Create new credential and paste your OpenAI API key from your OpenAI account API page. Save the credential and select it in both AI nodes.
  6. Open the Is Submitting a Purchase Order classifier node. Review the prompt and examples so it only passes through real submissions and routes other emails to Do Nothing.
  7. Open the Is Excel Document check. Confirm the condition tests the attachment file name or mime type for XLSX. Adjust the rule if your vendors use different naming patterns.
  8. Open Extract from File and confirm operation is XLSX with raw data enabled and empty cells included. Make sure the input points to the email attachment binary so the file is parsed correctly.
  9. Review the code node that converts XLSX to a markdown table. No changes are needed for basic forms, but you can update it if your headers or layout differ.
  10. Open the Information Extractor node and review the schema. Add or remove fields so the output matches your purchase order form. Keep the instruction Do not convert dates if you want exact values from the file.
  11. Review the Fix Excel Dates and Run Checks nodes. Update date formatting rules and validation logic such as totals must match and order number must exist. Test with a known good file and a file with errors.
  12. Edit the Reply Accepted, Reply Rejection, and Reply Invalid Format nodes. Customize the subject and message so buyers get clear next steps. Send a test email with an XLSX file to confirm the right reply is sent.
  13. If no emails are detected, check Outlook permissions and the inbox folder. If extraction fails, confirm the file is not password protected and that the attachment is reaching the Extract from File node.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

Microsoft Outlook

Sign up

Exchange Online (Plan 1): $4.00 user / mo (annual billing)

OpenAI

Sign up

Pay-as-you-go: GPT-5 at $1.25 per 1M input tokens and $10 per 1M output tokens

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.