Automatically extract, log, and archive invoices from your Outlook inbox using GPT-4.1-mini, OneDrive, and Excel — no manual data entry required.
This workflow is built for small business owners, finance teams, and operations managers who receive invoices via email and need a hands-free way to capture, organize, and track them. It works entirely within the Microsoft 365 ecosystem — no third-party apps required.
The workflow runs on a daily schedule (default: 7 AM) and fetches all unread emails from a specified Outlook folder. Each email body is cleaned from HTML to plain text and passed to GPT-4.1-mini, which extracts 14 structured invoice fields — including vendor name, invoice number, issue date, due date, and total amount due. If the email includes a PDF attachment, the workflow fetches it via the Microsoft Graph API, checks whether a dated subfolder exists in OneDrive (Invoices/YYYY-MM-DD), creates one if needed, and uploads the file as VENDOR-YYYY-MM.pdf, capturing the shareable link. All extracted data is appended to an Excel table for record-keeping. Finally, processed emails are marked as read and a formatted HTML digest summarizing all invoices is sent via Outlook.
foldersToInclude to your target Outlook folder ID (find it via Graph Explorer).tblInvoices tracker file in OneDrive.YOUR_ONEDRIVE_FOLDER_URL with a direct link to your Invoices folder.[email protected] with your recipient address.https://graph.microsoft.com/.default scope)tblInvoices containing columns matching the field listPDF Link column added to your tblInvoices tableSupport: [email protected] | Automated Intelligent Solutions