Forum Discussion
Copilot Studio Agent Tool Not Detecting File Input from Power Automate Flow
Hi everyone,
I'm facing an issue with Copilot Studio and Power Automate Agent Flows.
I created a flow using "When an agent calls the workflow" with the following inputs:
- RequestPayload (Text)
- AttachmentFiles (File)
The flow saves successfully and the File input is visible in Power Automate.
However, when I add the flow as a Tool in Copilot Studio, only the text input is detected:
- RequestPayload
The File input (AttachmentFiles) does not appear in the Tool Inputs section.
What I've tried:
- Removed and re-added the tool
- Refreshed the tool schema
- Created a brand-new V2 flow
- Changed the File input name multiple times (AttachmentFiles, UploadedFiles, FuelAttachments, etc.)
- Saved and republished the agent
- Removed and re-added the flow multiple times
The result is always the same. Only the Text input is exposed in Copilot Studio.
Additionally, if I manually try to add an input named "AttachmentFiles" in the Tool configuration, Copilot Studio returns:
"There is an error: 'DuplicateItem'"
This makes it seem like Copilot Studio recognizes the input internally, but it is not rendering or exposing it in the Tool UI.
Questions:
- Are File/File Collection inputs currently supported for Agent Tools in Copilot Studio?
- Has anyone successfully passed uploaded files from an Agent to a Power Automate flow using Tool inputs?
- Is this a known limitation or a bug?
- Is there a recommended workaround for sending PDF/JPG attachments to a flow from an Agent?
Any guidance would be greatly appreciated.
Thank you.
1 Reply
- mohitmohanmenon_93Copper Contributor
Try the below:
- On the trigger, replace FuelAttachments (File) with two Text inputs- FuelAttachmentContent and FuelAttachmentName.
- These will then show up in the Tool’s Inputs list exactly like RequestPayload does now, since Text is clearly supported there.
- Map them via the Customize (pencil) option using a Power Fx formula which is pulling from the conversation’s attached file (e.g. First(System.Activity.Attachments).Content / .Name, or the relevant Topic.<var>.Content/.Name if it’s captured via a Question node first).
- Inside the flow, decode back to binary where needed with base64ToBinary(triggerBody()?['FuelAttachmentContent']) before handing it to whatever downstream action consumes the fuel receipt/attachment.