Announcements
I'm trying to build a Power Automate flow that triggers whenever a file is added to a specific SharePoint folder. The goal is: if the added file is a PDF, it should be sent as an email attachment.
So far, I’ve:
Thanks in advance!
In your condition you’re currently using something like:
headers/x-ms-file-last-modified is equal to .pdf
That’s not correct — this expression is checking a file header instead of the file name.
Please try this instead:
endsWith(triggerBody()?['{FilenameWithExtension}'], '.pdf')
This expression correctly checks whether the uploaded file’s name ends with “.pdf”.
endsWith(triggerOutputs()?['body/{FilenameWithExtension}'], '.pdf')
(
()?[
],
)
equals(triggerOutputs()?['body/{File_x0020_Type}'], 'pdf')
Thank you for the response! Hi @chiaraalina Unfortunately, I haven’t been able to figure out how to enter the description in the condition. I'm not writing any code—I'm only using Power Automate templates to create the flow.
Is the expression supposed to be added in the section below?
to get the trigger, do you use When a file is created (properties only)?
Thank you!!!
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 557
Valantis 328
David_MA 264 Super User 2026 Season 1