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 / 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,963 Moderator 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,081 on at
     
    modify the trigger this way and it will work reliably:
     
  • Suggested answer
    David_MA Profile Picture
    14,597 Super User 2026 Season 1 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
    14,597 Super User 2026 Season 1 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

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!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Vish WR Profile Picture

Vish WR 840

#2
Valantis Profile Picture

Valantis 661

#3
Haque Profile Picture

Haque 589

Last 30 days Overall leaderboard