0

I've created a SharePoint Online list for the purpose of volunteers uploading photos of receipts. The list contains some metadata and has the ability to add attachments.

The accounts person has a Windows computer with OneDrive synced to a SharePoint Library.

What I am trying to do is create a flow that automatically places a copy of the attachment volunteers add to the 'list' to the SharePoint Library the accounts person is synced to.

I have created the following Flow for this purpose:

enter image description here

The problem I am having is that the Flow fails with the following error:

Unsupported list type for copy/move. Copy/move can only be operated in Document Library.

I understand what this is trying to tell me, but since the list in question holds attachments, I don't get why my Flow can't get those attachments and copy them to a library.

Is there a way around this? Or another way to achieve what we need here?

1 Answer 1

1

Yes, use the Get attachment content and Create file instead of Copy file.

Here is a sample flow below:

enter image description here

5
  • Thanks for your answer. This gives me hope! LOL I created a new flow based on your suggestion and this time it runs with no errors. However, when I check the copied file in the Library location, it can't be opened. I then checked the original one in the List location, and that opens fine. Both files do have the same name and extension, but if I manually download them I find that the original 'list' version is 943 KB in size, while the copied 'library' version is only 518 bytes. Any suggestions?
    – Monomeeth
    Apr 14, 2023 at 4:11
  • @Monomeeth Hmm not sure on this one. It worked fine for me for both PNG and PDF from my quick tests. Does it apply to all file types for you? Apr 14, 2023 at 4:19
  • Hmm, just tested two more times - one was another JPEG and the other was a MS Word doc. The same result both times (i.e. the copied files is dramatically smaller in size and doesn't open). In your testing, were you copying attachments from a List (not a Library) and then creating the copied file into a Library?
    – Monomeeth
    Apr 14, 2023 at 4:28
  • Yes mine is from a List attachment (not a library). I just tried with a JPEG and Ms Word doc. JPEG had the same size. The copied MS Word actually increased in size. But both can open successfully. I think it might be worth re-creating a new flow from scratch to be sure. Also ensure sure your "Get attachment content" details are correct. It could be wrong IDs hence corrupted contents? Apr 14, 2023 at 6:07
  • I've just upvoted your answer as it's the closest I've got to what I want, albeit not functional at this stage. I still have a situation where the copied files are dramatically smaller in size and don't open. :( But, at least now the Flow itself runs without error and seems to be trying to copy the correct files.
    – Monomeeth
    Apr 26, 2023 at 1:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.