Ā· 10 min read

Building a blog post helper agent for Microsoft 365 Copilot

In my journey with Microsoft 365 technologies, I write blog posts to share my knowledge. Recently, I explored creating an AI agent with Microsoft 365 Copilot to assist in content creation. As an MVP, I often write late at night, so an AI helper can kickstart my blog posts, generate imagery or check my paragraphs.

In my journey with Microsoft 365 technologies, I write blog posts to share my knowledge. Recently, I explored creating an AI agent with Microsoft 365 Copilot to assist in content creation. As an MVP, I often write late at night, so an AI helper can kickstart my blog posts, generate imagery or check my paragraphs.

Introduction

In my exploration of Microsoft 365 technologies, I do like to write blog posts with a goal to get more knowledge out of my head and into the public domain. Given my recent work and exploration with Microsoft 365 Copilot, I had the idea of writing an agent to help in the content creation process.

As an MVP, I write content out of work time, in the evenings, sometimes late, where my creativity, spelling or grammer isnā€™t at its best. So having a AI helper would at least get me started with a blog post or sense check a paragraph.

Whilst I often donā€™t agree with the outputs, I do find it easier to spot the flaws rather than create from scratch - I just find it easier. Perhaps I am becoming a critic as I grow up lol.

So there are common features that I would want in a agent, such as:

  • Suggest an introduction based on a topic
  • Generate blog post header imagery - you may have noticed that I use ā€œMicrosoft Designerā€ like generated AI headers, I have no issue with trying to generate an AI image to represent an article in the interest of speed. Although, I would wish my prompts would contain more humour lol.
  • Review existing articles, or Find content that I would reference quickly, which means focusing the web features on just my blog post as a data source.

In my flow of creating blog posts, it would be easier to create an single place to do these common activities.

Note: I donā€™t really generate text for my blog posts, I like to practice the art of writing, however, I could use the pointers for self improvement. I am typically transparent about use of AI use.

Creating the agent

For this agent creation, I am going to assume that you know how to create an agent for Microsoft 365 Copilot, if not, I would recommend checking out a this article that can get you started.

Note: You will need a Microsoft 365 Copilot license and a Microsoft 365 Tenant to provision the app.

With the agent created, I started to setup the agent features such as:

Key components:

  • Instructions
  • Conversation starters

The polishing:

  • Name and description
  • Icon - using a bee from my own website

Overal, the agent took around 30 minutes to create, even the instructions I used from another Copilot to help write them quickly. But here are the respective settings:

Teams Toolkit generated blog post helper with the settings configured

There is a lot to unpack here.

When you create a Declarative Agent with Teams Toolkit, you are provided with a default structure, for this agent, majority of the changes are made in the appPackage folder to the:

  • manifest.json - the key file for all Teams based solutions, to describe the custom feature, in here the name and descriptions were altered to best describe what this customisation is doing.
  • declarativeAgent.json - the key plumbing here:
    • Capabilities, I wanted to target the webSearch capability to just my website, and add the brand new additional capabilities, GraphicArt to enable generatation of images for my blog post headers, and CodeInterpreter where often I write samples and code in my blog post, to take advantage of these features too.
    • Conversation Starters - these are super useful for reminding me what I wrote this agent to do lol, and to get something moving in terms of starting a conversation going with the agent inline with my flow of work.
  • colour.png and outline.png to give an element of branding to the agent, really helps make it pop.

My instructions.txt file content (this might be long):

You are a declarative agent that assists users in authoring, reviewing, and creating blog posts. You should support image creation and code interpretation to enhance the content creation process.

Examples of Capabilities and kinds of requests from the user:

Blog Post Authoring

- Assist users in drafting blog posts by providing writing prompts, structure suggestions, and content ideas.
- Offer grammar and style suggestions to improve readability and engagement.
- Generate introductory and concluding paragraphs based on the main content.

Blog Post Reviewing:

- Review and provide feedback on draft blog posts, focusing on clarity, coherence, and overall quality.
- Highlight areas for improvement and suggest edits.
- Check for plagiarism and ensure originality.

Image Creation such as blog post headers:

- Generate relevant images based on the blog post content.
- Provide options for different styles and formats (e.g., infographics, illustrations, charts).
- Ensure images are high-quality and appropriately licensed for use.

Code Interpretation:

- Interpret and format code snippets included in blog posts.
- Provide syntax highlighting and error checking for various programming languages.
- Suggest improvements or optimizations for the code.

Instructions for Use

Starting a New Blog Post:

- Prompt the user to provide a topic or main idea.
- Offer a structured outline to guide the writing process.
- Suggest relevant keywords and phrases to include.

Reviewing a Draft:

- Analyze the draft for grammar, style, and coherence.
- Provide detailed feedback and suggest specific edits.
- Highlight any potential plagiarism issues and suggest rephrasing.

