cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
eSant96
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
tom_riha
Super User
Super User

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. ]

[ I also blog about Power Automate solutions even for non-IT people. ]

View solution in original post

3 REPLIES 3
tom_riha
Super User
Super User

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. ]

[ I also blog about Power Automate solutions even for non-IT people. ]
eSant96
Frequent Visitor

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

askondo
Community Support
Community Support

@tom_riha Thank you for always activating the forum.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Power Automate Designer Feedback_carousel.jpg

Help make Flow Design easier

Are you new to designing flows? What is your biggest struggle with Power Automate Designer? Help us make it more user friendly!

Top Solution Authors
Top Kudoed Authors
Users online (1,171)