Copilot Studio Gallery
ContributorsShare a sample
← Back to gallery

Agents

Sales Analyser

An agent that turns monthly sales spreadsheets in SharePoint into trustworthy analysis: it cleans and reconciles the data, computes YoY, MoM, QoQ and YTD metrics with live currency conversion and outlier flags, explains every transformation, and delivers a branded PDF report and an Outlook-ready newsletter email.

ATby Adriana TrujilloVersion 1.01 downloadGitHub Release ZIP downloads across tracked versions since 2026-11-07. Last counted 2026-11-08T07:45:37.325Z. Includes direct downloads, repeats, and automation; not installations. As of 2026-11-08T07:45:37.325Z.Updated 2026-10-24Rate & discuss

This community example 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
  • 1 agent
  • 1 MCP server
  • 1 tool
  • 3 skills
AgentMCP serversToolsSkills

Sales Analyser

Agent

  • SharePoint
  • Draft an email message
  • newsletter-style-email-composer
  • polished-report-builder
  • spreadsheet-data-analysis-reporting
Financefinancesalesanalyticsreportingexcelsharepointemailskills

Sales Analyser is an agent for finance and revenue operations teams. It reads monthly sales exports (CSV or Excel) from a SharePoint folder, cleans and reconciles them, and answers questions like “analyse Q4 for me” or “compare regions year on year” with figures you can trace back to the source files. When you’re ready to share, it turns the analysis into a branded PDF report and an Outlook-ready newsletter email.

Every answer ends with a short Data notes block: the files used, every transformation applied (cleaning, label mappings, de-duplication, currency conversion), the exchange rates and their as-of dates, the outliers it found, and any caveats. No bare numbers.

What’s inside

Agent

AgentRole
Sales AnalyserFinds the right sales files, prepares the data, computes the metrics and hands off to the report and email skills. Reads SharePoint only and never writes to it. Generated files are returned in the chat and attached to email drafts.

Skills

The skills ship with the agent, including their Python scripts, reference guides and assets. They run in the Copilot Studio code sandbox using only preinstalled packages (pandas, matplotlib, reportlab, Pillow).

SkillWhat it does
spreadsheet-data-analysis-reportingThe analysis engine. Discovers and maps fields across files with different layouts, prepares the data, computes metrics with standard definitions and edge-case handling, flags outliers without excluding them, converts currencies and draws charts with a shared theme. Also builds or extends a consolidated master file on request.
polished-report-builderRenders a branded PDF: header band, headline callout, KPI tiles, charts, tables with right-aligned numbers, Data notes, and a non-audit disclaimer on every page. A QA script checks length, chart resolution and colour contrast before delivery.
newsletter-style-email-composerBuilds a newsletter-style summary email that renders in classic Outlook, new Outlook, Gmail and dark mode. KPI tiles and bar charts are built from HTML table cells, with no embedded images, and the PDF report is attached.

Tools and knowledge

NameTypeUsed for
SharePoint MCPToolListing and reading the sales files. Limited to read operations.
Draft an email message (Office 365 Outlook)ToolCreating the email draft with the PDF attached. Nothing is sent automatically.
https://www.xe.com/currencyconverter/KnowledgeLooking up spot exchange rates at the moment of analysis.

Before you start

  • A Power Platform environment with Dataverse and Copilot Studio, with the new Copilot Studio experience turned on so that agent skills and the code sandbox are available. A First Release or Early Release environment is strongly preferred.
  • Permission to import solutions and create connections in that environment.
  • The agent is configured to use Claude Opus 5. Anthropic models must be allowed in your tenant, or you can pick another model after import.
  • A SharePoint folder that holds your sales exports, ideally one file per month (for example sales_export_2025-10.csv). Files don’t need identical layouts; the agent reconciles column names, date formats, currencies and labels. Typical columns are order date, region, product, customer, quantity, unit price, currency and unit cost.
  • An Outlook (Office 365) mailbox, if you want email drafts.

Set it up

1. Import the solution

