Skip to main content

Notifications

Power Automate - Building Flows
Suggested answer

Only send a team notification for the FIRST email in an email thread for a shared inbox

(0) ShareShare
ReportReport
Posted on by 10
I have built an automation where my team gets a notification sent to a group chat in teams for when an email contains a certain subject. The automation works, however, I only want 1 notification per thread. We are getting notifications for replies in the thread which is convoluting the channel and it's not necessary for what I'm trying to accomplish.
 
Action item: I need a condition that will only send a teams notification for the first email in a thread when an email is sent to a share inbox. 
 
  • Suggested answer
    David_MA Profile Picture
    David_MA 8,929 on at
    Only send a team notification for the FIRST email in an email thread for a shared inbox
    In the Get items action, use a filter query to where the conversation ID is equal to the conversation of the conversation ID in the trigger. This is more efficient because it is only going to return the item you are looking for and not every item in the list, which by default, is only going to be 100 items. Note, the filter field is the internal name of the field in your SharePoint list and not the display name. So, the filter might be ConversationID eq 'Conversation ID from Trigger in Dynamic Content' and note that the value from the dynamic content needs to be in single quotes since it will be string value/GIUD value.
     
    In the image of your condition, you show the ID field. That is the ID field from the SharePoint list where you are storing the conversation ID. While you don't need this in your condition, the ID in the filter query is the conversation ID and not the item id. 
     
    You will still need the condition, but it will not be on the ID. You will use a length expression to find out how many items were returned from the Get items action (ideally it should be one if you implement everything correctly). On the left side of the condition, you will add this expression length(body('Get_items')?['value']) and check if it is greater than 0. If it evaluates to true/yes, send the message.
  • CU04111428-0 Profile Picture
    CU04111428-0 10 on at
    Only send a team notification for the FIRST email in an email thread for a shared inbox
    So I'm using the conversation ID method, Can anyone provide the full conditional automation I would need to see if the list contained the conversation ID. Below I have shared where I am at in the process. i am having trouble determining the formula I need for the "choose a value"
  • CU04111428-0 Profile Picture
    CU04111428-0 10 on at
    Only send a team notification for the FIRST email in an email thread for a shared inbox
    Hoping there is an option that doesn't require me to store external conversation ID data, if not is there a way to send a request to Microsoft to add a simpler fix? 
  • Suggested answer
    SudeepGhatakNZ Profile Picture
    SudeepGhatakNZ 14,231 on at
    Only send a team notification for the FIRST email in an email thread for a shared inbox
    When a new email arrives in the shared inbox, capture the Conversation ID. Store the ID in SharePoint List or Excel Online. For each incoming email, extract the Conversation ID and check your storage list. If the ID already exists, skip the notification step; otherwise, proceed.

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,422

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,711

Leaderboard