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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to create a flow t...
Power Automate
Answered

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

(0) ShareShare
ReportReport
Posted on by 33
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,483 Super User 2026 Season 1 on at
     
    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
    33 on at
    @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,483 Super User 2026 Season 1 on at
     
    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
    33 on at
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 592

#2
Valantis Profile Picture

Valantis 340

#3
11manish Profile Picture

11manish 284

Last 30 days Overall leaderboard