Copilot Studio Gallery
ContributorsShare a solution
← Back to gallery

Workflows

Built by Microsoft

Invoice Processing

Two invoice-processing workflows: log extracted email attachments to a self-provisioning Excel ledger, or use a Dataverse ledger with extraction status and duplicate tracking. Choose based on your use case and licensing.

IGJLPBby Isha Gautam, Jasmita Lamba, and Pulkit BhagatVersion 1.0.0.0Updated 2026-10-09

This sample is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP
What’s in the solution
  • 2 workflows

Workflow preview

Invoice Processing - Original

Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.
Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.
Financefinanceaccounts-payabledocument-extractionmulti-agentexceldataverseautomation

Invoice Processing includes two alternative workflows in one solution. Both watch an Inbox for emails with invoice in the subject and at least one attachment, then process each attachment separately.

Choose either workflow based on your storage needs, use case, and available Power Platform licensing. You do not need to run both.

Authors

Isha Gautam, Jasmita Lamba, and Pulkit Bhagat.

Choose a workflow

Invoice Processing - OriginalInvoice Processing - Revised
Best fitA lightweight, spreadsheet-based invoice log.A structured finance ledger with extraction status and duplicate tracking.
MailboxThe connected user’s Inbox.A shared mailbox Inbox, checked every minute.
StorageAn Invoices table in invoices.xlsx at the OneDrive root.The included Invoice Ledger V2 Dataverse table.
Extracted dataInvoice number, vendor, invoice date, and amount due as text.The same invoice fields, plus separate currency and extraction status; amount due is numeric and dates use ISO format.
Missing dataUses Not found during extraction; leaves corresponding Excel cells blank.Leaves missing fields blank and classifies extraction as Complete, Partial, or Failed.
Duplicate handlingNo duplicate lookup.Matches existing rows by invoice number and records a DuplicateOf reference. Duplicates are still logged, not rejected.
Licensing considerationsRequires access to the workflow’s AI capabilities and Outlook, Excel, and OneDrive connections; avoiding Dataverse does not make it license-free.Also requires an entitlement covering the premium Dataverse connector and appropriate table permissions.

Original: Excel logging

New email -> attachment loop -> Extraction Agent -> Logging Agent.

  • Extraction Agent uses Claude Opus 5 to read the attachment, with the email subject and body as supporting context. It returns InvoiceNumber, Vendor, InvoiceDate, and AmountDue, without guessing missing data. It has no tools and treats email and attachment content as untrusted.
  • Logging Agent uses Sonnet 5 and owns the Excel and OneDrive tools. It checks for the configured workbook and the Invoices table, auto-creates them if missing, and adds a row for usable invoice data. Attachments whose four fields are all Not found are skipped.

Revised: Dataverse logging

Shared mailbox email -> attachment loop -> Extract -> List rows -> Ledger Agent -> ShouldLog condition -> Add a new row.

  • Extract uses Claude Opus 5 and returns InvoiceNumber, Vendor, InvoiceDate, numeric AmountDue, Currency, and ExtractionStatus.
  • List rows queries the configured Dataverse table for matching invoice numbers.
  • Ledger Agent uses Claude Opus 5 with no tools. It produces structured row data and a ShouldLog decision, including a duplicate reference when a matching record exists.
  • ShouldLog condition controls the explicit Dataverse row-creation action. Complete and Partial extractions are logged; Failed extractions are skipped. Rows also contain the attachment name, received timestamp, source-email field, and a human-readable record name.

Configuration

SettingPurpose
Subject filterBoth workflows use invoice. Adjust it to match your suppliers’ emails.
InvoiceLogFileNameOriginal workflow: workbook created and used at the OneDrive root. Default: invoices.xlsx.
Shared mailbox addressRevised workflow: alias@contoso.com is a placeholder. Replace it with a mailbox you can access.
InvoiceTableNameRevised workflow: iwf_iv2_invoiceledgerv2s, the entity set for the included Invoice Ledger V2 table.

The Dataverse table and AI model selections are unchanged.

Customizations

