Building and customizing solutions using Microsoft 365 Copilot APIs and tools
In Copilot Studio topics, Document Output Content Bytes is not directly available as a topic node output after publishing. To provide a downloadable document URL in a published agent, the supported pattern is to use a cloud flow as an intermediary.
Use this setup:
- Create an instant cloud flow with a Copilot Studio trigger.
- Add Run a prompt and select the prompt that generates the Word document.
- Add Create file using OneDrive or SharePoint.
- In File content, map Document Output Content Bytes from the prompt output.
- Add Create sharing link for that file.
- Add Return value(s) to Power Virtual Agents and return the sharing link as an output such as
DocumentURL. - In the topic, add Call an action and call that flow.
- Store the returned
DocumentURLin a topic variable. - Send that variable back in a message so the user gets a downloadable link.
This is the documented way to make generated documents downloadable in a topic after publishing.
If the agent is powered by the GitHub Copilot harness, created files can also be surfaced to users as a created file card with a Download action in preview and published channels.
Also verify that the published version being tested is the latest one:
- Republish the agent after saving changes.
- Start a new conversation in the published channel when testing.
- If testing in Teams, publish first for Just you and validate there before wider rollout.