cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ClaireAllen
Post Prodigy
Post Prodigy

Copy SharePoint Lists attachments to a SharePoint Library

Hi,

 

I'm new to Flow and have just started to look at what it can do for me in my Job,

 

I'm looking for an option to take a SharePoint List attachment and move / copy it into a SharePoint Document Library.

 

Can this be done in Flow?

 

If anyone has any how to's that would be really helpful.

 

Thank you

Claire

 

27 REPLIES 27

@TKLR_83 
You could try adding a switch control
The On value would be the Status Column, selected under the Dynamic Content

Then in the case equals - you would enter Cleared in your example, then add an action to copy or move them to the other document library.
Add another Case by selecting the + symbol the Euals for the second case would be Submitted/Waiting and you then define what happens to that if anything, and so on

ClaireAllen_0-1619016973602.png

Instead of a Switch control, you could even try a condition control

ClaireAllen_1-1619017335536.png

Choose the value as your column nameStatus is equal to Cleared, if Yes then add the action to copy/move the documents to another document library and if No, the workflow does not do anything if no actions are added, or in the No, you could add another condition and so on.

Hope this gives you some ideas/help

Regards

Claire

Perfect, thank you! I used the condition control and it worked smoothly. I didn't try switch control.

Hi @Audrie-MSFT 

I have tried to create the same flow, for getting all the attachment items from my SharePoint list, into a Document Library in SharePoint, but the flow ended up with an Error can you help?

@ClaireAllen 
I did done the same steps but the flow stopped after 4 minutes it moved like 30 items from the SharePoint list to the SharePoint Document Library I created (before).

@MH3 
I don't recall having a limits that I could only move certain amounts of items 

When I built my flow, I did the following
My Trigger was when an item is created in a SharePoint List

Get attachments from the SharePoint List, then add Get attachment Content

Get Attachment.jpg

I had a holding location to store my documents (Create File, then from there I moved the files as I wanted to capture Metadata and replace the file if the file was already there)

Create and Move.jpg

 

You can also add delete attachment to the end of the flow
See information Copy attachments from existing sharepoint list 

Regards

Claire

Hi @ClaireAllen 

Look at my screenshot,

The Flow Worked but it shows a Action Error:


SpError.png
It Says: 
An action failed. No dependent actions succeeded.
But it moved the attachments in the Document lIbrary, I have 64 Items and 45 had Attachments attached with it.. so 45 attachments were moved there but why the flow gave that error?

Hello @MH3 
In the Apply to Each action you will notice you have Next Failed

ClaireAllen_0-1623332022510.png

That means that the workflow has failed in some places, if you can click on that option to see where it did fail and look at the error message that you got, it would refer to the Previous Action Get Items where it could not get some of the items for a particular reason, and the error message that should display will tell us more.
Regards

Claire

Helpful resources

Announcements
Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

User Group Leader Meeting January 768x460.png

Calling all User Group Leaders!

Don't miss the User Group Leader meetings on January, 24th & 25th, 2022.

Users online (1,621)