. How to Create Self-Operating Agents in Copilot Studio Using Event Triggers: Email-Activated Automation (Preview)
How to Create Self-Operating Agents in Copilot Studio Using Event Triggers: Email-Activated Automation (Preview)
How to Create Self-Operating Agents in Copilot Studio Using Event Triggers: Email-Activated Automation (Preview)

How to Create Self-Operating Agents in Copilot Studio Using Event Triggers: Email-Activated Automation (Preview)

In this article, I’ll demonstrate how to create an autonomous agent that automatically responds to emails using the recently added “Triggers” feature in Copilot Studio.

  1. Event Triggers
  2. Sample Implementation: Activation upon Email Receipt
    1. Adding an Event Trigger
    2. Power Automate Configuration
    3. Creating the Topic

    Event Triggers

    Event triggers function similarly to Power Automate triggers, allowing agents to be activated by events such as “receiving an email” or “data addition/update.” Since these events, rather than user messages, initiate the agent, you can easily create autonomous agents that operate independently.

    Event triggers overview - Microsoft Copilot Studio Event triggers allow agents to act autonomously by taking action in response to events. learn.microsoft.com

    Using this feature, I’ll show you how to build an agent that activates when an email is received.

    Sample Implementation: Activation upon Email Receipt

    To use this feature, you need to enable the orchestration functionality. *Note: As of January 3, 2025, this requires the language to be set to English and generative AI to be turned ON.

    Adding an Event Trigger First, click on [Add trigger], Select “When a new email arrives”, Once the connection is established, click [Next]. Since this is just a sample, only specify “Mail folder” and click [Create trigger]. Once the trigger is added, click [Edit in Power Automate]. Power Automate Configuration

    When you open Power Automate, you’ll see that “Trigger” and “Send prompt to Copilot” actions are added by default.

    Since we’re creating a flow that notifies Copilot of the received email content, use the [Select] action to narrow down to the minimal necessary information,

    And send a prompt to Copilot. When doing this, make sure to include “prompt instructions for Copilot” in this Body/message field . *Note: I got stuck when I initially just passed the output from the “Select” action thinking that was enough information – Copilot didn’t respond at all…

    Creating the Topic

    When the flow we just created is executed, it sends a prompt to Copilot. Since I wrote “Activate the ‘Email Received’ topic” in the prompt, we need to create this corresponding topic.

    Create a new topic, name it “Email Received”, and create a string argument to receive the output from the [Select] action in Power Automate.

    *For more information about topic arguments, see here Copilot Studio Variables Guide: Global vs Topic Scope & Passing Values (Avoid Choice Type Errors)

    I explored variables in Copilot Studio in detail. While they look similar to Power Apps variables, there are some unique.

    ippu-biz.com

    Next, use the [Parse value] node to prepare the string passed from Power Automate to be handled as a JSON object.

    *For more information about parsing values, see here How to Use the 'Parse Value' Node in Copilot Studio: Parsing JSON Within a Topic

    Since the "Parse Value" node in Copilot Studio turned out to be quite useful, I decided to document its functionality.Th.

    ippu-biz.com

    Since the email receipt trigger can pass multiple received emails, add a Foreach to process all of these emails.

    *For more information about adding Foreach, see here 【2025年更新】Copilot Studio 会話の中でForeachループを使う|テーブルや配列の操作に便利

    ⚠️ 2025年更新:この機能は正式リリースされました記事執筆時点では裏技的な実装が必要でしたが、現在はCopilot Studioの標準機能として「ループ処理(Foreach)」が正式に追加されています。コードエディタを開く必要はなく、リ.

    ippu-biz.com Finally, send a message within the loop notifying about the received email, And ask if a reply should be sent to complete the implementation.

    Testing

    To test the functionality, you need to run the Power Automate flow once beforehand. Return to the [Overview] page and click the test trigger icon, Select the execution history of the Power Automate flow we just ran, and click [Start test].

    A debug message indicating the trigger has activated will be displayed, followed by the “Email summary” and “Do you want to reply?” messages we created in the topic.

    When you click Yes, the left side of the condition branch is executed.

    Now you just need to add a Power Automate action to send a reply before the “I’ve replied” message is sent, and you’ll have an agent that automatically replies to emails (in theory).

    Of course, receiving this message for every email would be annoying, so you’d need to use AI Builder or another AI service to determine in advance “whether a reply might be necessary.”

    Issue 1: Creator’s Connection is Used

    There’s an important caution: with this implementation, it seems that Outlook is accessed using the “creator’s” connection. This means if you share it with other users, they might potentially see your emails.

    I’m still exploring methods for deploying this to other users.

    Issue 2: Not Working When Executed in Teams

    I tried triggering it several times after deploying to Teams, But for some reason, it’s not working…

    I’m currently investigating this issue as well.

    Bonus: There Are Limitations on Knowledge Sources Referenced by Event Triggers

    When activated by event triggers, agents may not be able to access the following knowledge sources:
    • SharePoint
    • Dataverse
    • Graph connectors
    • AI Builder prompts
    For more details, see here Event triggers overview - Microsoft Copilot Studio Event triggers allow agents to act autonomously by taking action in response to events. learn.microsoft.com

    Related Articles

    Copilot Studio Variables Guide: Global vs Topic Scope & Passing Values (Avoid Choice Type Errors)

    I explored variables in Copilot Studio in detail. While they look similar to Power Apps variables, there are some unique.

    ippu-biz.com How to Use the 'Parse Value' Node in Copilot Studio: Parsing JSON Within a Topic

    Since the "Parse Value" node in Copilot Studio turned out to be quite useful, I decided to document its functionality.Th.

    ippu-biz.com 【2025年更新】Copilot Studio 会話の中でForeachループを使う|テーブルや配列の操作に便利

    ⚠️ 2025年更新:この機能は正式リリースされました記事執筆時点では裏技的な実装が必要でしたが、現在はCopilot Studioの標準機能として「ループ処理(Foreach)」が正式に追加されています。コードエディタを開く必要はなく、リ.

    ippu-biz.com

    Support This Website

    Thank you for visiting! It's because of readers like you that I continue to write and maintain this blog.

    If you found this content helpful, consider buying me a coffee to support my work.

    Power Platform Engineer. Recently, I've also been working with generative AI, Azure, C#, and Python coding. I spent about 5 years developing in C# and C++, then worked in various service industries including hair & makeup, cafes, and retail. I returned to IT in 2020 and now focus on designing and developing with Power Platform. My cat's name is "Kotsubu," which means "small grain size" in Japanese.

    Ippu Itoをフォローする Copilot Studio Generative Answers (NLU Boost) Node: Setup Guide & Troubleshooting Building Hybrid CRAG in Copilot Studio: Combining SharePoint & Google Search (SerpAPI) The Work Diaries

    関連記事

    [Fixed] Copilot Studio Analytics Showing “Abandoned” Instead of “Resolved”? How to Correctly End Conversations

    Is your Copilot Studio analytics dashboard showing too many "Abandoned" sessions? You might be ending conversations inco.

    How to Use SharePoint Knowledge Base in Copilot Studio for RAG Implementation

    Note regarding screenshots:The screenshots in this article are from the Japanese version of Copilot Studio. However, the.

    Copilot Studio Generative Answers (NLU Boost) Node: Setup Guide & Troubleshooting

    This article explains one of Copilot Studio’s standard features for utilizing generative AI: the "Generative answers" no.

    Copilot Studio Explained: The Difference Between ‘End All Topics’ and ‘End Conversation’ | Topic and Conversation Management Guide

    I was confused about the difference between the "End All Topics" node and the "End Conversation" node in Copilot Studio.

    How to Use the ‘Parse Value’ Node in Copilot Studio: Parsing JSON Within a Topic

    Since the "Parse Value" node in Copilot Studio turned out to be quite useful, I decided to document its functionality.Th.

    Copilot Studio Power Fx Cheat Sheet: Variables, Arrays, and Formulas

    When building advanced agents in Copilot Studio, mastering Power Fx is essential. Unlike standard configuration, using P.

    コメント

    Write a comment コメントをどうぞ Cancel reply Language Switcher Site Search Categories Profile

    Power Platform Engineer. Recently, I've also been working with generative AI, Azure, C#, and Python coding. I spent about 5 years developing in C# and C++, then worked in various service industries including hair & makeup, cafes, and retail. I returned to IT in 2020 and now focus on designing and developing with Power Platform. My cat's name is "Kotsubu," which means "small grain size" in Japanese.

    Ippu Itoをフォローする Privacy Policy New Articles Fix “Exception from HRESULT: 0x80131904” in Power Automate: Check the Recycle Bin Dataverse Functions Deep Dive: Limitations, Transactions, and Performance Power Apps BPF Branching Not Working for Shared Users (Hidden Security Role Setting)

    [Dataverse] Does “Parent: Child Business Units” access include grandchild units? Verifying hierarchy depth