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

Community site session details

Session Id : PA1FKu8/T2QMwkFr7s+Kzq
Power Automate - Building Flows
Answered

Condition check if outlook attachments are .pdf files

Like (0) ShareShare
ReportReport
Posted on 19 Jul 2023 20:45:04 by 39

Good Day everyone,

 

I recently started using Power Automate and have already encountered a small issue. I've set up a trigger to check incoming emails, and the first condition I created is to verify if the email contains any attachments. If there are no attachments, an automatic reply is sent to the sender.

 

Now, I'm working on the "Yes" part of the flow. I want it to proceed only if the attached files are in the .pdf format. If they are not, I want to send an email to the sender; if they are, the process should continue further. After some research, I've developed the Flow and used the "Attachments" parameter in the Apply to each loop and "Attachment Names" to the Condition itself. I attached some pictures

 

However, when I test the flow, I'm encountering two feedbacks. The first one is "true," which is expected as it confirms the presence of attachments. But I'm also getting a "false" feedback, which is puzzling me. I'm trying to understand where this false feedback is coming from.

 

I would greatly appreciate any insights or suggestions you might have to help me identify the source of the issue.

 

Thank you in advance for your assistance.

 

  • Cryzle Profile Picture
    39 on 20 Jul 2023 at 06:17:18
    Re: Condition check if outlook attachments are .pdf files

    @creativeopinion  Thanks for your feedback. Worked pefectly.

  • Verified answer
    creativeopinion Profile Picture
    10,466 Super User 2025 Season 2 on 19 Jul 2023 at 21:29:03
    Re: Condition check if outlook attachments are .pdf files

    I would recommend using a Filter Array to check if any of the attachments are not in .pdf format. If I'm reading your original post correctly the requirement is that ALL attachments are in .pdf format. The Filter Array IMO will get all the attachments and run a check rather than using an Apply to Each action which has to validate each attachment.


    Then I would use a condition to check the length of the items returned in the Filter Array. 

    length([insert filter array body output])

     

    If the length = 0 this means that all attachments are PDFs, if not, then one (or more attachments are not).

    Hope this helps!

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

Announcing our 2025 Season 2 Super Users!

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2

Loading complete