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 Platform Community / Forums / Power Automate / How to create a flow t...
Power Automate
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 22
I'm using Power Automate to send an email when a PDF file is created in SharePoint, but the flow isn't working as expected. The 'Condition' step says it can't process the file name because it's 'Null'. How can I fix this so the flow only sends emails for new PDF files?
Categories:
I have the same question (0)
  • Verified answer
    rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at
    How to create a flow that sends a PDF file via email when added to a SharePoint folder?
     
    Which trigger are you using? By any chance, is it the When a file is created in a folder? If yes, this trigger doesn't retrieve the file name with extension, but only its content. Please change it to When a file is created (properties only). You can restrict the flow to run to an individual folder by configuring the Folder input:
     
     
    If you're already using the When a file is created (properties only), please share the raw outputs from your trigger - if you don't know how to do it, refer to this blog post.
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn
     
     
  • DM-30101910-0 Profile Picture
    22 on at
    How to create a flow that sends a PDF file via email when added to a SharePoint folder?
    @rzaneti Thank you so much for the detailed information!
     

    was previously using the incorrect trigger. I’ve now switched to “When a file is created (properties only)”. However, when I add the action to send the email with the file as an attachment, I receive the email, but I’m unable to open the attached file.

     

    Do you have any suggestions for what values I should enter for the Name and Content fields in the attachment section? Below is what I currently have: 

     
     
     
     
    Thank you!!!
  • Verified answer
    rzaneti Profile Picture
    4,241 Super User 2025 Season 2 on at
    How to create a flow that sends a PDF file via email when added to a SharePoint folder?
     
    I'm glad that the first part of the problem was solved! Now, for sending a file as an attachment, you actually need to extract the file content first.
     
    You just add a Get file content action, referencing the Identifier property from the trigger ad dynamic content:
     
    Next, in your Send an email, you can keep using the FilenameWithExtension from the trigger, but reference the File Content from the Get file content as ContentBytes:
     
     
     
    Then whenever you add the file:
     
    You will receive it in the email and it may work as expected (I cannot preview PDFs in this Outlook, but I can guarantee that it's working fine :) ):
     
     
    Let me know if it works for you or if you need any additional help!
     
    If this solved your issue, please mark it as Accepted Answer.
    👍 If it helped, feel free to give it a like!

    🌐 Explore more Power Platform content on my Website or on my ▶️ YouTube
    💼 Find me on LinkedIn
     
     
     
  • DM-30101910-0 Profile Picture
    22 on at
    How to create a flow that sends a PDF file via email when added to a SharePoint folder?
    Hi @rzaneti , 
     
    Thank you so much! It works perfectly, and your detailed instructions—along with the images and additional guidance—helped solve a problem I had been troubleshooting for over a week. I truly appreciate all the time and effort you put into this. This is excellent support, and I’m very grateful! 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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 462 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 456 Moderator

#3
abm abm Profile Picture

abm abm 243 Most Valuable Professional

Last 30 days Overall leaderboard