Creating Images:

- Ask the user for a description of the desired image.
- Generate multiple image options and allow the user to choose.
- Ensure images are optimized for web use and properly attributed.

Interpreting Code

- Detect code snippets within the blog post.
- Apply syntax highlighting and check for errors.
- Offer suggestions for improving the code's efficiency and readability.

Example Workflow
User: "I want to write a blog post about the benefits of using AI in Microsoft 365."
Agent: "Great! Here's a suggested outline: Introduction, Benefits of AI in Microsoft 365, Case Studies, Challenges and Considerations, Conclusion. Would you like to start with the introduction?"
User: "Yes, please."
Agent: "Here's a draft introduction: 'Artificial Intelligence (AI) is revolutionizing the IT industry by improving diagnostics, plans, and outcomes. In this blog post, we will explore the various benefits of AI in Microsoft 365 and examine real-world case studies.' How does this sound?"
User: "Looks good. Can you add an image of a blog robot?"
Agent: "Sure! Here are three options for images of blog robots. Which one would you like to use?"
User: "I'll go with the second one."
Agent: "Image added. Now, let's move on to the next section: Benefits of AI in Microsoft 365. Here are some key points to include..."

I had used the Microsoft 365 Copilot to help generate the initial Instructions.txt file, since blogging is a well established expression. However, this is a key file and overtime I fully expect to revise this, once I get settled into using the agent. Iā€™m sure there will be nuances that I will need to account for.

Example Introduction

So letā€™s test this out to write an introduction:

Declarative agent helper writing an introduction in Microsoft Teams Chat

I decided to ask for a revision to make it less formal, I prefer some flex in style, humour, not everything needs to be super professional.

Declarative agent helper writing an introduction in Microsoft Teams Chat with a revision to make less formal

Which do you prefer?

But as you can see, already, this has given some inspiration to start with - however, I would probabily, use a review after to suggest improvements on the next post more so or make quick tweaks, in these cases.

Example Blog Post Image Header

A blog post image header, I often use Microsoft Designer, but that means going to another site, with another account and wanted an easier workflow, so having this in Teams Chat close to my flow makes using this feature much easier.

So for this example, given the large context window I could use (16k), I copied the entire text of this post into the dialog and requested a summary which resulted in the following:

Preparation text using a summary of the whole blog article

Using the summary, I then requested to generate an image to represent the blog post and this is the result:

Generated set of four images

Interestingly, the image prompt that was automatically created was ā€œA summary of a blog post about creating an AI helper for content creation, with a new year, sun shining feelā€ so maybe I donā€™t need the whole context of the blog for images - but hey, from an effort point of view that was pretty easy to generate.

Iā€™ll use the first image. šŸ‘

Post Reviews - using this post after publishing

Update: 07/01/2025 - I have used this post as the review to add this section, oh what fun lol

I have expanded on this post to include a review of this post after publishing, whilst I could do this before on a draft by pasting all the text into the chat window - you have up to 16K tokens to use which can accommondate most posts. However, I want to demonstrate the usefulness of a post review, to get the advice from agent to suggest improvements.

Now this article is live, lets do this, to confirm the post is live and can be referenced by the agent.

Blog Post Review with the Blog Helper Agent

Please give me suggestions:

Blog Post Review with the Blog Helper Agent

Woah that is cool, clearly there is room for improvement, definitely might consider some of these suggestions for future posts - but lets see a deeper example:

Blog Post Review with the Blog Helper Agent - Generate a better conclusion

I like the ideas, my conclusion (below), could use some improvements, but I think id prefer a less formal tone, which then becomes this (see below) - What do you think? Better but does still have that AI smellā€¦

To wrap things up, the blog post helper agent for Microsoft 365 Copilot is a game-changer for anyone into content creation. This AI tool makes writing easier and more fun, from crafting catchy intros to designing cool headers and giving useful feedback on your drafts. As AI continues to evolve, tools like this will become must-haves for bloggers and content creators. So, why not give the blog post helper agent a try and see how it can boost your writing process? Happy blogging!

Conclusion

This is an interesting concept for me, new and will be evaluating if this does quicken my workflow. Also, slightly curious and having fun with Blog Helper Agent inception (if you have seen the film), now it can reference a post about how to create itself lol.

I plan to release this as a community sample shortly, to provide you with a template of how you can use your blog post or company content in such a manner.

Update 07/01/25: The source code has now been approved by PnP Team, here is the sample: https://github.com/pnp/copilot-pro-dev-samples/tree/main/samples/da-BlogPostHelper

Resources

The following resource could be useful for you to learn further:

Transparency Notice: Content within this post was assisted with AI to speed up the writing process and experimentation on my part, accuracy has been checked and adjusted where needed.

Enjoy!

Share:
Back to Blog