Adjust the trigger first — suppliers rarely agree on subject lines, so the subject filter, monitored folder, and attachment requirement usually need edits. Then consider:

  • Extracted fields such as PO number, tax, or due date. For Original, update the Extraction Agent’s output and the Logging Agent’s headers together. For Revised, update Extract, the Ledger Agent’s output, and the Dataverse mapping.
  • Attachment filtering if suppliers attach cover sheets or logos alongside the invoice.
  • Storage location if AP needs SharePoint or a shared folder rather than OneDrive or Dataverse.
  • An approval step before logging when AmountDue exceeds a threshold.
  • Duplicate policy if resubmitted invoices should be rejected rather than logged with a reference. Revised already tracks matching invoice numbers.

Keep extraction tool-less and treat attachment content as untrusted. Preserve the per-attachment loop so separate invoices are not blended into one summary.

Prerequisites

  • Both workflows: a Power Platform environment where you can import the solution, access to the AI workflow capabilities and selected models, an Outlook connection, and the applicable licensing and capacity.
  • Original: Excel Online (Business) and OneDrive for Business connections, plus write access to the OneDrive root.
  • Revised: access to the shared mailbox, a Dataverse connection, and read and create permissions on the included Invoice Ledger V2 table.

Licensing

Choose Original if Excel storage meets your needs and you do not have an entitlement covering the Revised workflow’s Dataverse use. Choose Revised if you need Dataverse storage and duplicate tracking and your organization’s Power Platform licensing covers that scenario.

Original is not a license-free alternative: both workflows use AI capabilities whose licensing and capacity requirements must be checked. Microsoft Dataverse is classified as a premium connector, but the applicable entitlement depends on your execution scenario and existing licenses. Confirm coverage with your administrator before enabling either workflow; a generic “Power Platform license” alone is not enough to establish coverage.

See Copilot Studio licensing requirements and the Microsoft Dataverse connector classification.

Import

Download the rebuilt solution ZIP from this page and import it through Power Platform. The ZIP contains both workflows and the Dataverse table, even if you intend to use only Original.

  1. Review and replace environment-specific connections during import.
  2. Choose Original or Revised and verify its prerequisites and licensing.
  3. For Original, confirm InvoiceLogFileName. For Revised, replace alias@contoso.com and confirm access to Invoice Ledger V2.
  4. Check the subject filter and test with a known invoice, a non-invoice attachment, and an email with multiple attachments. For Revised, also test a duplicate and a partially populated invoice.
  5. Enable only the selected workflow and leave the other disabled.

The exported Revised workflow should be reviewed before production use: its executable Extract message contains a literal {document} placeholder even though the saved canvas binds the current attachment. Confirm that attachment binding works in the imported workflow. Also, its SourceEmailId currently maps to the email sender rather than the message ID; update that mapping if message traceability is required.

Workflows and their components

Triggers, steps, connector services, and agent calls in each workflow.

WorkflowTriggerConnectorsAgents

Invoice Processing - Original

5 steps

When a new email arrives

Email · Office 365 Outlook

—No connector steps
  • Extraction Agent

    Inline agent

  • Logging Agent

    Inline agent

Invoice Processing - Revised

8 steps

When a new email arrives in a shared mailbox

Connector · Office 365 Outlook

  • Microsoft Dataverse
  • Ledger Agent

    Inline agent

Exploded solution manifest

The download rebuilds these submitted files at the ZIP root. Gallery metadata and the human-facing README are excluded.

Solution
IshaInvoiceProcessingVersions
Publisher
Isha Workflow Isolation
Version
1.0.0.0
Files
5
solution: 2workflow: 2other: 1
PathTypeSize
[Content_Types].xmlother258 B
customizations.xmlsolution79,644 B
solution.xmlsolution4,351 B
Workflows/InvoiceProcessing-Original-763C37FF-489D-4729-B6F5-5931D3D7F8B7.jsonworkflow91,581 B
Workflows/InvoiceProcessing-Revised-BA925418-4DDE-41EF-84BA-B7468A670026.jsonworkflow167,156 B

This sample is provided as-is and is not covered by Microsoft Support. The underlying Copilot Studio and Power Platform products retain their standard support. Importing can create or modify resources and use your connections and permissions. Support details

Download ZIP

Preview community-built Copilot Studio solutions before you import them.

View on GitHub