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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Track Undeliverables m...
Power Automate
Suggested Answer

Track Undeliverables mails inside a mailbox

(1) ShareShare
ReportReport
Posted on by 116
Dear Community,
 
I have an unmonitored shared mailbox that has some undelivered emails. Is it possible to get info from the emails to whom the delivery failed from all those emails?
 
Body: 
Your message to def@blxvc.com couldn't be delivered.
def wasn't found at blxvc.com.
 
Subject- Undeliverable: Notice of
 
Thanks
Categories:
I have the same question (0)
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,433 Super User 2025 Season 2 on at
     
     
    Totally do able.
     
    You could setup a trigger on incoming emails.
    You could setup a trigger condition on Subject and or Body to check if the words couldn't be delivered are there
    Then you grab who the original receipients were from the mail dynamic properties,
    Then email yourself or log it somewhere.
     
    If this answers your question, please mark as such and maybe a like.
     
    If you need help building it, please start another question thread for building it out.
  • VK-25071541-0 Profile Picture
    116 on at
    Hi @ , we have used when an email arrives V2 trigger but it doesn't always get hit Rather once in a while it is getting hit. Not sure the cause. should The connection to create flow and shared mailbox be different?
  • VictorIvanidze Profile Picture
    13,073 on at
     
    modify the trigger this way and it will work reliably:
     
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    I am not sure if this is what you're asking, but this is how I handle undeliverable e-mails to a shared mailbox:
    1. Use the trigger When a new mail arrives in a shared mailbox.
    2. Add a trigger condition so it triggers only on undeliverable messages. For my use case, that is:
      1. @contains(triggerOutputs()?['body/subject'],'Undeliverable:')
    3. Then I use the Forward an email action to forward the message to the person/group who should be notified.
    The flow is this simple:
    The compose action is just to make it easier to view information from flow runs.
  • Suggested answer
    David_MA Profile Picture
    12,982 Super User 2025 Season 2 on at
    P.S. To get the e-mail address, you could try an expression like this on the body of the e-mail:
     
    substring(outputs('Html_to_text')?['body'], add(indexOf(outputs('Html_to_text')?['body'], 'Your message to '), 14), sub(indexOf(outputs('Html_to_text')?['body'], ' couldn''t be delivered.'), add(indexOf(outputs('Html_to_text')?['body'], 'Your message to '), 14)))
     
      
    Note, I have not tested this, and it requires that the string always follows this pattern: Your message to e-mail.address@domain.com couldn't be delivered. You will also need to run the body of the e-mail through the HTML to text (preview) action.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard