Cem86
Aug 23, 2023Copper Contributor
Copy and Rename files from list item to document library with Azure Logic Apps
I want to copy the files in a new created list item to a document library in SharePoint Online. Both the list and document library are in the same SharePoint site. I have the following two requirements:
- After the files are successfully copied to the document library the list item should be deleted.
- The files which are uploaded to the list item are named randomly and they should be renamed automatically during the copy process to the document library. The list has two columns: number and title. So the files should be completely renamed with this naming convention: "number-title.pdf" or "number-title.jpg" and so on (depending on the file format).
I have tried step 1 with the action "Copy file" on my own, but I get an error in the ouputs of the run history with this:
- "status": 400,
- "message" (translated to English): "Unsupported list type for copy/move. Copy/move can only be controlled in the document library...
So maybe it is not possible with the action "Copy file". How else can I best achieve this? Thanks in advance for any assistance.