In the last post we covered that AI agents often 'need help' - to be equipped with tools they can call to get important steps done to reach the outcome. Anyone creating an agent will often find the need to provide a couple (or more) of pre-defined tools which wrap up the complex details of taking actions on specific systems, integrating data, or performing precise steps in a process. Every agent framework has such a concept, and as covered last time these are 'workflows' in Copilot Studio - a name change from what was previously known as 'agent flows'.
The key to effective agents in the Microsoft space is often having a core understanding of how the wider Microsoft 365 ecosystem works so you can easily leverage existing building blocks - the Power Platform, SharePoint, and Teams are all good examples. Employees expect agents, apps, and automations to fit with their work and so often the data, documents, and resources sit in Microsoft 365 somewhere for a Microsoft-centric organisation. In this post we'll explore agents creating templated documents e.g. a formatted Word document like a proposal, report, contract, or letter - such a common real-world need for automation scenarios, and the key to it is leveraging existing building blocks.
But first, here's a recap of the full series:
Articles in this series
- Techniques for autonomous agents in Copilot Studio - intro
- Scenario video - Microsoft architect with proposal generation
- Technique 1 - Getting AI-suitable descriptions right - data, tools, agents themselves
- Technique 2 - Define explicit steps in agent instructions when "reasoning the process" isn't appropriate
- Technique 3 - Provide tools for steps your agent can't easily handle [like agent flows]
- Technique 4 - Leveraging Power Platform and Microsoft 365 capabilities in your agents (this article)
- Technique 5 - Understand cost, capability, and governance implications of agents you create
The Microsoft 365 Document Generation Landscape
Before diving into the approaches that actually work well today, it's worth taking a quick look at the full picture, including some of the options that are not yet reliable.
The Word MCP Connector (Work IQ) - promising, but not yet there (mid 2026)
Microsoft has been rolling out a set of MCP (Model Context Protocol) servers under the Work IQ banner, including one for Word. In principle, this is an exciting development: it would allow your agent to interact with Word documents in a more conversational, AI-native way - creating, editing, and populating documents through natural language rather than through structured connector actions.
Happily, there are other tried and tested ways to automate templated document creation in Microsoft 365.
Approach 1: Word Online Connector — "Populate a Word Template"
This is the route Microsoft most commonly points you to for automated Word document creation, and it does work to an extent — but it's also a bit legacy and has limitations.
How it works
The Word Online (Business) connector in Power Automate includes an action called "Populate a Word template". You'll find it here:
So the process is:
- Design your document layout in Word as normal.
- Position your cursor where you want a dynamic value to appear.
- Insert a Plain Text Content Control.
- Open its properties and set the Title and Tag to a meaningful name — for example, I have
ClientName,ClientRequirement, andProposedApproachin my template. These names are what you'll reference in your flow. - Save the template to a SharePoint document library.
One thing to be aware of: keep your template in .docx format (not .dotx). The connector works with standard .docx files — no need to use the Word template file type.
The catch: don't call this directly from an agent tool
Here's the important gotcha that may save you some head-scratching. If you try to use the Word Online connector and "Populate a Word template" action directly in an agent tool - that is, going into the Tools area of your agent and creating a new tool using the connector- you'll run into a problem with the document library picker.
The picker that lets you select your template file relies on a GetDrives API call to enumerate the available libraries. When invoked in the context of an agent action directly, this call doesn't behave as expected, and the picker fails to resolve properly. The result is that you can't successfully configure which template file to use, and the action doesn't work.
The solution is straightforward: use this action inside a Copilot Studio workflow (agent flow). When you build the "Populate a Word template" action as part of any kind of Power Automate cloud flow, the picker behaves correctly in the Power Automate designer. You can select your template file without issues, and the flow runs reliably when triggered by the agent at runtime. You'll then create a tool in your agent which references this workflow, and then reference that in your agent instructions.
This is actually a good illustration of why the Copilot Studio workflow pattern is so powerful - it gives you the full Power Automate design surface, complete with all its connector compatibility and picker behaviours, while still making the whole thing available as an intelligent tool to your agent.
The result
Once everything is in place, you'll find the templated document gets ctreated successfully if your agent is doing the right thing and calling your tool. However, the lack of any kind of formatting (even line breaks) within the text dropped into placeholders means the resulting document is very 'low fidelity':
Approach 2: SharePoint connector — "Generate document using Microsoft Syntex" (content assembly)
The second approach uses a different connector and a different underlying technology: SharePoint AI, previously known as SharePoint Premium and Microsoft Syntex. If you haven't worked with these capabilities before, it's Microsoft's content AI woven into SharePoint, and it includes a document generation capability that integrates directly with Power Automate. A long time ago this was known as Syntex Content Assembly, and I wrote about it in a few places including Chris O'Brien: SharePoint Content Assembly - hints and tips
What You Need: Syntex Pay-As-You-Go
Before going further, the prerequisite: Microsoft Syntex Pay-As-You-Go (PAYG) must be enabled on your tenant. Syntex document generation is a metered service, meaning there's a per-transaction cost - for document creation, this is currently $0.15 per document - see Pay-as-you-go pricing for document processing for Microsoft 365 for more details. If PAYG isn't configured via the Microsoft 365 admin centre, the action won't be available.
How It Works
Content assembly works in a very similar way to the previous process, in the sense that it's a question of dropping placeholders into a template and then using that in the automated process. You create and manage the Word templates from within SharePoint itself:
- Navigate to the document library where you want to store your templates
- In the library, select Create or upload → Create modern template (shown below). That's easily missed, so here it is:
- This opens the Syntex template editor, where you work with a Word document and insert field tokens - for each one, use the pane on the right to map these to fields in a SharePoint list or library you have. I document the full process with screenshots at Automate creation of new documents with SharePoint Syntex Content Assembly if helpful
- Give each field a meaningful name, save and publish the template
The template is stored in a hidden area of the document library in SharePoint.
Building the Flow for your agent
In Copilot Studio, create a new workflow - in the flow designer, add the SharePoint connector and look for the "Generate document using Microsoft Syntex" action. You'll configure:
- The Site, Template library, and Template (your Syntex template).
- The Document library and File name for the output document.
- The field values — these appear as inputs corresponding to the
{{FieldName}}tokens in your template. Map these to the dynamic content coming from your agent flow inputs i.e. the parameters passed into the flow (you'll need to define these on the flow trigger).
The action generates the populated document and saves it to the specified SharePoint location. You can then return the document URL or other metadata back to the agent as the flow output.
The result
The output isn't radically different, but even the fact that we have line breaks and paragraph structures just makes the resulting document more usable:
Another benefit of this approach is that by going via a SharePoint list, you also have a nice audit log of every agent output which made it's way into a document. Because this is in list format and not just inside a document, you can use all the benefits of lists like filtering, sorting, formatting, rules and notifications etc.
Closing the loop: Microsoft 365 automation skills are a core ingredient for agents
When people think about building autonomous agents in Copilot Studio, the conversation often gravitates towards the AI capabilities — the reasoning, the multi-step planning, the conversational handling. All of that matters. But some of the most impactful things your agents can do aren't sophisticated AI capabilities at all - they're automation capabilities. The ability to create a document, save it to the right place, send a notification, look something up in a list — these are table stakes for agents that do real organisational work.
What that means is that Microsoft 365 and Power Platform skills aren't just helpful context for someone building Copilot Studio agents, they're pretty much essential. Understanding how connectors work, knowing which actions are available and what their quirks are, knowing when Syntex PAYG is a prerequisite — these are the practical details that separate an agent that works in a demo from one that works in production.
In Copilot Studio, workflows/agent flows are the mechanism that lets you bring all of that automation capability into your agent's toolkit. The pattern we've worked through in this post — gather information through conversation, execute document automation via an agent flow, deliver the result — is a pattern you can apply to a huge range of real business scenarios. Once you have a solid mental model of what to lean on in the Power Platform and wider M365 and how to surface it through workflows, you're able to automnate a lot of work and get great outcomes from your agents.
In the next post in this series, we'll look a final vital dimension of running agents successfully in production — avoiding the pitfalls which could mean your agent is hugely expensive, and how to lay down appropriate cost governance guardrails and monitor effectively. But that's for next time.
Next article (coming soon)
Technique 5 - Understand cost, capability, and governance implications of agents you create