Download the solution ZIP from this page and import it through Solutions → Import solution. Create or select connections for Office 365 Outlook and SharePoint MCP when asked.

2. Point the agent at your sales data

Open Sales Analyser in Copilot Studio. In Instructions, under Data, replace <your-sharepoint-site-url> with your site URL, and change the library (Shared Documents) and folder (Monthly Sales) if yours are different.

Until you do, the agent asks each user where their sales files are. Users can always point it at another site, library or folder in the chat.

3. Check the tools and knowledge

  • Under Tools, open SharePoint and Draft an email message and make sure both have a connection.
  • Under Knowledge, wait until the xe.com source shows as ready.

4. Publish

Save and publish the agent, then share it with the people who’ll use it.

Make it yours

The agent’s logic is deliberately not over-prescriptive. Definitions and rules are defaults that the agent adapts to each dataset and discloses in the Data notes. These are the places to tailor:

What to changeWhereNotes
Data locationAgent instructions, Data sectionSite, library and folder the agent reads by default.
Branding (colours, fonts, header and footer text, disclaimer)assets/style-tokens.json in the spreadsheet-data-analysis-reporting skillThe single source for charts, the PDF and the email. Ships with a blue and green palette checked for contrast. Keep text at 4.5:1 or more against white; the report QA script checks it.
Logoassets/logo-placeholder.png in the same skillReplace the placeholder with your own PNG under the same name, or add a file and set brand.logo_path. The logo appears in the PDF header only, because email clients block inline images.
Metric definitions (YoY, MoM, QoQ, YTD, LTM, contribution to growth, mix, constant currency)references/metrics-glossary.mdIncludes edge cases such as a missing or zero prior period, partial periods and rounding.
Cleaning rules (blanks, duplicates, subtotal rows, numbers stored as text, date formats)references/data-preparation.md, scripts/prepare_data.pyPass --label-map to prepare_data.py for recurring label mappings, for example {"Region": {"Europe": "EMEA"}}.
Field synonymsSYNONYMS table in scripts/discover_fields.pyAdd your own column names, for example "turnover" for revenue.
Outlier thresholdsreferences/outlier-guidance.md, scripts/flag_outliers.pyDefaults: robust z-score above 3.5, a period swing over ±50%, a share shift over 5 pp, and one row above 25% of the total. Outliers are flagged, never excluded automatically.
Fiscal calendarAgent instructions, Dates and periodsDefaults to calendar quarters (Q4 = Oct–Dec). The agent asks when a request is ambiguous. Change the default if your organisation works to a fiscal year.
Currency sourceKnowledge and references/fx-conversion.mdSee the note on exchange rates below.
Email layoutassets/newsletter-email-template.html in the email skillTable-based layout for Outlook compatibility.

Exchange rates

The reporting currency defaults to the dominant currency in the data, and the agent confirms it with the user. For every analysis it looks up a fresh spot rate from the xe.com knowledge source. It only uses a rate when the rate is clearly dated and the direction is unambiguous; otherwise it asks the user to provide or confirm one. Rates aren’t stored. Each one is disclosed in the Data notes with its pair, direction, source and as-of date.

Website knowledge works from an indexed snapshot of the page, so rates can be a few days old. Review XE’s terms of use before relying on them. For official reporting, swap the knowledge source for your treasury’s published rates.

Try it

Open Sales Analyser in Preview and try these one at a time:

  1. Analyse Q4 for me.

    Expect the agent to state the period it used, report the dominant currency and the exchange rates it found for you to confirm, and then return the headline, comparison tables and a Data notes block.

  2. Compare regions year on year and show me the monthly trend.

  3. Build the branded PDF report with charts.

    The PDF comes back as a chat attachment.

  4. Draft an email to me with the summary and attach the PDF.

    A draft appears in your Outlook mailbox. Nothing is sent.

  5. What does YoY mean?

    This is answered directly, without running an analysis.

