Sunday, 29 March 2026

Autonomous agents - Technique 4: Leveraging Power Platform and Microsoft 365 capabilities

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

  1. Techniques for autonomous agents in Copilot Studio - intro
  2. Scenario video - Microsoft architect with proposal generation
  3. Technique 1 - Getting AI-suitable descriptions right - data, tools, agents themselves
  4. Technique 2 - Define explicit steps in agent instructions when "reasoning the process" isn't appropriate
  5. Technique 3 - Provide tools for steps your agent can't easily handle [like agent flows]
  6. Technique 4 - Leveraging Power Platform and Microsoft 365 capabilities in your agents (this article)
  7. 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.

In practice, the Word MCP connector is not yet reliable enough to build production workflows on. I couldn't get it to work at all for document creation, so you can't depend on it for anything critical. That said, it's worth keeping an eye on as this area matures - Microsoft are clearly pushing hard on MCPs for all Microsoft services and Graph API capabilities, and this will likely improve significantly over the coming months.

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:

The concept is what you'd expect: you create a Word document that serves as a template, add placeholders to it in the appropriate places, and then when the action runs, it drops values into those placeholders using whatever your agent passes in. To set up the template, the first step is to enable the Developer tab in Word. Once that's done, you should be able to drop in content controls into your template - within the Developer tab, they're found in the Controls section highlighted below:





However, notably only the plain text control is supported for the Power Automate connector - rich text is not supported. This is quite limiting unfortunately and means your output documents may not be as well formatted as you'd like. As you're setting up the template and dropping content controls in, you give each one a title and a tag that identifies it - these are the keys by which the Power Automate action will recognise and populate each placeholder.

So the process is:

  1. Design your document layout in Word as normal.
  2. Position your cursor where you want a dynamic value to appear.
  3. Insert a Plain Text Content Control.
  4. Open its properties and set the Title and Tag to a meaningful name — for example, I have ClientName, ClientRequirement, and ProposedApproach in my template. These names are what you'll reference in your flow.
  5. 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':

So, let's explore other ways of leveraging Microsoft 365 building blocks.

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:

  1. Navigate to the document library where you want to store your templates
  2. In the library, select Create or upload → Create modern template (shown below). That's easily missed, so here it is:
     
  3. 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
  4. 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:

So, fidelity of documents generated this way tends to be noticeably better than the Word Online connector approach - which matters a lot when documents will be read or shared down the line. In the context of the process we're automating in this series with the Advania Tech Architect agent, it means our architects now have an easier time of coming to this document and building on it to make it client ready. They can now come in and start the validation process, fact checking the agent outputs, adding detail related to the project or requirement, and generally taking the agent outputs and adding the human layer and expertise to make it a worthy artifact which can have the Advania name on it.

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

Saturday, 31 January 2026

Autonomous agents - Technique 3: Provide tools for steps your agent can't easily handle (like Agent Flows)

Continuing the theme of this series on how to build effective AI agents which have some autonomy and operate on the instructions you give, we need to address another aspect of keeping an agent on rails - specifically, when agents take action. That might be updating an external system or database, sending an e-mail or other message, asking for human approval in a step, cross-referencing some organisational data, or any number of other things we may want an agent to do. The challenge is that steps like these often need to be very defined and exact - simply specifying what should happen in agent instructions is often never going to work. "Update our CRM with the new lead details" or "Raise an invoice for the order" are vague guidance with nowhere near enough context - even the most capable AI agent backed by the latest LLM will fail on those without help. If the agent could talk it would conceivably say "What CRM, where? How do I authenticate? How are leads stored, and how do I ensure the lead is associated with a client and I'm not creating a duplicate?" 

In the last post we focused on writing good instructions for agents - but most agents need more than that. They need to call out to tools which are pre-defined and wrap up the complex details of taking actions on specific systems, integrating data, or performing precise steps in a process. Every agent framework has a 'tools' concept, and for Microsoft agents built with Copilot Studio, this is agent flows - ultimately Power Automate flows triggered from Copilot Studio agents which. This post covers how to make your agent more reliable in actions it performs by calling out to agent flows, including the specific help Microsoft give you to simplify this.  

But first, here's a recap of the full series:

Articles in this series

Agent flows - what are they?

