Video URL = https://www.youtube.com/watch?v=tN8muFuTyXg
Tag: Agents
Creating an Automated Agent to Post Historical Computer Events in Teams Daily
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:
-
A Microsoft 365 account.
-
Appropriate licenses to use Power Automate and Copilot Studio.
-
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:
-
Power Automate Flow #1 (Trigger): Runs once a day on a schedule.
-
Copilot Studio Agent: Receives a prompt from Flow #1, uses its general knowledge (AI) to find the relevant information (e.g., historical events).
-
Copilot Studio Topic: Takes the AI-generated response and triggers another flow.
-
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
-
Navigate to Microsoft Copilot Studio.
-
Create a New Copilot. Let’s name it “History Bot” for this example (the video used “History”).
-
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).
-
-
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.
-
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.
-
Go to Microsoft Power Automate.
-
Create a New Flow > Scheduled cloud flow.
-
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).
-
-
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.
-
-
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.
-
Go back to your History Bot in Copilot Studio.
-
Navigate to the Topics section.
-
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.
-
Create a New Topic > From blank.
-
Name the Topic: Call it “Post Result”.
-
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.
-
-
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.
-
Power Automate should have opened with a trigger “When an agent calls the flow (Preview)”. This trigger will have an input field ready.
-
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.
-
-
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.
-
-
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.
-
-
Save this flow. Give it a name like “Post History Bot Result to Teams”.
Step 5: Connect the Topic to the Flow
-
Go back to the Copilot Studio tab where you were editing the “Post Result” topic.
-
The “Call an action” step should now let you select the flow you just created (“Post History Bot Result to Teams”). Select it.
-
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.
-
-
End the Topic: Add a final step to the topic: End conversation > End current topic.
-
Save the topic.
Step 6: Testing and Troubleshooting
-
Test Flow #1: In Power Automate, open the “Daily History Trigger” flow. Click Test > Manually > Run flow. This simulates the daily schedule.
-
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.
-
Check Teams: Look in the designated Teams channel. The message should appear shortly after the flows run successfully.
-
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!
April Microsoft 365 Webinar resources
![]()
The slides from this month’s webinar are available at:
If you are not a CIAOPS patron you want to view or download a full copy of the video from the session you can do so here:
http://www.ciaopsacademy.com.au/p/need-to-know-webinars
Watch out for next month’s webinar.
Enhancing Your Copilot Studio Agent with Topics and Actions
Video URL = https://www.youtube.com/watch?v=O-nHz5Z3Avk
In this video, we explore how to extend the capabilities of your Copilot Studio agent by integrating external knowledge sources using topics and actions. Here’s a step-by-step guide based on the video content:
1. Creating the Agent:
-
Start by creating an agent as usual, providing a description and general instructions. Ensure the orchestration option is selected and enabled. 0:12
-
The initial knowledge source selected is a single site, which allows the agent to answer questions in a basic manner. 0:23
2. Improving Information Retrieval:
-
To enhance the agent’s responses, especially for current news, create an action using Brave search. 0:54
-
Set up a free Brave account and obtain the API key for Brave search. 1:08
-
Configure the action to use Brave search for web news queries. 1:18
3. Creating and Configuring Topics:
-
Add a new topic that triggers when users ask about news. 2:01
-
Describe the trigger conditions and steps for the topic. 2:13
-
Create a search query variable to feed into the Brave search action. 2:31
-
Ensure the variable captures the prompt and keywords from the user’s query. 3:09
4. Testing and Publishing:
-
Test the setup by asking the agent for the latest news on a specific topic, such as “Alpine” or “Ferrari”. 3:58
-
Verify that the topic triggers correctly and retrieves detailed news results via Brave search. 4:19
-
Publish the updated agent to make the enhancements live. 4:35
By following these steps, you can significantly improve the relevance and detail of the information your Copilot Studio agent provides, leveraging external knowledge sources effectively.
Thank you for watching the video!
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.
Configuring Microsoft 365 PAYG SharePoint Agents
https://www.youtube.com/watch?v=d8ctmJXILxk
Enabling PAYG Microsoft 365 Copilot Chat doesn’t currently provide you with SharePoint Agents. However, like PAYG Copilot Chat, you can configure a PAYG option for just SharePoint Agents. The tutorial to enable this is in my video above.