Copy Attachments from Existing SharePoint List to Document Library

Aina, Mike 51 Reputation points
2020-08-31T17:13:31.19+00:00

Background: Only been working with SharePoint for a week so I'm still learning the ins and outs.

So here's the scenario:

I have an existing list with hundreds of attachments in the list. I want to use a flow to Copy the Attachments from the list, paste them in a Document Library, when the attachment is moved over to the Library I want a new folder created with the Title/Identifier Column text to distinguish which line item the attachment originated, and paste the new attachment in there, once the attachment has been successfully moved over the attachment in the list will be deleted.

There are essentially 2 triggers for this flow: 1. Manual Trigger to move the existing attachments from the Document Library and in the newly created and labeled folder; 2. Automatic trigger to now move any attachments added to the list to the Document Library in the their correctly labeled folders.

I'm specifically hung up on the manual trigger to move items over to the Document Library, but also creating the new Folder in the library with the Title/Identifier Column text.

Any help would be greatly appreciated.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
9,682 questions
{count} votes

Accepted answer
  1. Echo Du_MSFT 17,116 Reputation points
    2020-09-01T10:29:07.84+00:00

    @Aina, Mike

    You can create a MS Flow that copy any attachments added to the list to the Document Library in the their correctly labeled folders at one time.

    Please the following steps:

    1.Navigation to Power Automate page
    2.Click My flows Ribbon >> click New button then click “Automated--from blank” link
    3.Manually trigger a flow >> Get items >> { Get attachments >> Create new folder >> [ Get attachments content >> Create file >> Delete attachment ] }

    21921-f1.png
    21922-f2.png
    21888-f3.png

    =====================

    @Aina, Mike

    ……………………… Updated Answer ……………………

    Per my test, I unable to get the specific time when attachments are added to the List.
    However, you could create one flow to copy any attachments added to the list to the Document Library. At the same time, create new folders in this Document Library and then copy files to folders.

    Follow these steps:

    1.Navigation to Power Automate page
    2.Click My flows Ribbon >> click New button then click “Automated--from blank” link
    3.Manually trigger a flow >> Get items >> Apply to each {Get attachments --> Create new folder >> Apply to each 2{ Get attachments content -->Create file --> Create new folder --> Copy file}} >> Delete attachment
    24439-f1.jpg
    24368-f2.jpg
    24475-f3.jpg

    24400-f4.jpg

    Thanks,
    Echo Du

    ==================

    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    4 people found this answer helpful.

1 additional answer

Sort by: Most helpful
  1. NH 0 Reputation points
    2023-06-19T22:02:41.3833333+00:00

    This was really helpful, thank you. I have one list but I need to copy the attachments to two different folders. Is there a way I can create a condition that sends the attachments to a specific folder depending on the author/creator?

    0 comments No comments