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 - General
Suggested answer

Document generating agent

(1) ShareShare
ReportReport
Posted on by
I would like to create a custom agent in copilot studio that can access templates and other word or pdf files in share point and be able to generate a word document based on the exact instructions that I provide.  This is a contract type of document so the agent must be very accurate to generate the final word document.
Categories:
I have the same question (0)
  • Suggested answer
    Jihane_Lazrag Profile Picture
    7 on at
    Document generating agent

    1. Create the template 

    To do this , you need to define the template and store them in a dedicated SharePoint library (e.g., “Contract Templates”), it is easily when using office documents like word rather than pdf.​​​​​​

    2. Build a Power Automate Flow

    • Trigger: From Copilot Studio (via “Call an action” node).
    • Actions:
      • Get file content → from SharePoint (the chosen template).
      • Populate template → with dynamic values you pass in (using Word Online (Business) connector: “Populate a Microsoft Word template”).
      • Save the file → back into SharePoint (e.g., “Generated Contracts” folder).
      • (Optional) → Convert to PDF and save alongside the Word file.
    3.Build the Copilot Studio Agent
    • Define Topics: e.g., “Generate NDA”, “Draft Service Agreement”.
    • Entity Extraction: Collect required inputs from user (e.g., Client Name, Start Date, Jurisdiction).
    • Call the Power Automate Flow:
      • Send these inputs as parameters.
      • Flow returns the link to the generated document.
  • Suggested answer
    Arild Aarnes Profile Picture
    164 on at
    Document generating agent
    Hi,
     
    Maybe you could take a look at using a prompt to do that. There is new functionality in preview where you can generate a document based on a template as your output. I think you would need to do something like that to make sure the contract is accurate. This is in preview but looks promising for what you are after.
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

MS.Ragavendar – Community Spotlight

We are honored to recognize Ragavendar Swaminatha Subramanian as our September…

Leaderboard > Copilot Studio

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#2
Romain The Low-Code Bearded Bear Profile Picture

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

#3
trice602 Profile Picture

trice602 166 Super User 2025 Season 2

Last 30 days Overall leaderboard