Operations
Process Outlook Purchase Orders from Excel
Validate emailed XLSX purchase orders, reply in the original Outlook conversation and return accepted order details.
Download workflow


Validate emailed XLSX purchase orders, reply in the original Outlook conversation and return accepted order details.
Setup
- Connect as the purchase order mailbox. In Watch hourly for purchase order email, choose its incoming folder. Use the same Outlook connection in Read the triggering Outlook message, List attachments on this message, Read the selected attachment and Reply to the original message. The connection needs mail read and send permission.
- Connect OpenAI in Read and classify this email and Parse and validate the purchase order. Use this workflow only for order submissions you are authorized to process in OpenAI.
- Enable persistent Workflow State and publish the workflow. Ask buyers to send a single non-inline XLSX file per message, with the purchase order on its first worksheet.
Behavior
The workflow polls hourly. It detects messages that submit a purchase order and ignores purchase order questions or ordinary correspondence. It reads the file on the same message, extracts the order details and checks for a PO number, a valid date, line items and matching totals to two decimal places.
A confirmed reply on the original message yields the relevant outcome. Accepted orders are available in workflow outputs for downstream review. The reply uses Outlook’s reply-to rules without adding recipients. Source formats outside XLSX are rejected. Keep pending replies for manual checking when Outlook’s response is unconfirmed.
Use workbooks up to 600 KiB and order forms with at most 300 rows, 200 columns and 30,000 characters of extracted cell data. Excel date serials and YYYY-MM-DD dates are supported. The date must be earlier than 24 hours after validation time. A manually checked order may be needed when extraction fails.
In n8n
Select Microsoft Outlook OAuth2 in the trigger and Outlook HTTP nodes. Use the same mailbox for both reads and replies. For a delegated shared mailbox, set its address in the Outlook credential and enter the matching address in Prepare this email. In the two OpenAI HTTP nodes, configure one Header Auth credential named Authorization with value Bearer YOUR_OPENAI_API_KEY. Keep a single active instance for each mailbox and serialize scheduled executions with N8N_CONCURRENCY_PRODUCTION_LIMIT=1 in self-hosted regular mode. Pending reply reservations are saved when a production run completes. If a run stops before saving state, check Outlook Sent Items before manually replaying the message. The XLSX node uses the first worksheet with a 2 MiB workbook limit. Enable the 1904 date setting in Prepare this email for mailboxes that receive that format.
Inspiration & credits
Adapted from Automate purchase order form submissions from Outlook Excel attachments with AI in Zie619/n8n-workflows. Attribution: Jimleuk (original workflow); Zie619 (collection).
The collection’s MIT notice is pinned at a later revision. This is the collection notice at that revision; it does not establish a separate original template author’s license. Our changes are listed above; see repository licensing.
MIT License
Copyright (c) 2025 Zie619
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Original gallery workflow. The Open Flow workbook parser embeds SheetJS Community Edition 0.20.2 under the Apache License 2.0. The license text is included in the parser node.