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 / How to identify if mai...
Power Automate
Unanswered

How to identify if mail has more than 1 attachment, without downloading the files using Retrieve email action

(0) ShareShare
ReportReport
Posted on by 48

How to identify if mail has more than 1 attachment, without downloading the files using Retrieve email action.

 

Because we need to consider only mail having single attachment , if has more than 1 attachment , we need to mark it as exception , but can we do this , any action to achieve without downloading/saving those attachments?.

 

Kindly mention.

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    For each %RetreivedEmails%
        If %CurrentItem.Attachments.Count% > 1

            RunSubflow Exception 

            Next (Loop)

        End (IF)

        ‘Do something (for emails with only 1 attachment)

    end (loop)

     

    good luck!

  • UserCflows_12 Profile Picture
    48 on at

    Thanks a lot for the response. So we can't identify if file has more attachments , without saving files in a folder? I Actually don't want to save this in any folder. Kindly mention

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    That’s a good point. 

    I wonder if you can isolate the emails you need to with mail rules instead. I don’t think you can just do it for “more than one attachment,” but these rules are so specific, I’m sure you could find another way. If you can isolate the emails to their own subfolder, then you can just point the retrieve action at that inbox subfolder. 

    Check the answer at this link to get you close:

     

    https://answers.microsoft.com/en-us/outlook_com/forum/all/outlook-mail-rules-based-on-attachment-file-type/008a75c4-40f3-4749-8efa-2e37c571c947

     

    good luck!

  • werkbook Profile Picture
    36 on at

    @MichaelAnnis My experience is that using the .Attachments property of the mail message only works if you have downloaded the attachments when using the action Retrieve Email Messages in the first place. If you don't, the .Attachments property always returns zero.

    Retrieve email messages.png

     

    Do note that in this case, I am retrieving emails from IMAP server, not Outlook.

     

    @UserCflows_12 Perhaps as a workaround, you may wish to download the attachments to a temporary folder first before deleting the attachments when you are done with your processing.

     

    Hope the above helps.

  • VictorIvanidze Profile Picture
    13,083 on at

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Automate

#1
Mohsin Ali Profile Picture

Mohsin Ali 424

#2
11manish Profile Picture

11manish 328 Super User 2026 Season 2

#3
M Bilal Khan Profile Picture

M Bilal Khan 274

Last 30 days Overall leaderboard