{How to} use code interpreter on customer uploaded files in agent conversations in copilot studio

Malla Reddy GurramDyn365CE4 hours ago29 Views

Hello Everyone,

Today I am going to share my thoughts on the use of the code interpreter on customer-uploaded files in agent conversations in copilot studio.

Let’s get started.
Your chatbot (agent) can take a user upload during a chat and automatically analyze it using code, then return results within the same conversation.
What actually happens behind the scenes

1.  User uploads a file

Examples:
Excel (.xlsx)
CSV (.csv)
Sometimes JSON or text files.

2. The agent receives the file

The file is passed into the conversation as:
System.Activity.Attachments

3. Code Interpreter kicks in

Copilot Studio:
Generate Python code automatically
Runs it in a secure environment
Uses it to:
  • Read the file
  • Analyse data 
  • Create outputs

4. The agent responds with results

The bot sends back:
  • Charts
  • Tablets
  • Insights
  • Summaries
Example flow:

Real example

User says:

“Analyze this sales spreadsheet”

What the agent does:

  • Reads the Excel file
  • Groups sales by month
  • Calculates totals
  • Generates a chart

Response:

“Revenue increased 18% in Q3. Here’s a breakdown…” + chart

 

Why this feature is useful

  • No manual coding needed
  • Works in real-time conversations
  • Turns your agent into a data analyst
  • Great for:
    • Customer uploads
    • Business reports
    • Data exploration

 In one sentence

It lets your Copilot Studio agent act like a Python-powered data analyst that can read and analyze files users upload during chat.

Important notes

  • Best with structured data (Excel, CSV)
  • Requires:

    • File upload enabled
    • Code Interpreter enabled
  • Has file size and type limits
That’s it for today.
I hope this helps.
Malla Reddy Gurram aka @UK365GUY

Original Post https://mscrmgmr.blogspot.com/2026/03/how-to-use-code-interpreter-on-customer.html

0 Votes: 0 Upvotes, 0 Downvotes (0 Points)

Leave a reply

Join Us
  • X Network2.1K
  • LinkedIn3.8k
  • Bluesky0.5K
Support The Site
Events
March 2026
MTWTFSS
       1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31      
« Feb   Apr »
Follow
Search
Popular Now
Loading

Signing-in 3 seconds...

Signing-up 3 seconds...

Discover more from 365 Community Online

Subscribe now to keep reading and get access to the full archive.

Continue reading