web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need more clarificatio...
Power Automate
Answered

Need more clarification on Trigger "When a new email arrives in a shared mailbox (V2)

(0) ShareShare
ReportReport
Posted on by 28

I have a Power Automate flow that's been working well so far. However, the Contractor is now sending emails to 2 different people instead of the main person "RA" identified at the top in which the trigger is tied to his account. The Trigger, "When a new email arrives in a shared mailbox (V2)", was intended to start when an email arrived in the main persons "RA" Inbox with a subject containing "232020RA". However, sometimes they send emails to a 2nd person and CC the main person "RA" on the email in which the subject changes to "232020SH". Can someone please help me better understand the "To, CC, and To or CC" fields and if I can accomodate both RA and SA emails into this flow to trigger either option? I hope this makes sense.

Screenshot 2024-02-15 151338.png
Categories:
I have the same question (0)
  • SudeepGhatakNZ Profile Picture
    14,394 Most Valuable Professional on at

    @MrGrant ,

    Rather than adding filters to the trigger, consider implementing a trigger condition instead.

    Create an expression that evaluates whether the subject contains 'RA' or 'SH'; if it does, the flow will be triggered.

    Learn more about trigger conditions here:

    Trigger conditions - just what I needed - Powering your Apps (sudeepghatak.com)

     

  • MrGrant Profile Picture
    28 on at

    Thank you Mr. Ghatak. Would something like this trigger condition satisfy the trigger?
    @And(contains(triggerBody()?['subject'],'232020RA')),contains(triggerBody()?['subject'],'232020SH')

  • MrGrant Profile Picture
    28 on at

    or should it be:
    @or(contains(triggerBody()?['subject'],'232020RA')),contains(triggerBody()?['subject'],'232020SH')

  • MrGrant Profile Picture
    28 on at

    The Flow checker reported this "The power flow's logic app flow template was invalid. Unable to parse template language expression...

    - @or(contains(triggerBody()?['subject'],'232020RA'))
    - @or(contains(triggerBody()?['subject'],'232020SH'))

    No more errors and allowed me to save. Do you see anything wrong with this?

  • Verified answer
    S-Venkadesh Profile Picture
    1,214 Super User 2026 Season 1 on at

    Hi @MrGrant ,

    Please try this : 

    @or(contains(triggerOutputs()?['body/subject'],'232020RA'),contains(triggerOutputs()?['body/subject'],'232020SH'))


    I hope this information is helpful. If it is, please consider giving a thumbs up 👍.

    Best regards,
    Venkadesh Sundaramurthy 

  • MrGrant Profile Picture
    28 on at

    Power Automate seems to like your suggestion. Thank you, I will put in place and see how it does.

  • MrGrant Profile Picture
    28 on at

    Update, so the Power Automate flow is still not getting triggered after adding the trigger condition:
    @or(contains(triggerOutputs()?['body/subject'],'232020RA'),contains(triggerOutputs()?['body/subject'],'232020SH')).

    When a new email arrives in a shared mailbox.png


    Currently, I have the above advance options settings AND the trigger condition added to the action settings. The 2 team members are getting emails with 232020SH and/or 232020RA in the subject lines but the flow isn't getting trigger to start. What am I missing here? Or is there a better way to do this? 

    Below is an example of an email being sent to them with 232020RA in subject line. 

    When a new email arrives in a shared mailbox 2.png

     

  • S-Venkadesh Profile Picture
    1,214 Super User 2026 Season 1 on at

    Hi @MrGrant ,
    Could you please try removing the subject filter?

    SVenkadesh_0-1709177658155.png

    Best Regards,
    Venkadesh Sundaramurthy

  • MrGrant Profile Picture
    28 on at

    I tried that, but these individuals get emails from cmic@laytonio.com for several other projects under construction. The subject helps specify this particular project flow. If I remove the subject filter, than any cmic@laytonio.com will trigger the flow, which isn't ideal.

  • MrGrant Profile Picture
    28 on at

    @S-Venkadesh I removed the subject fileter and the flow is not being triggered when an email lands in the Inbox. Do you happen to have any other suggestions? Also, could the "To", "CC", "To or CC" fields help in any way?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 250 Super User 2026 Season 1

#2
Expiscornovus Profile Picture

Expiscornovus 222 Most Valuable Professional

#3
Haque Profile Picture

Haque 174

Last 30 days Overall leaderboard