Automate Purchase Order Submissions from Outlook Excel Attachments with AI

n8n AI Data Management Business Intelligence

Contributed by Sabrina Ramonov 🍄. From the community directory at agents.sabrina.dev, republished with permission and full credit.

This n8n template imports purchase order submissions from Outlook and converts attached purchase order forms in XLSX format into structured output.

Data entry jobs with user-submitted XLSX forms are time-consuming, incredibly mundane but necessary tasks which are critical to business operations. While we could dream of system overhauls and modernization, the fact is that change is hard. There is another way, however - using n8n and AI!

n8n offers an end-to-end solution to parse XLSX form attachments using LLM-powered OCR and send the extracted output to your ERP or otherwise.

How it works

An Outlook trigger is used to watch for incoming purchase order forms submitted via a shared inbox. The email attachment for the submission is a form in XLSX format, which is imported into the workflow.

The 'Extract from File' node is used with the 'code' node to convert the XLSX file to markdown. This is so our LLM can understand it. The Information Extractor node is used to read and extract the relevant purchase order details and line items from the form.

A simple validation step is used to check for common errors such as missing PO number or the amounts not matching up. A notification is automated to reply to the buyer if issues are found.

Once validation passes, a confirmation is sent to the buyer and the purchase order structured output can be sent along to internal systems.

How to use

This template only works if you're expecting and receiving forms in XLSX format. These can be invoices, request forms, as well as purchase order forms.

Update the Outlook nodes with your email or other emails as required.

What's next?

I've omitted the last steps to send to an ERP or accounting system as this is dependent on your organization.

Customizing the workflow

This template should work for other Excel files. Some will be more complicated than others, so experiment with different parsers and extraction tools and strategies. Customize the Information Extractor Schema to pull out the specific data you need. For example, capture any notes or comments given by the buyer.

Tools used: OpenAI, Outlook, Excel

Download the workflow template (JSON)

Original tutorial

Want this running in your business? KOBA42 builds and operates automations like this one.