
Microsoft Copilot Studio is rapidly transforming how business users analyze data, automate tasks, and create intelligent solutions. One of its most powerful new capabilities is the Code Interpreter, which allows users to run Python code directly within Copilot, without needing developer expertise.
With this feature, users can perform advanced data analysis, process documents (Word, Excel, PowerPoint, PDF), generate charts and visualizations, and receive summarized insights, all through simple natural language prompts. The combination of Python execution + AI reasoning makes Copilot Studio a powerful tool for business analysts, sales teams, data professionals, and low-code makers.
By integrating this capability directly into the Microsoft ecosystem, organizations can accelerate insights, reduce manual analysis effort, and modernize reporting faster and more efficiently.
Imagine a sales representative who needs to analyze customer performance across industries. Instead of manually opening Excel, running formulas, or creating charts, they can simply ask Copilot:
“Show annual revenue by industry for my customers.”
Copilot instantly:
This removes repetitive data tasks from the sales process and enables quick, data-backed decisions by helping teams prioritize high-value opportunities more effectively.
Implementation
Before using the Code Interpreter within prompts or agent flows, it must be enabled in your environment.





Integrate the prompt into an agent flow in Copilot Studio



Under Adaptive card to display using a PowerFx formula, select Formula and enter this formula:
{
type: "AdaptiveCard",
'$schema': "http://adaptivecards.io/schemas/adaptive-card.json",
version: "1.0",
body: [
{
type: "Image",
url: "data:image/png;base64," & Topic.Output.image,
altText : "Generated graph"
},
{
type: "TextBlock",
text: Topic.Output.summary,
wrap: "true"
}
]
}

When the user enters a prompt asking for an analysis of annual revenue data, this flow will be executed, returning a box plot. This box plot showcases the median value of annual revenue for each industry and displays the quartiles in the data. This helps visualize the variation in Annual Revenue data with respect to each industry, making it a useful tool for low-code makers to generate insights using AI.

FAQs
The Code Interpreter in Microsoft Copilot Studio is a built-in feature that allows users to run Python code directly inside Copilot. It enables advanced tasks like data analysis, document processing, visualization generation, and automated insights using natural language prompts, without switching tools.
With the Code Interpreter enabled, users can analyze Dataverse tables by typing simple prompts. Copilot processes the data using Python, generates visual summaries such as charts or graphs, and returns a clear natural-language explanation for faster decision-making.
You can turn on the Code Interpreter through the Power Platform admin center by navigating to Copilot → Settings → Code generation and execution, selecting your environment, and switching it On.
Yes. By creating a prompt and linking Dataverse tables, Copilot can generate visual insights such as bar charts, box plots, or trend visuals using Python by automatically converting them into images you can return using adaptive cards.
Agent flows allow your Copilot agent to call the Code Interpreter prompt automatically. You simply add a Run a prompt action, return the text insights and base64 image, and display them through an adaptive card in the agent’s response.
Any role that needs fast, AI-powered data analysis can benefit—such as sales teams analyzing revenue trends, business analysts exploring customer segments, or data professionals automating insights without manual Excel work.
According to the blog, it can intelligently process content across Word, Excel, PowerPoint, and PDF, enabling extraction, summarization, and automation workflows within Copilot Studio.
Yes. Copilot combines Python-generated outputs with AI reasoning to deliver clear, human-friendly summaries, making it easier for non-technical users to interpret complex data.
It reduces manual analysis, eliminates context-switching between tools, automates repetitive tasks, and turns natural language instructions into ready-to-use data insights by accelerating workflows for low-code makers and business users.
The blog example showcases a box plot displaying median revenue and quartile distribution by industry. Similar prompts can generate other visual summaries depending on available data and instructions.
Conclusion
The Code Interpreter in Microsoft Copilot Studio bridges the gap between advanced data analytics and conversational AI. By combining Python’s analytical power with Copilot’s natural language understanding, users can generate instant insights, automate complex analysis, and present data visually, all within a single platform.
Whether you’re analyzing sales data, generating reports, or building smart automations, this feature empowers teams to move faster and make better, data-driven decisions with minimal manual effort.
The post Visualize Dataverse Insights Using Code Interpreter in Microsoft Copilot Studio first appeared on Microsoft Dynamics 365 CRM Tips and Tricks.
Original Post https://www.inogic.com/blog/2025/11/visualize-dataverse-insights-using-code-interpreter-in-microsoft-copilot-studio/