Good to know

  • Read-only access to SharePoint. The agent never creates, uploads, moves or deletes files there. Reports and other generated files are returned in the chat.
  • File size. Files are read through the SharePoint tool, so very large workbooks can exceed its limits. Monthly exports of a few thousand rows work well.
  • Not an audit tool. Every report and email carries a non-audit disclaimer, which you can edit in style-tokens.json.

Agents and their components

The MCP servers, tools, and skills each agent uses, and which agents hand off to others. Hover a component for its description.

AgentMCP serversToolsSkills

Sales Analyser

Agent

  • SharePoint
  • Draft an email message
  • newsletter-style-email-composer
  • polished-report-builder
  • spreadsheet-data-analysis-reporting

Exploded solution manifest

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

Solution
crf9c_salesanalyser_WEs93i
Publisher
crf9c
Version
1.0
Files
74
component: 68bot: 2other: 2solution: 2
PathTypeSize
[Content_Types].xmlother1,398 B
Assets/botcomponent_connectionreferenceset.xmlother422 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsanalysisnotestemplatemd_vA6tS/botcomponent.xmlcomponent583 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsanalysisnotestemplatemd_vA6tS/filedata/analysis-notes-template.mdcomponent1,363 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsemailcontentexamplejson_kokwj/botcomponent.xmlcomponent583 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsemailcontentexamplejson_kokwj/filedata/email-content-example.jsoncomponent2,569 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetslogoplaceholderpng_Lq7xT/botcomponent.xmlcomponent560 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetslogoplaceholderpng_Lq7xT/filedata/logo-placeholder.pngcomponent5,309 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsnewsletteremailtemplatehtml_0JaYa/botcomponent.xmlcomponent478 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsnewsletteremailtemplatehtml_0JaYa/filedata/newsletter-email-template.htmlcomponent6,714 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsreportcontentexamplejson_8fbwz/botcomponent.xmlcomponent587 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsreportcontentexamplejson_8fbwz/filedata/report-content-example.jsoncomponent2,550 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsstyletokensjson_nVpmN/botcomponent.xmlcomponent548 B
botcomponents/crf9c_salesanalyser_WEs93i.file.assetsstyletokensjson_nVpmN/filedata/style-tokens.jsoncomponent3,217 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referenceschartselectionguidemd_TxQKv/botcomponent.xmlcomponent468 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referenceschartselectionguidemd_TxQKv/filedata/chart-selection-guide.mdcomponent3,522 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencescontentbalanceguidemd_dNENp/botcomponent.xmlcomponent468 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencescontentbalanceguidemd_dNENp/filedata/content-balance-guide.mdcomponent5,615 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesdatapreparationmd_bHU65/botcomponent.xmlcomponent568 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesdatapreparationmd_bHU65/filedata/data-preparation.mdcomponent3,677 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesemailrenderingandaccessibility_T4NLx/botcomponent.xmlcomponent513 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesemailrenderingandaccessibility_T4NLx/filedata/email-rendering-and-accessibility-notes.mdcomponent3,934 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesfieldmappingchecklistmd_I_uU_/botcomponent.xmlcomponent474 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesfieldmappingchecklistmd_I_uU_/filedata/field-mapping-checklist.mdcomponent3,517 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesfxconversionmd_XNO5x/botcomponent.xmlcomponent556 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesfxconversionmd_XNO5x/filedata/fx-conversion.mdcomponent3,093 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesmetricsglossarymd_DnWW2/botcomponent.xmlcomponent454 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesmetricsglossarymd_DnWW2/filedata/metrics-glossary.mdcomponent3,974 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesoutlierguidancemd_yWDKi/botcomponent.xmlcomponent568 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesoutlierguidancemd_yWDKi/filedata/outlier-guidance.mdcomponent2,048 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesstyletokensmd_9O0eH/botcomponent.xmlcomponent442 B
botcomponents/crf9c_salesanalyser_WEs93i.file.referencesstyletokensmd_9O0eH/filedata/style-tokens.mdcomponent2,890 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsbuildemailpy_6QId3/botcomponent.xmlcomponent539 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsbuildemailpy_6QId3/filedata/build_email.pycomponent13,533 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptschartstylepy_h321b/botcomponent.xmlcomponent539 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptschartstylepy_h321b/filedata/chart_style.pycomponent20,048 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptscomputemetricspy_AzsMw/botcomponent.xmlcomponent445 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptscomputemetricspy_AzsMw/filedata/compute_metrics.pycomponent15,069 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsdiscoverfieldspy_1PUTY/botcomponent.xmlcomponent445 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsdiscoverfieldspy_1PUTY/filedata/discover_fields.pycomponent6,449 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsflagoutlierspy_xjOij/botcomponent.xmlcomponent547 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsflagoutlierspy_xjOij/filedata/flag_outliers.pycomponent9,585 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsfxconvertpy_Qm7tZ/botcomponent.xmlcomponent535 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsfxconvertpy_Qm7tZ/filedata/fx_convert.pycomponent8,956 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptspreparedatapy_bljPO/botcomponent.xmlcomponent543 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptspreparedatapy_bljPO/filedata/prepare_data.pycomponent24,076 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsqareportpy_aMt6L/botcomponent.xmlcomponent427 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsqareportpy_aMt6L/filedata/qa_report.pycomponent11,023 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsrenderreportpy_Tk7VR/botcomponent.xmlcomponent439 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsrenderreportpy_Tk7VR/filedata/render_report.pycomponent20,492 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsvisualcheckpy_YxSPP/botcomponent.xmlcomponent436 B
botcomponents/crf9c_salesanalyser_WEs93i.file.scriptsvisualcheckpy_YxSPP/filedata/visual_check.pycomponent5,329 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_6IAVT/botcomponent.xmlcomponent401 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_6IAVT/filedata/SKILL.mdcomponent5,929 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_k_QDN/botcomponent.xmlcomponent401 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_k_QDN/filedata/SKILL.mdcomponent4,279 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_oCdhy/botcomponent.xmlcomponent401 B
botcomponents/crf9c_salesanalyser_WEs93i.file.skillmd_oCdhy/filedata/SKILL.mdcomponent3,616 B
botcomponents/crf9c_salesanalyser_WEs93i.httpswwwxecomcurrencyconverter_pg8TOp2uM8kN/botcomponent.xmlcomponent739 B
botcomponents/crf9c_salesanalyser_WEs93i.httpswwwxecomcurrencyconverter_pg8TOp2uM8kN/datacomponent124 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.newsletter-style-email-composer_4LB/botcomponent.xmlcomponent1,024 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.newsletter-style-email-composer_4LB/datacomponent98 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.polished-report-builder_TUr/botcomponent.xmlcomponent1,157 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.polished-report-builder_TUr/datacomponent90 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.spreadsheet-data-analysis-reporting_dHq/botcomponent.xmlcomponent1,193 B
botcomponents/crf9c_salesanalyser_WEs93i.skill.spreadsheet-data-analysis-reporting_dHq/datacomponent102 B
botcomponents/crf9c_salesanalyser_WEs93i.tool.Draftanemailmessage_Flc/botcomponent.xmlcomponent423 B
botcomponents/crf9c_salesanalyser_WEs93i.tool.Draftanemailmessage_Flc/datacomponent228 B
botcomponents/crf9c_salesanalyser_WEs93i.tool.SharePoint-SharePoint_y1b/botcomponent.xmlcomponent640 B
botcomponents/crf9c_salesanalyser_WEs93i.tool.SharePoint-SharePoint_y1b/datacomponent602 B
bots/crf9c_salesanalyser_WEs93i/bot.xmlbot37,671 B
bots/crf9c_salesanalyser_WEs93i/configuration.jsonbot6,570 B
customizations.xmlsolution1,607 B
solution.xmlsolution3,863 B

Rate & discuss

Found this solution useful? Give it a thumbs up, ask a question, or share what you built.

GitHub Discussions ↗

Sign in with GitHub to join the conversation. Your comments and reactions are public.

Loading discussion...

This community example 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

Explore community-built apps, agents, and workflows before you install.

Third-party noticesView on GitHub