Announcements
I have the flow below and I only want to search the first attachment. I've tried a couple of different ways but am not successful. When I get attachments, it's turning it into Apply to all and it's not easy to get out of that. Please advise!
Hi @apettit ,
I think you can add an additional conditional check like this:
equals(outputs('Apply_to_each')?['body/index'], 0)
Here it will be true only for the first attachment.
So, ultimately, I want to use a conditional check in the Yes condition of the first condition, that checks if the first attachment is 'application/pdf'... should I use what you shared there?
Hey @apettit
To avoid apply to each action.
You can use the following technique:
Write the following expression in attachment id:
I hope this helps 🙂
You the man! It worked! Thank you so much!
Hi!
My test runs work, but a user sent in a link and my get attachments broke... Will you please consider this? Thank you!
@apettit
Oh seeing this error for the first time.
So your colleague didn't send any attachment and sent a link to the file.
Is that the case?
So what I will suggest is before this action add a condition which checks if the email has attachments or not.
If it has, then add everything on left side. If it doesn't you should find a way to extract that file.
I think you've got it.. you're right, I shouldn't Get attachments or anything until I figure out if there was one anyway.... so I moved the Get Attachment and the Condition to read the attachment for PDF content for a Yes to the email having an attachment condition. Thank you, again! 🙂
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.
Congratulations to our 2026 Super Users!
Congratulations to our 2025 community superstars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
Haque 304
David_MA 245 Super User 2026 Season 1
Expiscornovus 243 Most Valuable Professional