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 / Power Automate to Grab...
Power Automate
Unanswered

Power Automate to Grab Latest Attachments in List and Sync to SharePoint Library

(1) ShareShare
ReportReport
Posted on by 6

Hi all,

 

I have built out a flow whereby the user completes a form and the responses are saved into an SP list, the form responses through the automation is captured in a PDF file which is accessible through a "View Files" hyperlink in the list (which is being used by supervisors as a workbench) to review the item per ID and then click on view files to see the pdf responses from the form but also the attachments submitted through the form. I incorporated some neat things into the flow based on a couple of different resources. The sharepoint library that holds the attachments and the created pdf file from the flow is filtered based on the list item view files that is clicked on so that the supervisors and only physically looking at the pertinent attachments. I have the attachment enabled on the list so that if an item requires minor tweaks the user is able to use the attachment feature without the need to submit a new form and upload new attachments. 

 

Long story very short, the flow is working. However, I need to enhance this flow or create another so that any time a new attachment is added to the list item, the flow looks to that change only and then looks through the sharepoint library, by comparing the two, it only "adds" the file that is in list but not library. Once it adds to the library it inherits the ID which is what the filter uses for the hyperlink. so that whenever the link is used all the attachments (original + new ones) are accessible. Can someone share how I may do this? I have been able to add files but the files are duplicating and now getting associated to the correct ID. Any guidance is greatly appreciated. 

Categories:
I have the same question (0)
  • WillPage Profile Picture
    2,307 Super User 2025 Season 2 on at

    Are you storing the list item ID alongside the files in the SP library?

    If so then you can easily compare by doing a Get files (properties only) action with an odata filter like ListItemID eq ID where ID is the list item ID from the trigger (when an item is modified). That should return a list of files.

     

    Now you do Get attachments action and that will also output a list of files. Evaluate both lists with length() function and if they are not equal then you can do Filter array action and filter the attachments array for items that are not in the array from the Get files (properties only) action. and the resulting array, which may contain one or more files you can process through an Apply to each to get the content and upload into the SP library

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 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard