In this blog post, I will create a trigger to detect when the Microsoft Form I created in part 1 is submitted by a trainer requesting a mentor to help with preparing for a course delivery.
What is a trigger in Copilot Studio?
A trigger in Copilot Studio defines when an agent should run.
Instead of waiting for a user to start a chat, a trigger allows the agent to run automatically when something happens. For example, when a Microsoft Form is submitted, a trigger can detect that event and start the agent without any user interaction.
Triggers are commonly used for autonomous agents, where the agent reacts to events such as:
A Microsoft Form being submitted
Data being created or updated
A scheduled or system event occurring
And many more
When the trigger fires, Copilot Studio passes the event information to the agent, and the agent responds according to the instructions it has been given.
Task: Create a trigger in the Course Mentor Agent to detect and process Microsoft Form submissions.
Select the Overview tab and click Add trigger
2. You will find a library of triggers from Power Automate which can be used in Copilot Studio, including:
When an item is created or modified in SharePoint
When a new response is submitted in Microsoft Forms
When a file is created/modified in OneDrive for Business
When a feed item is published in RSS
When an event is added to a calendar in Google Calendar
When a pull request is closed (Git) in Azure DevOps
When a task is completed in Planner
When a Teams messages is posted or if @mentioned
When a new email arrives
and many more
Explore the different triggers available. There were 843 triggers available at the time of writing this post.
3. I’ll be selecting When a new response is submitted(Microsoft Forms). Click Next
4. The trigger will run using my currently signed‑in account. This can be changed if required.
This trigger uses the apps listed in the image below. A green check means the required connection is set up and ready to use.
Click Next
5. Now that I’m connected to Microsoft Forms using my account, the form I created in Part 1 of this blog series is available to select. I select the form and click Create trigger.
6. Click Close
7. Select the Overview tab. You’ll see that the trigger is now visible.
8. I test the trigger to confirm all is ok
There is still further work to complete before we have a fully functioning autonomous agent. In the next post, I will add tools to my agent, so it has permissions to read the data inside the form, read my Mentors.xlsx file, add a row in my log file RequestLogs.xlsx, and send an email to the assigned mentor.
In this blog post, I’ll create another Excel file and include the columns shown in the screenshot below. We will soon instruct the agent to update the spreadsheet when a form is submitted and a mentor is assigned. This log file will include the requester details and the mentor who was assigned.
I’ve named my Excel file RequestLogs.xlsx and store it in my OneDrive for Business.
I now have two Excel files:
Mentors.xlsx (Created in Part 4)
RequestLogs.xlsx
Join me in the next post, where I will create a trigger in Copilot Studio to detect and retrieve information submitted via the Microsoft Form we created in part 1 of this blog post series.
In this blog post, I will create an Excel spreadsheet and store it in my OneDrive for Business account.
The Excel file will include a list of trainers who have volunteered to become mentors, assisting other trainers with course preparation. The agent will analyse the Microsoft Form submission, read the Excel spreadsheet, and automatically assign a suitable mentor based on the course selected. The Excel file could be kept in a SharePoint location in a production environment to allow for access and updates.
The Excel spreadsheet will include three columns including:
MentorName
MentorEmail
Course
I name the Excel file mentors.xlsx and upload it to my OneDrive for Business. For the purpose of this demo, I have added the same email address for all demo users. Format the data as a table. By structuring the data as a table, the agent can cleanly filter and select the correct mentor.
Ok, so that’s the Excel spreadsheet including the trainers.
In the next post, I will create an Excel spreadsheet where the agent will log details of the mentee and the mentor assignment.
My environment is set to Default. I’ll be switching from Default to Demo. To learn more about the different types of environments, visit Part 2: Create a Power Platform Environment
3. Click Agents from the left pane.
4. You can describe the agent in your own words to allow Copilot Studio to create your first draft for you. You could also use an existing template to give you a head start or create an agent from blank.
I’ll be creating an agent from blank by selecting Create blank agent top right corner of the Copilot Studio interface (as seen in the image below).
5. The agent is provided with a default name, which we will change shortly. Wait for the following message to disappear, This feature isn’t available until your agent has finished setting up, as seen in the image below. This may take a couple of minutes. When completed, a message will appear to confirm Your agent has been provisioned.
6. Now that the agent has been provisioned, I’ll go through and change some default settings first, starting with the name and Copilot agent image. Click edit.
7. Change the agent name to Course Mentor Agent
I’ve changed the default image. To generate your own agent icons, visitCreate | M365 Copilot.
Description: An autonomous mentoring agent for Imran Rashid Training Ltd that helps trainers request one‑to‑one mentoring when preparing to deliver Microsoft courses for the first time. The agent processes mentoring requests submitted via a Microsoft Form, identifies the course the trainer needs support with (for example, AZ‑104, SC‑300, AZ‑700, AI‑102, AZ‑204, SC‑200, or SC‑100), and matches the request to a suitable mentor from a central mentor directory of experienced trainers who have volunteered to support others. Once a match is made, the agent notifies the assigned mentor via email so a one‑to‑one mentoring session can be arranged. The agent records the details to a central log file, which includes the requester details and the mentor that was assigned.
8. Click Save
9. Select your agent’s model. I’ll be leaving the default GPT-5-Chat model, which was in preview at the time of writing this post.
Explanation The model selection controls which large language model your agent uses to reason, understand prompts, and generate responses. Different models are optimised for different styles of work, such as faster responses, deeper reasoning, or adapting between conversational responses and structured reasoning. Organisations can choose the model that best fits their scenario and can experiment with different models to see which one produces the most reliable and effective behaviour for their specific agent before standardising on a preferred option.
10. Next, we add instructions for the agent to follow.
Agent instructions tell the agent how it should behave, what tasks it is responsible for, and what actions it should take when it runs. They provide the guidance the agent needs to work consistently and correctly.
Note: I’ll be updating these instructions later in this blog post series to include the specific details for the items shown in square brackets [ ].
Instructions I entered are shown below.
You are the Course Mentor Agent for Imran Rashid Training Ltd. Your job is to analyse mentorship requests submitted by mentees and assign an appropriate mentor by following the instructions below.
Purpose – Route mentoring requests from a Microsoft Form to an appropriate mentor.
Trigger: 1. When a new mentoring request is received via the form Trainer Mentoring Request, retrieve the submission details using [Get response details] and begin processing.
Data to capture from the form 2. Extract the following details from the form submission: – Full Name – Email Address – Course Selection (course code) – Country – Specific Areas of Concern
Mentor lookup (mentors.xlsx) 3. Retrieve the mentor list from mentors.xlsx using [List rows present in a table] – MentorName – MentorEmail – Course
Send an email to the assigned mentor 4. Send an email using [Send an email (V2)] addressed to the selected mentor. Format in html so it’s clear to read. Send the email after creating the draft email.
Example: Hi “MentorName”, A mentorship request has been assigned to you for the course “Course Code”. Requestor Name: “MenteeFullName” Requestor Email: “MenteeEmail” Country: “Country” Thanks, Course Mentor Agent at Imran Rashid Training
Log the request (RequestLogs / Requests table) 5.Use [Add a row into table] to dynamically complete the below: Requester Name using the Full name field from the form Email using the Email Address field from the form Course using Course Selection from the form Country using the Country field from the form Concerns using the Specific Areas of Concern field from the form Assigned Mentor from the MentorName from the Mentors excel file
11. Click Save
Thanks for following along. In the next blog post, I will create an Excel spreadsheet containing a list of trainers and the courses they have volunteered to support other trainers with through mentoring, and store it in my OneDrive for Business account.
Thanks for joining me in Part 2 of this blog post series on creating an autonomous agent in Copilot Studio.
In the previous post, I created a Microsoft Form that will be used by requesters to submit mentoring requests to help them prepare for Microsoft courses.
In this post, I’ll explore environments in Copilot Studio, how they relate to the Power Platform, and how they’re managed through the Power Platform admin portal.
An environment in Microsoft Copilot Studio (and the wider Power Platform) is a dedicated space used to store and manage agents, data, and related resources. Every agent you build lives inside a specific environment.
Environments help you separate work (for example, keep learning and testing separate from production), apply different security or governance rules, and meet regional or data‑residency requirements. They also make it easier to manage solutions as they grow in size or complexity.
By default, many Power Platform experiences, including Copilot Studio, start in the default environment. However, Microsoft recommends using a non‑default production environment for agents that you intend to deploy to production. This reduces risk and keeps production agents isolated from experimentation or testing activities. The Default environment is a predefined type of environment intended for experimentation, exploration, and lightweight development, not production workloads.
Users are automatically added to Default environment When a new user signs up for Power Apps, they’re automatically added to the Maker role of the default environment allowing them to make apps, and you cannot prevent this. This allows them to start creating assets, and you can’t prevent this role assignment for the Default environment. Users are not automatically added to the Environment Admin role of the default environment.
The Default environment is created in the region closest to the default region of the Microsoft Entra tenant, and is named as follows: “{Microsoft Entra tenant name} (default)”. The Default environment can be renamed. Furthermore, admins can be assigned to the Default environment to allow more control.
You can’t stop users from accessing the Default environment, but you can use Data Loss Prevention (DLP) policies to restrict which connectors are available there. While this doesn’t completely block app or flow creation, it does limit what users can build. Combining DLP policies with role-based access control and environment segmentation provides a strong foundation for governance. We explore environment types later in this post.
You can’t delete the Default environment. You can’t manually back up the default environment; system backups are done continuously. Furthermore, the Default environment has restrictions such as storage limits. To avoid these restrictions, you will need to set up a production environment. More on types of environments shortly. Learn more about the Default environment at: Default Environment
Common environment strategies
There are many valid strategies for using multiple environments. For example, you may choose to:
Create separate environments for specific teams or departments, each containing agents and data relevant to that audience.
Create separate environments for different global regions or branches of your organisation.
Create separate environments to meet data residency or compliance requirements.
Use development or sandbox environments for learning and testing, and a production environment for published agents.
Task: Create new environment for my Copilot Studio Autonomous agent
Go to the Power Platform admin center at https://admin.powerplatform.com/ and sign in using your work account. Use the same Microsoft Entra tenant that you use for Copilot Studio.
Click Manage from the left pane
3. Click New
4. The New environment pane opens as shown in the image below. Let’s explore the fields:
Name: Provide a suitable name for your environment Make this a Managed Environment (Yes/No): I’m leaving the default setting of No. An explanation is provided below.
What is a managed environment? A managed environment is a Power Platform environment with additional governance and control features enabled. It is designed to help administrators monitor usage, enforce best practices, and reduce risk as solutions move beyond individual experimentation and into wider use.
Why use a managed environment? Managed environments provide benefits such as better visibility, policy enforcement, and controlled growth of apps, flows, and Copilot Studio agents. They are especially useful for enterprise scenarios, where organisations want to ensure solutions are built and used responsibly without slowing down innovation. More info at: Managed Environments overview – Power Platform | Microsoft Learn
Group: the drop down displays None by default. Explanation of Groups Environment groups allow administrators to organise multiple managed environments into logical collections and apply governance rules consistently at scale, rather than configuring each environment individually. Think of an environment group as a folder for environments, making large Power Platform estates easier to manage. Environment groups can only be used with Managed Environments, which is why this option is not available when creating a standard environment. More info on Groups and how to create them is available at the following link: What are environment groups
Region: Select your region Explanation: A region determines where your Power Platform environment and its data are hosted in Microsoft datacentres. When you create an environment, all associated resources, such as Dataverse databases, apps, flows, and Copilot Studio agents are deployed in the selected region. Choosing the correct region is important because it can improve performance by keeping data closer to users, and it helps organisations meet data residency, regulatory, and compliance requirements. More at: Regions
A short explanation of Dataverse is provided shortly.
Type: Select the environment type. Options include:
Developer: A Developer environment is intended for personal development, learning, and experimentation. It is not suitable for production workloads and cannot be converted to a production environment later.
Developer environments are designed for single‑user development, which is why security groups cannot be assigned to them. They provide an isolated workspace for individuals to build and test apps, flows, and solutions without affecting shared or production environments.
Power Platform administrators retain full administrative control, including the ability to allow or restrict the creation of developer environments, create them on behalf of users, apply tenant‑level policies (such as DLP), and delete environments if required.
Developer environments are commonly provided through the Power Apps Developer Plan, which offers a free development environment for as long as it remains actively used for non‑production purposes.
Production: A Production environment is designed for stable, business‑critical workloads. Any app, flow, or Copilot Studio agent that users rely on for daily operations should be deployed in a production environment.
Production environments provide the highest level of governance, allowing administrators to control access, assign security groups, apply policies, and manage lifecycle operations. Microsoft recommends using non‑default production environments for live solutions to ensure proper separation from experimentation and personal productivity work.
Trial (Standard):
A Trial (standard) environment is intended for individual or small‑scale evaluation of Power Platform features. It is typically used by a single user to explore capabilities, build quick proof‑of‑concepts, or test ideas.
Standard trial environments:
Are free
Expire after 30 days. Within the last seven days before the standard trial environment is set to expire, the trial environment admin can do a self-service extension of the expiring environment. This extension adds an extra 30 days from the original expiration date. There’s only one self-service extension allowed per standard trial environment. To further retain the environment, it must be converted to production.
Are usually user‑initiated (if tenant policy allows)
Are best suited for personal testing or short demos
These environments are lightweight by design and are not intended for sustained work or multi‑team collaboration. When the trial expires, the environment and its contents are automatically removed unless it is converted to production before the expiration date.
Typical use case: “I want to quickly try a feature, connector, or idea without involving IT or committing capacity.”
Trial (Subscription-based): This type of trial environment allows companies to develop larger, multiuser, and multiple-department solutions and perform proof-of-concept reviews. Tenant admins can add a trial (subscription-based) environment to their tenant. The expiration of subscription-based trial (also known as an admin trial) environments is tied to the subscription’s expiration. More at: Extend Subscription Trial
Sandbox: Used for non-production environments allowing developers to build, tweak and test applications and flows before moving them to a separate production environment so end users can leverage the apps in production. A sandbox environment is the place to safely develop and test application changes with low risk. It is also possible to reset the environment to delete and reprovision it, for uses such as creating a new project, free up storage or remove an environment containing personal data. You can only reset sandbox environments. The reset reprovisions the environment to factory settings and permanently deletes the data. More info: Sandbox Environment
Purpose: Provide a description of the environment’s purpose, such as whether it will be used for learning, testing, demonstrations, or production workloads.
Add a Dataverse data store: Explanation: Microsoft Dataverse is the secure data platform for Power Platform. It’s used to store and manage structured business data, such as customers, requests, or records, in a way that apps, automations, and Copilot agents can reliably read from and write to.
Data in Dataverse is stored in tables, similar to Excel tables, with rows and columns that represent business information. Dataverse includes built‑in tables for common business scenarios and also allows you to create custom tables tailored to your organisation’s needs.
Dataverse provides important capabilities such as security, relationships, business rules, validation, and auditing, which help ensure data remains consistent and trustworthy, regardless of which app, flow, or agent accesses it. For example, you can track changes to data, including who made the change and the previous and new values.
In Copilot Studio, Dataverse is typically used when an agent needs to work with structured business data, such as creating or updating records, tracking requests, or retrieving information in a consistent format.
If you already use another data source, such as SharePoint, Excel, or an external database, you can connect to those using Power Platform connectors. However, if you need a native data source built into Power Platform, Dataverse is a good choice because it supports relationships between tables, rich security controls, and scalability without manual infrastructure management.
Dataverse integrates with Microsoft Entra ID (Microsoft’s Cloud Identity and Access Management Solution), allowing admins to control who can read, write, or modify data. It works across all Power Platform services, including Power Apps, Power Automate, and Copilot Studio.
Pay-as-you-go-with Azure
The Pay‑as‑you‑go with Azure option is only available for production and sandbox environment types. It lets you link a Power Platform environment to an Azure subscription so usage is billed based on actual consumption, instead of requiring upfront Power Apps, Power Automate, or Copilot Studio licenses for every user. In Power Apps, Power Automate, or the Power Platform admin center, you can link environments to an Azure subscription using a billing policy.
Once an environment is linked to an Azure subscription, usage of apps and any Dataverse or Microsoft Power Platform requests that go above the included amounts are billed against the Azure subscription.
Use cases for pay-as-you-go with Azure include:
Widely distributed apps: Use the pay-as-you-go plan for apps that need to be shared with a large user base with infrequent and/or unpredictable use.
Establish usage patterns: Understand adoption patterns for new apps to determine whether prepaid licenses make financial sense for your business.
Flexible purchasing: Use an Azure subscription for Power Apps and Power Automate to reduce license procurement overhead and consolidate with other Microsoft services. This is especially helpful if you already have an Azure subscription. More info at the following link: Pay-as-you-go plan
5. Click Next.
6. I’ll be leaving the default language as English US and currency as USD. Feel free to change as per your requirements.
Custom URL There is an option to use your own domain name. If you leave the default option, a URL ending in *.dynamics.com is automatically created for you.
Deploy sample apps and data: Sample data gives you something to experiment with as you learn, and is optional.
7. Click Save
That’s it for this post. I hope you found it useful.