I have created an agent that create a word document, it works in testing env but not after publishing.

Kumar, Saket 0 Reputation points
2026-09-02T15:28:07.0166667+00:00

A word document gets created in testing env, but not after publishing.
I created agent from copilot studio, after publishing it's creating but not providing downloadable url that it does in testing env.
Snapshot attached for reference
Screenshot 2026-09-02 165225

Microsoft Copilot | Microsoft 365 Copilot | Development
0 comments No comments

1 answer

Sort by: Most helpful
  1. AI answer

    2026-09-02T15:28:22.7833333+00:00

    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:

    1. Create an instant cloud flow with a Copilot Studio trigger.
    2. Add Run a prompt and select the prompt that generates the Word document.
    3. Add Create file using OneDrive or SharePoint.
    4. In File content, map Document Output Content Bytes from the prompt output.
    5. Add Create sharing link for that file.
    6. Add Return value(s) to Power Virtual Agents and return the sharing link as an output such as DocumentURL.
    7. In the topic, add Call an action and call that flow.
    8. Store the returned DocumentURL in a topic variable.
    9. 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:

    1. Republish the agent after saving changes.
    2. Start a new conversation in the published channel when testing.
    3. If testing in Teams, publish first for Just you and validate there before wider rollout.

    AI-generated content may be incorrect. Read our transparency notes for more information.

    Was this answer helpful?

    1 person found this answer helpful.

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.