As a concept, agent flows isn't anything too new - this is Power Automate within the Microsoft ecosystem but adapted for the AI and agent world. An agent flow is essentially a Power Automate cloud flow which can only be called from an agent. Here's a quick primer on some of the differences and commonalities:

Agent flows - a primer
  • Agent flows share the same workflow designer as Power Automate, the same set of connectors, and the same approach to key concepts like triggers, actions, child flows, and variables
  • An agent flow must be created in Copilot Studio (not Power Automate) and start with the Run a flow from Copilot trigger and finish with the Respond to Copilot action.
  • Licensing is different - Agent Flows run under Copilot Studio licensing rather than Power Automate licensing (i.e. they consume Copilot credits)
  • Agent flows can use Premium connectors without charge (since it's being covered by the Copilot Studio licensing)
  • Agent flows DO bring special support for calling from agents - in particular, if your flow has a series of input parameters (let's say pieces of an address), the agent can automatically determine which pieces of data it should pass to each. This works surprisingly well if you name your inputs properly - more on this later
  • Agent flows are designed to be shared across agents - they essentially become a toolkit of well-defined actions and sub-processes used by your agents, some of which may be specific to an agent and some shared across many
  • Agent flows give better tracking, analytics, and overall control across the actions they take compared to steps an agent would run just from it's instructions - this is helpful in anything you need full control and monitoring over 

This is essentially 'tool calling' in the Copilot Studio agent world.

How agent flows are used in my scenario

Agent flows give us consistent execution across processes and actions - and since we all know about the non-deterministic nature of LLMs by now, it's clear that many agents need this. For the 'technology architect agent' discussed in this series, if you read the the last article you might remember we were hitting issues trying to get the agent to do certain things:
  • Issue 1 - agent was failing to create the Word proposal document as requested - which we said would include the technology recommendation, rationale, and licensing uplifts etc. required for this change
  • Issue 2 - agent was failing to log it's output to a SharePoint list as requested - this is to give a simple audit trail of requests and corresponding recommendations
Agent flows are needed to fix this.

I created two flows, one for each sub-process:

Let's look at these one by one. 
Agent flow to create proposal document
The objective here is to:
  • Creating a draft customer proposal containing all the details of the technology upgrade that the agent has determined - essentially, accelerate our consultants who would normally create such documents from scratch
  • Ensure the document is on the Advania branded Word template 
So this is essentially "create a templated document and drop information into placeholders". There are a few ways to do this in Microsoft 365, and this agent flow effectively automates my chosen approach - I'm using a capability in SharePoint Premium/Syntex called Content Assembly, and this provides a handy Power Automate action. Here's the start of the flow in designer:

We'll go into this in more detail in the next post - Technique 4 - Leveraging Power Platform and Microsoft 365 capabilities in your agents. The key message is that to build effective low-code agents in the Microsoft world, you need a solid understanding of wider M365 building blocks and how these can be plugged into your agents - otherwise you'll hit limits of agent building and automation. 

To summarise here, the approach I'm using for templated document creation is a Microsoft Syntex/SharePoint Premium capability called Content Assembly. I've already done the setup work for this which involves:
  • Creating a SharePoint list with columns for all the info pieces your document needs
  • Creating a 'modern template' in SharePoint, where you upload your branded document and insert placeholders in the right locations for each piece of data to be dropped in
For full details of on this approach, see my article Automate creation of new documents with Syntex Content Assembly.

For my agent, the piece which does the magic is this item - the 'Generate document using Microsoft Syntex' action available in Power Automate and therefore agent flows. Individual blocks of text like the client name, requirement summary, proposed approach etc. are passed into this action for them to be dropped into the document:
 
 
What's happening here is that these pieces of data are being retrieved from a SharePoint list item and then passed into this action, and therefore the document. But that needs something to create the list item in the first place, and that's our agent itself - and specifically, it's my other agent flow which does that step. Let's look at that now.
Agent flow to create SharePoint list item with agent's output
To show what's happening here, let's start with the actual list that stores this data - here's a partial view of it:

The full list of columns is:

All of those items are dropped in by the agent. This is where we come to the important support that agent flows give in simplifying all this - "proactive slot filling". Because my agent flow has three clear input parameters, I can simply ask the agent to work out what to pass in from their names - and again, this is a place where descriptive naming and rich descriptions are absolutely critical for AI and agents, I named them carefully. To do this, in the Tools > Inputs area of my agent I use the "dynamically fill with AI" option for each parameter:

With the 'dynamically fill with AI' approach, the agent itself works out what to pass into each parameter based on their name and pieces of information it's already determined from the conversation. There's quite a bit to what's possible here and Microsoft document it at Implement slot-filling best practices - it's essentially NLU working with some pre-determined entities and the ability to define your own. What this means is you don't need to do the work of parsing out individual pieces of information from either the agent's earlier output or queries and prompts supplied by the end-user - this is AI running over the user/agent conversation so far and extracting what it thinks the right answers are likely to be. The alternative would be you doing this hard work and then passing in 'hard-coded' values to your flow parameters. Of course, the dynamic AI approach won't always work perfectly and it's an area of agent development that needs careful scenario testing using different types of data - and to say it one more time, good naming is critical of course or the AI has no chance.

So that covers how data gets passed in, and from there it's down to whatever steps you implement in your flow using all the standard Power Automate capabilities. As you can imagine, to create our SharePoint list item which then drives the proposal document creation I simply use the SharePoint connector's Create Item action:

Thus, we now have our automation chain of:
  1. Architect asks the agent for a proposal on how the client's use case should be addressed
  2. Agent uses it's data sources and reasoning to derive an approach that makes sense for this client (based on stated needs, technologies in play or suitable to adopt, licensing etc.)
  3. Agent provides it's response
  4. Agent calls tool (agent flow 1) to add SharePoint list item containing key elements of the response
  5. Agent calls tool (agent flow 2) to create the Word proposal document on the Advania branded template using the SharePoint list item
  6. Agent notifies user that it's done
We now have a fully working agent doing it's advanced reasoning and creating the draft proposal document for our architect to enhance and take forward to the client.

The result

Now that we codified exactly where and how to create proposal document (via the agent flows), we now have a document successfully dropped into my chosen SharePoint library:

The draft proposal has all the details of the agent's output and was created on our organisational template:


The next step is to start analysing and enhancing the agent's output - checking the reasoning, architectural and licensing guidance, and turning this into a polished client-ready proposal. But the heavy lifting of contemplating the requirement, embarking upon the research, considering different options, ensuring each granular requirement specified by the client is met, deriving any licensing considerations and uplifts, then structuring a draft proposal - all this is done.

A word on Express Mode for agent flows

A final thing to understand about agent flows is express mode. In Microsoft's framework, agent flows fail if they take longer than two minutes to execute - express mode is a way of opting-in to model giving faster execution times with some limitations, and it's for agent flows only rather than extending to Power Automate flows too. There are no additional costs or licensing implications, but the limitations need to be understood - more on this at https://learn.microsoft.com/en-us/microsoft-copilot-studio/agent-flow-express-mode

Summary

In this article, we focused on one of the most important ingredients for building dependable agents - giving them the right tools to perform precise, repeatable actions. In the Copilot Studio world, this is agent flows. While agents excel at reasoning and orchestrating conversations, they simply can’t execute structured operations (like updating systems, creating documents, or logging data) reliably without clearly defined, deterministic steps. I don't see this changing too much even as models and agent frameworks evolve over the next few years. 

We explored how agent flows act as the “hands” of your agent, wrapping complex processes into reliable Power Automate cloud flows. You get predictable execution, premium connector access, consistent handling of structured data, and better monitoring and governance. Using the architect proposal scenario, we walked through how two agent flows - one to log outputs into SharePoint and another to generate a branded proposal document - take the agent from being a conversational assistant  to providing real automation of the process. We also looked at how dynamic slot filling removes the need for brittle manual parsing, allowing the agent to intelligently map conversation data into flow inputs.

The result is an agent that not only reasons about a problem but also creates the tangible output - in this case, a ready‑to‑review customer proposal based on our branded Advania template. created from a SharePoint‑based template.

One aspect we didn’t dive into here is billing and capacity consumption, which becomes increasingly important as your agent ecosystem grows. That topic deserves its own space, and we’ll cover it in detail in the final article in this series.

Next article

Technique 4 - Leveraging Power Platform and Microsoft 365 capabilities in your agents