Creating an Automated Agent to Post Historical Computer Events in Teams Daily

image

I recently did a video here –

Video link = https://www.youtube.com/watch?v=KZkhK41lynI

but I’ve now been able to produce the following steps for your to replicate this.

Automate Daily Updates in Teams with Copilot Studio & Power Automate: A Step-by-Step Guide

Ever wanted a little bot to automatically post daily updates, fun facts, or important reminders into your Microsoft Teams channel? Maybe a “This Day in History” update, a daily project status reminder, or a motivational quote?

In this guide, we’ll walk through how to build an automated agent using Microsoft Copilot Studio and Power Automate that posts information to a Teams channel on a daily schedule. We’ll use the example from the video: creating a bot that posts significant computer history events for the current day.

What You’ll Need:

  1. A Microsoft 365 account.

  2. Appropriate licenses to use Power Automate and Copilot Studio.

  3. Access to Microsoft Teams and permission to post in a specific channel.

The Overall Process:

We’ll create a system with a few interconnected parts:

  1. Power Automate Flow #1 (Trigger): Runs once a day on a schedule.

  2. Copilot Studio Agent: Receives a prompt from Flow #1, uses its general knowledge (AI) to find the relevant information (e.g., historical events).

  3. Copilot Studio Topic: Takes the AI-generated response and triggers another flow.

  4. Power Automate Flow #2 (Action): Receives the formatted response from the Copilot Topic and posts it to a designated Teams channel.

Let’s break it down!

Step 1: Create Your Copilot in Copilot Studio
  1. Navigate to Microsoft Copilot Studio.

  2. Create a New Copilot. Let’s name it “History Bot” for this example (the video used “History”).

  3. Configure Basic Details:

    • Name: History Bot

    • Description: An agent that posts historical events daily.

    • General Instructions: Use general knowledge to create a list of historical events that happened on this day relating to computers. (Adapt this instruction based on the type of information you want the bot to post).

  4. Enable Orchestration: Ensure the “Use generative AI to determine how best to respond…” toggle under Orchestration is Enabled. This allows the Copilot to understand the instructions and use AI.

  5. Configure Knowledge:

    • Go to the Knowledge section (you might need to scroll down or find it in the left navigation).

    • Ensure “Allow the AI to use its own general knowledge” is Enabled. This lets the bot search the web based on your instructions. We won’t add specific documents for this example.

Step 2: Create the Daily Trigger Flow (Power Automate Flow #1)

This flow starts the process each day.

  1. Go to Microsoft Power Automate.

  2. Create a New Flow > Scheduled cloud flow.

  3. Configure the Trigger:

    • Give your flow a name (e.g., “Daily History Trigger”).

    • Set the schedule: Repeat every 1 Day.

    • Choose a specific time for it to run (e.g., 12:45 PM as shown in the video).

  4. Add Action: Send Prompt to Copilot:

    • Click “+ New step”.

    • Search for and select the “Copilot Studio” connector.

    • Choose the action “Sends a prompt to the specified copilot for processing (Preview)”.

    • Select your Copilot: Choose the “History Bot” (or whatever you named it) from the dropdown.

    • Prompt: Enter the text you want to send to the Copilot each day. Based on the video and our Copilot instructions, this would be something like: Please tell me about today in history with computers.

  5. Save this flow.

Step 3: Create the Posting Topic in Copilot Studio

This topic handles the response from the AI and sends it to the next flow for posting.

  1. Go back to your History Bot in Copilot Studio.

  2. Navigate to the Topics section.

  3. Optional Cleanup: The video creator removed the default/generic system topics. You might want to do this for a dedicated bot like this to keep things clean, but it’s not strictly necessary.

  4. Create a New Topic > From blank.

  5. Name the Topic: Call it “Post Result”.

  6. Configure the Topic Trigger:

    • Click on the default “Phrase” trigger and delete it.

    • Add a new trigger. Select the trigger type: AI response generated (or similar wording like “On Generated Response”). This means the topic starts after the Copilot AI has formulated its answer based on the prompt from Flow #1.

  7. Add Action: Call Power Automate Flow:

    • Click the + below the trigger and select Call an action > Create a flow. This will open Power Automate in a new tab to create Flow #2.

Step 4: Create the Posting Flow (Power Automate Flow #2)

This flow takes the Copilot’s response and posts it to Teams.

  1. Power Automate should have opened with a trigger “When an agent calls the flow (Preview)”. This trigger will have an input field ready.

  2. Define Input:

    • Click on the trigger step.

    • Add an input of type Text. Name it something descriptive like CopilotResponseContent. This is where the Copilot topic will pass the AI’s generated text.

  3. Add Action: Post to Teams:

    • Click “+ New step”.

    • Search for the “Microsoft Teams” connector.

    • Select the action “Post message in a chat or channel”.

    • Post as: Choose Flow bot.

    • Post in: Select Channel.

    • Team: Select the Team you want to post to.

    • Channel: Select the specific Channel within that Team.

    • Message: Click in the message box. The dynamic content panel should appear. Select the CopilotResponseContent input variable you defined in the trigger step. This inserts the text generated by the Copilot.

  4. Add Action: Respond to Agent:

    • Click “+ New step”.

    • Search for “Copilot Studio” connector.

    • Select the action “Respond to the agent”. (This step simply tells the Copilot topic that the flow has finished). You usually don’t need to add outputs here for this simple scenario.

  5. Save this flow. Give it a name like “Post History Bot Result to Teams”.

Step 5: Connect the Topic to the Flow
  1. Go back to the Copilot Studio tab where you were editing the “Post Result” topic.

  2. The “Call an action” step should now let you select the flow you just created (“Post History Bot Result to Teams”). Select it.

  3. Map Inputs: You’ll see the CopilotResponseContent input field you created in Flow #2. You need to tell the topic what to send to this input.

    • Click the input field.

    • Select the lightning bolt icon (Insert variable).

    • Go to the System variables.

    • Find and select Response.FormattedText. This variable holds the final, formatted answer from the Copilot’s AI generation process.

  4. End the Topic: Add a final step to the topic: End conversation > End current topic.

  5. Save the topic.

Step 6: Testing and Troubleshooting
  1. Test Flow #1: In Power Automate, open the “Daily History Trigger” flow. Click Test > Manually > Run flow. This simulates the daily schedule.

  2. Check Copilot Activity: In Copilot Studio, go to the Activity tab for your “History Bot”. You should see a new session started by the “History Trigger”. It will show steps like “Knowledge sources used” and eventually call the “Post Result” topic.

  3. Check Teams: Look in the designated Teams channel. The message should appear shortly after the flows run successfully.

  4. Troubleshooting Connection Issues (Common Problem):

    • Symptom: In the Copilot Studio Activity > Transcript view, you might see the process get stuck on “Waiting for user” and display a card saying “Additional permissions are required to run this action. To proceed, please select ‘Connect’…” This usually means the connection for Flow #2 (posting to Teams) isn’t working correctly.

    • Problem: The “Connect” button on that card might not work reliably.

    • Workaround 1 (Recommended): In Copilot Studio, go to the Test your agent pane > click the More options (…) menu > Manage connections. This opens the connection management page. Find the connection related to your “Post History Bot Result to Teams” flow (it will likely show an error or ask for reconnection) and fix it, ensuring it’s properly authenticated to Teams.

    • Workaround 2 (Advanced): As shown in the video, you can use your browser’s Developer Tools (F12). Inspect the non-working “Connect” button element in the transcript view. Find the aria-label or similar attribute containing a URL (it will look something like https://copilotstudio.microsoft.com/c2/tenants/…/user-connections). Copy this URL, paste it into a new browser tab, and follow the prompts to fix the connection.

    • After fixing the connection, you may need to re-test Flow #1.

Conclusion

That’s it! You’ve now built an automated system where Power Automate triggers a Copilot Studio agent daily, the agent uses AI to generate content, and another Power Automate flow posts that content into Teams.

You can adapt the Copilot’s instructions, the trigger schedule, and the final Teams message formatting to suit countless automation needs. Happy automating!

Copilot agent stuck on Waiting for user

Screenshot 2025-04-26 083251

I’ve been working on an autonomous action in Copilot Studio and found that it seems ot get stuck on”Waiting for user” as shown above.

Screenshot 2025-04-26 083410

When I open that activity, again you’ll see that it says “Waiting on user”

Screenshot 2025-04-26 083508

If I go to the top right and select Transcript from the menu as shown above.

Screenshot 2025-04-26 082748

I see these two buttons, as shown above. Problem is, neither of them actually do anything! this appears to be a bug.

The solution is to put your browser into developer mode. Search the element for the text:

copilotstudio.microsoft.com/c2

This the start of the URL that the button should use. Copy that elment and paste it into Notepad.

Screenshot 2025-04-26 084058

Remove everything but teh URL like so:

Screenshot 2025-04-26 084153

Copy that URL and paste it into a new browser tab in the same session and you should now see the following page:

Screenshot 2025-04-26 084517

You will probably see that it isn’t connected as shown above. if so, click the Connect button to reconnect the service.

Screenshot 2025-04-26 084309

When it properly connected it should appear as shown above and now your Copilot Studio action should work and no longer be paused at Waiting for user going forward.

A huge shout out to Shervin Shaffie from Microsoft whose YouTube video provide the solution for me. The video is here:

https://youtu.be/4s7Qa_cYZyQ?si=4-TSkrr-T6_CNqdD&t=1320

at timestamp 22:00 where he walks through fixing the problem as I have outlined in this blog post.

Hopefully, Microsoft is now aware of this issue and will resolve it soon.

Mastering Autonomous Actions with Copilot Studio: A Step-by-Step Guide

https://www.youtube.com/watch?v=U_M2nGwFGBg

In this video, I provide an in-depth tutorial on using Copilot actions within Copilot Studio to create autonomous agents. I demonstrates how to set up triggers, specifically focusing on activating an agent when a new email arrives. I walk through the process of creating a trigger using Power Platform, configuring the agent to respond to emails, and enabling orchestration to ensure seamless operation. I also shares practical tips and insights from his experience, emphasizing the importance of clear instructions and matching action names. This video is ideal for anyone looking to automate tasks using Copilot Studio and Power Platform.

Key topics covered:

  • Setting up triggers for autonomous actions

  • Configuring agents to respond to emails

  • Using Power Platform for automation

  • Enabling orchestration in Copilot Studio

  • Practical tips for successful implementation

Watch this video to learn how to effectively use Copilot actions to automate your workflows and enhance productivity.

Copilot Studio PAYG costs

Now that I have set up pay as you go (PAYG) Copilot Studio via an Azure subscription, the next big question is what are the costs likely to be? These are somewhat hard to quantify exactly because it ‘depends’ on a lot of factors.

Start with:

Copilot Studio licensing here:

https://learn.microsoft.com/en-us/microsoft-copilot-studio/billing-licensing

which says:

  • Pay-as-you-go: $0.01 per message

but then it isn’t a simple ratio of 1 question = 1 message, oh no. You need to look at this:

Message scenarios

which gives you this table:

Screenshot 2025-03-13 140428

The example Microsoft provides is:

Diagram illustrating various Copilot Studio events and their corresponding billing events.

Each interaction with an agent might utilize multiple message types simultaneously. For example, an agent grounded in a tenant Microsoft Graph could use 32 messages (30 messages for the Microsoft Graph grounding, and two for generative answers) to respond to a single complex prompt from a user.

Agent costs depend on an agent’s complexity and its usage.

Inside the Power Platform admin center, under licensing and Copilot Studio I see this:

Screenshot 2025-03-13 141042

if I drill into this a little more I find:

Screenshot 2025-03-13 141024

Ok, so 2,040 messages is the usage.

I then waited and checked my Azure billing for the period and it reports:

Screenshot 2025-03-13 134801

which is AU$20.30 for Copilot Studio usage across those 2,040 messages I suggest. If you divide the cost by the messages you come out to around that suggested $0.01 per message as expected.

How does that relate to usage? Again, hard to exactly quantify as I was the only user and I was building and testing an autonomous agent with Copilot Studio for around 8 hours roughly. Thus, that means an average of 255 AI message per hour or 4.25 messages per minute.

Based on that, the best estimate (rule of thumb) I could give you would be, based on ‘average use’ across a typical day (8 hours), for a single user using Copilot regularly throughout the day the cost is going you around AU$20 per user for that 8 hours of sustained usage.

I fully appreciate this is nowhere near exact but, so far it is the best average I can come up with for sustained daily usage.

If we assume that a ‘normal’ user is not going to using AI in the sustained manner across the whole day we could then apply say a 50% usage discount and settle on around AU$10 per user per day for an ‘average’ user using Copilot resources in an ‘average’ way per day. More intensive usage would be considered around AU$20 per user per day I suggest.

In summary then, via my imperfect observations and calculations I would suggest to you that if you do indeed implement Copilot service via Pay As You Go (PAYG) then the ‘typical’ costs you can expect would be around AU$10 per user per day up to AU$20 per user per day. If this was sustained across a full month then you would be looking at $300 per average user per month which is way above the cost of a full license of Microsoft 365 Copilot whih which would be a flat fee of around AU$45 per user per month.

This is the best estimate I can give you and your costs and usage will vary but I think $10 per user per day for average Copilot use on a PAYG plan is as good as any place to start.

Clearly then, if your users are planning on sustained Microsoft 365 Copilot usage a paid license of Microsoft 365 Copilot is a much more effective investment from what I can determine.

My Teams Copilot can now interpret images

image

A while back, I built an agent that I published into Teams to provide answers to technical questions on the Microsoft Cloud. I have always been super impressed by the results I get from it, but now, as you see above, it can also interpret images!

image

You need to enable the Image Input option in Settings for your agent as shown above, and of course, don’t forget to again publish your agent so the updates flow into Teams.

What is even more impressive, is that if you look at the error screen at the top of the page you’ll notice that it isn’t even in English and Copilot has extracted the text from the image, interpreted it and answered in English in Teams. Impressive!

How to build a Microsoft Licensing agent

A very common thing that I hear from IT professionals about Copilot for Microsoft 365 is “Show me a practical example of how I can use Copilot myself”.

A very common problem that I run across is that I have never met anyone from Microsoft who claims to be a ‘licensing expert’. Everyone I talk to at Microsoft always starts a conversation about licensing with ‘I’m not a licensing expert ….’. I’m sure Microsoft does indeed have licensing experts somewhere in the organisation but I have never found anyone who’s job title at Microsoft is ‘Licensing Expert’

Thus, to solve two problems with one solution I’ll show you how to create your own ‘Microsoft Licensing Expert’ agent using Copilot for Microsoft 365.

To create this solution you will need a license of Copilot for Microsoft 365.

image

Start by visiting Copilot Bizchat as shown above. Ensure you expand the panel that is on the right. You do this by selecting the button shown above in the top right.

image

You should now see an option that says Create an agent as shown above. Select this to continue.

image

You can use the interface to describe the agent you want but in this case, simply copy what I have created just select the Configure pill at the top of the page.

image

Enter the following information into the fields provided:

Name = Microsoft Licensing Assistant

Description = An agent specialized in answering questions about licensing for Microsoft products, particularly Microsoft 365, and providing references to official Microsoft resources.

Instructions =

– Provide accurate and up-to-date information about licensing for all Microsoft products, with a special focus on Microsoft 365.
– Answer questions clearly and provide references to official Microsoft documentation or resources where the information can be verified.
– Ensure responses are concise, informative, and helpful.
– Avoid providing any unofficial or speculative information.
– Maintain a professional and knowledgeable tone in all interactions.
– Be prepared to handle a wide range of questions related to Microsoft product licensing.
– Focus solely on providing information about Microsoft licensing.
– Respond in a professional style.

image

Then select the Create button in the top right as shown above.

image

The system will get busy with your request.

image

Take a copy of the new agent URL when displayed and select the Go to agent button.

image

You should now be in a Bizchat style interface but the heading is now Microsoft Licensing Assistant as shown above. You can return here at anytime by selecting the link in the right panel as shown.

image

Ask it a question like “Explain how shared device activation is licensed”

image

and you should see the above response.

If you take the URL for the new agent and put it into a chat with users that also have a Copilot for Microsoft 365 license they can also use that agent in that chat session.

You can continue to improve this agent or go and create more. Personally, I have agents for licensing, Microsoft 365 and Azure information that I use almost every day. I have found this licensing agent particularly helpful.

Of course, the limitation is that people who want to use this agent need a license of Copilot for Microsoft 365 but in an upcoming article I’ll show you how to set things up so that no use need an actual license of Copilot for Microsoft 365 to reap the benefits of agents. Stay tuned for that soon.