Copy list attachment to library with SITE workflow

  • 8 November 2021
  • 1 reply
  • 336 views

Hello, I am currently working on a document-moving workflow and am running into two road blocks and would greatly appreciate some help!

 

Some background: I have a SharePoint list with over 4000 items, all with 1~4 attachments. I want to use a site workflow to move all the attachments into a document library as individual items in one "Go". 

 

Where I am currently: I have been able to create a Workflow on the list level and have successfully got it to move attachments included within that item, but the workflow will only run on the item that I manually start the workflow on. (See attached SS of the list workflow) 

 

My problems: 

1) My first problem is that the the workflow is only moving the attachments of the item I manually start the workflow on, even though I have the "For each" action that I assumed would loop through and move go through each item and their attachments. I tried moving the "Copy to SharePoint" action into the "For each" loop but then no attachments moved over when I ran the workflow. 

2) My second issue is that I will want this workflow as a site workflow, but then the "Copy to SharePoint" action does not know where to pull the items from as it only allows me to specify the destination, no "From" location. Is it possible to use a site workflow to copy attachments from one list to a document library within the same site? 

 

I've done a lot of searching and haven't been able to find a solution to this to do it on the site workflow. Any help is much appreciated, and thank you in advance!(:

 


1 reply

Badge +11

@Mjks_321 This is how I would do it:

Have a site workflow only to call the list workflow to copy attachments for each list item. If there are 4000+ items I would probably run in batches .


 


Three actions on your ite workflow should do it, query list , for each and call web service to start workflow on list items.


 




 


 

Reply