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.
@creativeopinion Thanks for your feedback. Worked pefectly.
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!
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492