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 / Condition check if out...
Power Automate
Answered

Condition check if outlook attachments are .pdf files

(0) ShareShare
ReportReport
Posted on 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.

 

2.PNG
3.PNG
1.PNG
Categories:
I have the same question (0)
  • Verified answer
    creativeopinion Profile Picture
    10,508 Moderator on at

    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!

  • Cryzle Profile Picture
    39 on at

    @creativeopinion  Thanks for your feedback. Worked pefectly.

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 791

#2
Valantis Profile Picture

Valantis 568

#3
Haque Profile Picture

Haque 535

Last 30 days Overall leaderboard