Hi All,
I'm learning to use copilot step by step. I have built an agent whose goal is to draft a report which is divided in title, + six sections. After that I'd like my agent to allow me to locally download the word file. For this I built a flow that basically takes from the chat the final draft of the document input text "Chatcontext", runs a prompt with output type document (i have uploaded the template and testing the prompt it works perfectly), and then finally the agent should respond with the output "file" value: Document output Content bytes.
Now what happens is that i tried connecting this to my agent once as a tool and once as a topic:
1) As a tool: the flow succeeds but my agent returns this error:
Only once it actually generated a md file but not following the template. however i don't understand why it doesn't work as the flow hasn't got any error and succedes but there must be some problem with the way my agent reads the output. (the test on the run a prompt was perfect). I see that the input is taking only the document and not all the chat (i tested the flow manually with the same input and the prompt runs)
I tried another flow where i get the output of the prompt in a one-drive word document and it works so I don't understand why locally it can't do it.
2) As a topic: i tried setting a topic as follows (connected to the same flow)
but it gives me this other error:
Error Message: The parameter with name 'document' on flow 'ReqWord' ('3630ff6f-ecfd-f011-8407-000d3a66be99') evaluated to type 'StringDataType' , expected type 'FileDataType' Error Code: FlowActionBadRequest Conversation Id: 0bd78cf4-2e61-4515-a03b-928058990c63 Time (UTC): 2026-01-30T20:13:29.746Z
Can anyone help me understand what's happening and why it doesn't work? :(
Thank you in advance!