Custom Microsoft 365 Copilot Agent for Word: Creating and Pasting Tables

Last updated on December 10, 2025
I had a project where the customer wanted Microsoft 365 Copilot to generate a table of meeting attendees that they could easily include in the Word document for the meeting minutes. The table needed to include the names of the people who had actually attended the Teams meeting, their organization (determined by email domain), role, and meeting join and leave times.
Because the data in the table had to be 100% correct, I could not rely on AI to generate it. AI is a probabilistic technology. It gives you an answer that has the highest probability from the AI’s point of view to be the one you want, but it can most definitely also give you very convincing-sounding but completely inaccurate information. Hence, I needed to get the attendance report via Microsoft Graph, the “traditional way”. But we could still use the Microsoft 365 Copilot chat panel in Word for easy pasting of the resulting table.
After considering the capabilities of the different pro-code and low-code agent-building tools, I ended up going with Copilot Studio, because at the end of the day, all I really needed to do was send a couple of adaptive cards to the user and call Microsoft Graph. Thus, I created a custom connector to call the Microsoft Graph using the agent user’s identity, so the agent could access the user’s calendar and Teams meeting information. The agent first asked the user to specify the meeting date, then fetched Teams meetings on that day from the user’s calendar, and asked the user to specify the meeting for which they wanted the attendance report. Then it was just a matter of getting participant information from Microsoft Graph and sending the data back to the user in a table format.
It was all smooth sailing until I published the agent and tested adding the table from the Microsoft 365 Copilot chat panel into the Word document. Even though the table showed up nicely in the chat, when added to the Word document either via the “Add to doc” button or copy-pasting, the result was always plain text, not a table! Infuriating! I tried multiple different table formats before I finally found the one that worked.
- Adaptive card. Showed up nicely on the chat, but when pasted to a Word document, it showed up as JSON.
- Markdown. Showed up nicely in the chat, but when pasted into a Word document, it appeared as raw markdown.
- Basic HTML with table, tr, th, and td tags. Showed up nicely in the chat, but when pasted into a Word document, it appeared as raw markdown.
- HTML with table, thead, tbody, tr, th, and td tags. This showed up nicely on the chat, was added as a borderless table on the document, and as a bordered table when pasted. Success!

Conclusion
This project was a great example of how we can combine the easy-to-use Copilot chat interface with data that users can always trust by integrating the agent logic with Microsoft Graph for guaranteed accuracy. The unexpected twist was that the hardest part wasn’t authentication, permissions, or API calls, but getting Copilot for Word to copy-paste a table from the Copilot chat into the document as an actual table rather than its plain-text markdown.
If there’s one takeaway from all of this, it’s this: when building Copilot experiences, don’t just think about how the data is generated; also consider how it will be consumed. Sometimes, small details, like the difference between a simple