# How to Automate Invoice Processing in SharePoint with Power Automate and Copilot

> Move invoices from a shared mailbox into SharePoint, fill their metadata automatically and reconcile them against purchase orders with one Copilot skill.

- URL: https://www.danielanderson.io/articles/sharepoint-invoice-processing-copilot/
- Author: Daniel Anderson, Microsoft MVP (https://www.danielanderson.io/)
- Published: 2026-03-25
- Updated: 2026-10-25
- Video: https://www.youtube.com/watch?v=n-IBtg9xtmA

## Key takeaways

- A Power Automate flow triggered by When a new email arrives in a shared mailbox (V2) can save every invoice attachment into a SharePoint library, with a Filter array step on Is Inline removing signature images.
- Autofill columns on the invoices library read each new file and fill in amount due, invoice date, invoice number and vendor without anyone opening a chat.
- With an Invoice Status column in place, Copilot in SharePoint can list the invoices still marked New from the metadata.
- In my reconciliation demo, four prompts (extract invoices, extract purchase orders, reconcile, report) became one Copilot skill that runs the whole process from a single request.
- A SHAREPOINT.md file listing the labels vendors use for a PO reference, such as PO Ref, Ref No. and Purchase Order #, gave Copilot the terminology it needed to extract the right values.

You can automate most of the invoice process inside Microsoft 365 without an agent or a third-party tool. A Power Automate flow watches the accounts shared mailbox and saves each attachment into a SharePoint library, autofill columns pull the invoice details into metadata, and a Copilot in SharePoint skill reconciles those invoices against your purchase orders and writes a report.

I've had plenty of people ask me about getting AI agents to handle invoice processing. In my demo, getting invoices out of the inbox with their details filled in took a short flow and a few column prompts, and the AI earned its keep in the reconciliation, where every vendor words the same field differently.

## Before you start

- **A Microsoft 365 Copilot licence** for whoever configures autofill and runs the reconciliation. Copilot in SharePoint began rolling out to general availability on 30 September 2026; it was called AI in SharePoint when I recorded the first video.
- **A shared mailbox** that receives invoices, and Power Automate with the standard Office 365 Outlook and SharePoint connectors.
- **An invoices document library.** Mine has Amount Due, Invoice Date, Invoice Number, From and an Invoice Status choice column defaulting to New. To reconcile, you also need a purchase orders library.
- **Possibly Copilot Credits.** Editing files and lists "at scale" uses credits, Microsoft doesn't publish the threshold, and Copilot asks you to approve credit use before it carries on.

## How do you extract invoice details automatically?

Give each metadata column on the invoices library an autofill prompt so files are read as they land. My Amount Due prompt asks for the total as a numeric value, with an example of the format, and "not found" if it isn't there. [SharePoint autofill columns](https://www.danielanderson.io/articles/sharepoint-autofill-columns/) covers the setup, testing and limits. With the prompts saved, an invoice I dragged in came through with all four values filled and a status of New.

## How do you save invoices from a shared mailbox to SharePoint?

1. **Create an automated cloud flow** with the Office 365 Outlook trigger **When a new email arrives in a shared mailbox (V2)**. Set **Original Mailbox Address** to the shared mailbox.
2. **Narrow the trigger.** Set **Subject Filter** to `invoice` and **Only with Attachments** to **Yes**.
3. **Add a Filter array** on the trigger's attachments, with the condition **Is Inline** is equal to `false`, so signature logos stay out of your library.
4. **Add an Apply to each** over the body of the Filter array. Inside it, add **Get attachment (V2)** and pass in the **Message Id** from the trigger, the **Attachment Id** from the current item and the shared mailbox as the original mailbox address.
5. **Add the SharePoint action Create file.** Choose the site, set **Folder Path** to the invoices library, and map **File Name** and **File Content** from the attachment.
6. **Test it.** Choose **Test**, then **Manually**, and send an invoice to the shared mailbox.

In my test, the emailed invoice appeared in the library with every autofill column populated, and an email carrying two invoices produced two files, each with its own metadata. Asking Copilot in the library for invoices with a status of New then returned the right ones from the Invoice Status column, though for whoever works the queue daily a view filtered to New does the same job without a chat.

## How do you reconcile invoices against purchase orders with Copilot?

My reconciliation demo runs on a finance site with two libraries. Invoices carry PO Reference, Invoice Amount, Vendor, Matched PO Amount, Variance, Reconciliation Status and Match Result, and purchase orders carry PO Amount, Vendor, PO Status and Linked Invoice.

1. **Write the terminology into SHAREPOINT.md.** Mine lists PO reference variants like PO Ref, Ref No. and Purchase Order #, plus the same for vendor, invoice total and PO total, and Copilot loads it at the start of every conversation on the site. [What SHAREPOINT.md is](https://www.danielanderson.io/articles/sharepoint-md/) covers the file itself.
2. **Set Reconciliation Status to default to New.** The reconciliation prompt only picks up invoices marked New.
3. **Run the process as separate prompts first.** Mine were: extract invoice metadata where PO Reference is blank; do the same for purchase orders; reconcile invoices against purchase orders; generate an HTML report. The reconciliation prompt spells out each step, including what not to do before matching an invoice.
4. **Check the results.** Copilot listed the items it was about to change before I chose **Update**. Reconciliation updated both libraries in one run: 10 invoices matched, three were flagged as duplicates and the rest as amount discrepancies or PO not found, and 10 purchase orders got their Linked Invoice set. Filtering Match Result on PO not found gave me the exception list.
5. **Turn the four prompts into a skill.** Paste them into a markdown file, select it and ask Copilot to create a skill from the four steps without changing them. Mine saved as Invoice PO Reconciliation, triggered by phrases like "reconcile invoices against POs". [How to build a SharePoint skill](https://www.danielanderson.io/articles/sharepoint-skills/) covers the create and review flow.
6. **Test the skill on clean data.** With the metadata cleared and Reconciliation Status reset to New, "reconcile invoices against POs" in a new chat ran all four steps and produced the same report, on brand because Copilot also loaded a brand foundation skill from Agent Assets.

My prompts and the finished skill are free at [danielanderson.io/invoices](https://www.danielanderson.io/invoices) to adapt to your own process.

Video: Four reconciliation prompts packaged into one Copilot skill, grounded by a SHAREPOINT.md file https://www.youtube.com/watch?v=oLKrCbEos00

## Keep the status column as the gate between automation and payment

Everything here runs off two status columns, so I'd design those before writing a prompt. Invoice Status tracks the person working the invoice and Reconciliation Status tracks the skill. I'd keep payment approval as a separate step a person takes, recorded in its own column, so a Match Result of Matched never counts as approval to pay.

Duplicates, amount discrepancies and invoices with no purchase order usually need a call to the supplier, so I'd give each Match Result value its own view and name someone in accounts payable to work through it.

Then lock down the parts that change behaviour. Anyone with Edit permission on the site can change a site skill or the SHAREPOINT.md beside it in Agent Assets, and the people editing invoices don't need to edit the reconciliation rules, so I'd break inheritance on Agent Assets and give edit rights to the process owner. The flow runs under its connection owner's account, so I'd build it with an account that keeps access to the mailbox and library when people change jobs.

## What to watch for

- **Attachment timeouts.** Microsoft warns that Include Attachments set to Yes on the trigger can time out when many emails with attachments arrive together. This flow fetches each file with Get attachment (V2) anyway, so set Include Attachments to **No**.
- **Files that aren't invoices.** A statement attached to an invoice email still lands in the library, and autofill's "not found" values make it easy to spot in a view.
- **New vendor labels.** If a supplier words its PO reference in a way SHAREPOINT.md doesn't list, add the label and rerun the extraction.
- **Size limits.** The Outlook connector caps mail content at 49 MB, and autofill is designed for files up to 65 pages.

## Frequently asked questions

**Why does Power Automate save email signature images as attachments?**
Images embedded in the body, like signature logos, come through as inline attachments. The trigger returns an Is Inline property for every attachment even when Include Attachments is off, so filtering on it removes them.

**Do the people sending invoices need a Copilot licence for autofill to work?**
No. Once the column prompts are saved, every new file added to the library is processed regardless of who uploaded it, including files saved by the flow. Files already in the library before you saved the prompts need a manual run from Autofill columns, then Autofill.

**Can a Copilot skill update two SharePoint libraries in one run?**
In my demo it did, from a chat opened in the purchase orders library. Skills only work within the permissions of the person running them, so that person needs edit access to both libraries. I ran a similar reconciliation of 100 invoices across two Microsoft Lists in [what SharePoint skills are](https://www.danielanderson.io/articles/sharepoint-skills/).
