web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Unanswered

How to create a flow that sends a PDF file via email when added to a SharePoint folder?

(0) ShareShare
ReportReport
Posted on by

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:

  • Created the trigger: “When a file is created in a folder” (SharePoint)
  • Added a condition to check if the file type is P
However, the flow doesn’t work as expected. No emails are sent, regardless of whether the uploaded file is a PDF, Excel, or Word document. There are no error messages or suggestions in the flow, it just silently fails. Has anyone successfully built a flow like this? Could you share how you structured it or suggest what I might be missing?

Thanks in advance!

 
I have the same question (0)
  • Suggested answer
    chiaraalina Profile Picture
    722 on at
    How to create a flow that sends a PDF file via email when added to a SharePoint folder?
     

    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”.

     

     

     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Automate

Last 30 days Overall leaderboard