web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Copilot Studio - Calling Actions from Copilot S...
Unanswered

Pass uploaded file from chat to tools ?

(0) ShareShare
ReportReport
Posted on by 4
Hy
 
i created an agent with Copilot Studio and kwnowledges sources, it's working.

now i want to test with uploaded file from chatbot, i have a tool with "File Input" on Request, it's working.

In agent i test with "fx" 

First(System.Activity.Attachments)

OR 
 
If(
    IsEmpty(System.Activity.Attachments), 
    [], 
    [{ contentBytes: First(System.Activity.Attachments).Content, name: First(System.Activity.Attachments).Name }])

i always get errors : 

aiModelActionBadRequest

Can you help me ?
 
I have the same question (0)
  • sandeep_angara Profile Picture
    417 Super User 2025 Season 2 on at
    Pass uploaded file from chat to tools ?
    Can you please post a screenshot or YAML, to better understand the issue?
     
    Regards,
    Sandeep Angara
  • CU17110841-0 Profile Picture
    4 on at
    Pass uploaded file from chat to tools ?
    To perform this test, I created a Copilot agent with multiple PDF files containing service pricing information.
    The agent in question works well and ultimately provides me with a coherent quote after some questions / answers.

    I wanted to see if it was possible to directly submit a PDF file containing the customer's request, but it does not work.
    So I added a Request-type tool with a GPT prompt.
    This tool works in test mode: I upload a PDF file, it understands its content and gives me a clearer text describing the requirement.
    But it doesn't work in the Copilot agent.

    I wonder if I should use a PowerAutomate flow rather than this Request-type tool directly.
  • CU17110841-0 Profile Picture
    4 on at
    Pass uploaded file from chat to tools ?
    Hello,

    I'm back with my problem.
     
    To debug i create a powerautomate flow wich call my API endpoint and it's working (detection of newfile in Sharepoint, send to api, response in JSON).

    Why is it not possible to do the same thing easily with Copilot?

    I read theses docs : 

    https://learn.microsoft.com/fr-fr/microsoft-copilot-studio/image-input-analysis
    https://learn.microsoft.com/fr-fr/microsoft-copilot-studio/guidance/pass-files-to-connectors

    I discovered that in the meantime it was not possible to transfer files in test mode.

    Please help, it's so frustrating...

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Coming soon: forum hierarchy changes

In our never-ending quest to improve we are simplifying the forum hierarchy…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Copilot Studio

#1
Romain The Low-Code Bearded Bear Profile Picture

Romain The Low-Code... 304 Super User 2025 Season 2

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 224 Super User 2025 Season 2

#3
Sam_Fawzi Profile Picture

Sam_Fawzi 78 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics