Today we will be discussing how to create an automated process in Power Automate to detect high-priority (P1) emails in your mailbox and notify a Microsoft Teams group chat. By leveraging the “When a new email arrives (V3)” trigger, you’ll ensure your support or operations team is promptly alerted whenever a critical case arrives.

Introduction
When your team relies on email notifications for critical issues, response time is everything. By using Power Automate to post a message in Microsoft Teams whenever a new “P1” (Priority 1) email arrives, you can:
- Ensure no urgent case slips through the cracks.
- Instantly alert a group chat or channel.
- Parse details (e.g., case number, customer) for quick triage.
Prerequisites
- Office 365 Mailbox: Your mailbox must be licensed for and accessible by Power Automate’s email triggers.
- Microsoft Teams: You must be a member of the Teams channel or group chat where you plan to send notifications.
- Power Automate: Access to create flows in your Microsoft 365 environment.
Note: Make sure you have permissions to post messages to the target Teams chat or channel.
Overview of the Flow
Trigger: “When a new email arrives (V3)” in your Inbox.
Condition (optional): Check if the subject contains “P1 Critical Case,” or another naming pattern.
Actions:
- Parse the subject for the case number and/or customer name.
- Post an alert to Microsoft Teams in the relevant chat or channel with these details.
Step-by-Step Guide
1. Create the Flow
- Go to Power Automate at: https://make.powerautomate.com.
- Select Create → Automated cloud flow.
- Name your flow (e.g., “P1 Email to Teams Alert”).
- Choose the trigger: “When a new email arrives (V3).”
- Click Create to build your flow.
2. Configure the Trigger
In the When a new email arrives (V3) step:
- Folder: Set to “Inbox” (or the folder where your P1 emails land).
- Subject Filter: You can leave this blank if you plan to filter using a condition. (Exact matches only—no partial/“starts with” logic is supported here.)
3. Add a Condition for Filtering


If you want to only run the flow when the subject starts with or contains a specific phrase (e.g., “P1 Critical Case”):
- Add a new step → Control → Condition.
- In the condition, you can use an expression like:
@startsWith(
coalesce(triggerOutputs()?['body/Subject'], ''),
'P1 Critical Case'
)
If the condition evaluates to true, proceed with parsing and sending. If false, end the flow or route to a different branch.
4. Parse the Email Subject


If your subject line follows a format such as:
P1 Critical Case <CaseNumber> for <Customer> has been created at <Time>
you can automatically extract <CaseNumber>
and <Customer>
.
- Add Action → Data Operations → Compose, name it ComposeCaseNumber.
- In the Inputs field (Expression tab), enter:
first(
split(
replace(
triggerOutputs()?['body/Subject'],
'P1 Critical Case ',
''
),
' for '
)
)
This removes "P1 Critical Case "
and splits on " for "
. The result is the case number as the first element.
3. Add another Compose, name it ComposeCustomer.
4. Use an expression such as:
first(
split(
last(
split(
replace(
triggerOutputs()?['body/Subject'],
'P1 Critical Case ',
''
),
' for '
)
),
' has been created at '
)
)
This grabs the substring after " for "
and splits by " has been created at "
, leaving you with the customer.
Post an Alert to Teams

- Add an Action → search for “Microsoft Teams”.
- Select “Post a message (V3) (preview)” or “Post message in a chat or channel”—depending on your connector version.
- In Recipient (or Conversation ID), pick your Teams group chat or channel.
- In the Message Body, insert the output of your Compose actions (not the raw expressions). For example:
Hey new P1 case from @{outputs('ComposeCaseNumber')}<br>
for @{outputs('ComposeCustomer')}<br>
Anyone available to pick this up?
Use the dynamic content picker to ensure you insert the Compose outputs correctly.

Testing and Verification
- Save your flow.
- Send a test email to your mailbox with the subject matching the P1 format.
- Check the Run History in Power Automate:
- If the flow never triggers, confirm the folder and license setup.
- If it triggers but the condition is false, verify your subject actually starts with “P1 Critical Case.”
- Expand each step to see the Compose outputs (case number, customer).
- Verify your Teams chat receives the alert with the correct details.
Common Pitfalls
- Literal Expression in Teams Message: If you see text like
first( split( ... ) )
in Teams, it means you pasted the expression instead of inserting the Compose outputs. - No Subject: If the incoming email has no subject,
triggerOutputs()?['body/Subject']
can be null, causing expression errors. Usecoalesce()
to avoid issues. - Exact Match vs. Partial Match: The Outlook trigger’s Subject Filter only does exact matches. Use a Condition step for partial or “starts with” logic.
Conclusion
By combining the When a new email arrives (V3) trigger with conditional checks and Teams actions, you’ll have a robust solution that immediately flags critical P1 emails and alerts your team. In just a few steps, you can parse the subject for key details (case number, customer) and post a well-formatted notification—ensuring your support or operations teams never miss a critical issue.
Related Resources