Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
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.

 

  • Cryzle Profile Picture
    39 on at
    Re: Condition check if outlook attachments are .pdf files

    @creativeopinion  Thanks for your feedback. Worked pefectly.

  • Verified answer
    creativeopinion Profile Picture
    10,439 Super User 2025 Season 1 on at
    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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 566 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 516 Super User 2025 Season 1

#3
stampcoin Profile Picture

stampcoin 492