cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

Copy SharePoint File By ItemID/ID

Hello,

I have a flow that creates a document and was wondering if it was possible to copy this generated document by file ID? The Copy file funtion does not allow me to select the desired folder and ItemId, which is what I assume is the issue. I'm checking to see if it's possible to copy the automatically generated file to another folder/site using it's ItemId.

I have the following configuration for copying the file by Item ID:

Note that the Item ID is located in a folder https://xxxxx.sharepoint.com/FolderName. The Copy file function does not allow me to manually enter this path unfortunately.

eSant96_0-1605032785711.png

But when testing the flow I get an error (due to the path not existing/cannot find the file by ItemID):

 

"status": 400,
"message": "Failed to verify the existence of source object at 'https://xxxxxxx.sharepoint.com/37' due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.\r\nclientRequestId: 8db0293c-5bd1-47e3-a229-225fc702cd6d\r\nserviceRequestId: 8db0293c-5bd1-47e3-a229-225fc702cd6d"

 

The path should be https://xxx.sharepoint.com/foldername/37 but I am unable to select/enter this in the copy function.

Any thoughts?

 

THanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Super User II
Super User II

Hello @eSant96 ,

do you have dynamic content 'Identifier' available? I think that's the one you need to use as that one is unique on the whole site and 'ItemId' is unique only in a specific library. And as you can see in the action itself, it doesn't ask you for a specific library, it asks only for Site and File to Copy = it needs the unique 'Identifier' of the file.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

View solution in original post

3 REPLIES 3
Super User II
Super User II

Hello @eSant96 ,

do you have dynamic content 'Identifier' available? I think that's the one you need to use as that one is unique on the whole site and 'ItemId' is unique only in a specific library. And as you can see in the action itself, it doesn't ask you for a specific library, it asks only for Site and File to Copy = it needs the unique 'Identifier' of the file.



[ If I have answered your question, please Accept the post as a solution. ]
[ If you like my response, please give it a Thumbs Up. ]

[ ... and if you like my response, you might like also the tips and solutions on my Power Automate related blog ]

View solution in original post

Thank you Tom. This has resolved the issue. Appreciate the help!

Microsoft
Microsoft

@tom_riha Thank you for always activating the forum.

Helpful resources

Announcements
Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

New Super Users

Meet the Power Automate Super Users!

Many congratulations to the Season 1 2021 Flownaut Crew!

Microsoft Ignite

Microsoft Power Platform: 2021 Release Wave 1 Plan

Power Platform release plan for the 2021 release wave 1 describes all new features releasing from April through September 2021.

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Users online (19,352)