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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Need to Create a flow ...
Power Automate
Unanswered

Need to Create a flow that has new SharePoint Library items trigger a Sharepoint list item with the file as the list item attachment

(0) ShareShare
ReportReport
Posted on by 8

Hello,

 

I am looking to create a power automate flow which triggers whenever new pdf files are entered into a SharePoint library. When a new file is entered into this specific SharePoint library folder, it should create a SharePoint list item in a separate SharePoint site, with the pdf file as an attachment on the list item. 

 

Any assistance would be appreciated.

Categories:
I have the same question (0)
  • Verified answer
    Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at

    Hi @AEdwards214,

     

    Yes that would be possible with flow with a couple of SharePoint actions. I would also use a trigger condition to make sure the flow only starts when it is a pdf file.

     

    Below is an example of such an approach.

     

    1. I used a trigger condition in the settings of the When a file is created (properties only) trigger action.

    @endsWith(triggerOutputs()?['body/{FilenameWithExtension}'], '.pdf')

     

    triggercondition.png

     

    2. After that I use a Get File Content by using the Identifier field from the first action.

     

    3. With a Create Item I create a new list item

     

    4. And lastly a Add Attachment is used to add the pdf file to the list item. This action uses the ID of step 3, the File Content of step 2 and the File name with extension field of step 1.

     

    createlistitemwithattachment.png

  • AEdwards214 Profile Picture
    8 on at

    This is excellent, and the flow you demonstrated produces the list item I need with the attachment, but for some reason the attachment is not generated as a pdf. Is there another step that needs to happen to ensure the attachment is encoded as a PDF? I just wanted to make sure I didn't miss something.

  • Expiscornovus Profile Picture
    33,181 Most Valuable Professional on at

    Hi @AEdwards214,

     

    No extra step should be needed. I have also tested the solution in my dev environment with a couple of pdf files before I shared the solution with you btw.

     

    Just to double check? Did you use the 'File Name with Extension' dynamic content field in the File Name field of the Add Attachment action?

  • AEdwards214 Profile Picture
    8 on at

    Typical user error. The specific pdf I had created to test it was bad. Every other one since works like a charm. I really appreciate your help with this!!!

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