Copilot · Community sample

Document Intake

A Copilot Component that files invoices and expense reports into a records library with complete, validated metadata, and shows recent filings.

Copilot componentReactSPFx 1.24.0-beta.2
Inline — the confirm step: a read-only summary of every field and the exact destination path, with Back to edit and Confirm and save

The idea behind the sample

Files a formal document — an invoice or an expense report — into the right document library with complete metadata, from inside a Microsoft 365 Copilot conversation. The user chooses the file, the component asks only for the fields that document kind requires, the destination is derived from kind and department, and nothing is stored until the user confirms. After saving, the user sees exactly what was stored, where, and a receipt.

One manifest tool, fileDocuments, carries an intent discriminator: file (choose, validate, review, confirm — several files at once in a full-screen workspace) or recent (filter recent filings by kind, department, status and period; open any record). Runs on fictional sample data until a tenant admin switches on the live SharePoint store, whose content types supply the required fields; both stores sit behind IDocumentStoreService, so views and mappers are the same for either.

Make it your own

Start with the author's setup instructions, explore the implementation, and adapt the pattern to your environment. Sample code stays in its original repository, together with its requirements, license and contribution history.

Read the source documentation

A closer look

Keep exploring

Keep the ideas flowing

Back to all possibilities
Microsoft 365 and Power Platform Community Contributor badge

Sharing is caring.

Share what you know.

Contribute a sample, improve the docs or help someone get started. Sample contributors can opt in to the PnP Recognition Program and share their community contributor badge.

Have something to show? Sign up for a community call demo. Fill in the form and we'll arrange a slot based on your availability.