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 / how to get mails or fi...
Power Automate
Unanswered

how to get mails or filter emails with exact matching subject rather than filtering using contains option using outlook action

(1) ShareShare
ReportReport
Posted on by 48

We have a scenario , where we need to download attachments from 1 email at once & then we have a loop to download from 2nd email & loop goes on.

 

But as we have option in RETRIEVE EMAIL MESSAGES FROM OUTLOOK ACCOUNT  action -> Subject contains, which gets emails with similar subjects , than exactly same or Equal subjects. Ex: 2 emails with subject Normal 1 , Normal 12. The attachments in these both emails get downloaded at once.Screenshot (121).png

 

So kindly suggest any way to so we get attachments for 1 email at once. PFA for reference.

I have the same question (1)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    So, I don't know a way to make that an exact match, but you can loop through the emails after retrieving them all and PAD knows exactly where the downloaded attachment is through the %RetrievedEmail.Attachment% property.

     

    Therefore, let's say you wanted to hit on the Exact match of "Number 1".

     

    You could "Retrieve Emails" where subject contains "Number 1."

    For Each %CurrentItem% in %RetrievedEmails%

        If %CurrentItem.Subject = "Nature 1"

            Save %CurrentItem.Attachment% somewhere (specific to nature 1)

        End

        If %CurrentItem.Subject = "Nature 12"

            Save %CurrentItem.Attachment% somewhere (specific to nature 12)

        End

    'any other emails, it will ignore the attachment and simply leave it in the downloads folder.

     

    Instead of multiple IFs, you could also use a Switch -> Case to define a destination folder and then move %CurrentItem.Attachment% to %DestinationFolder%

     

    Good luck!

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard