When creating a flow to move a new file from one Sharepoint folder to another in the same site, receive error
"Failed to verify the existence of source object at 'https://XXXXXXXXXXXXXXXXXXXX.sharepoint.com/sites/PolicyDocuments/{"responder":{"id":"XXXXXXXXXXXX","displayName":"XXXXXX, XXXXXXX (XXXXXXX)","email":"XXXXXXX@XXXXXXXXXXX.com","tenantId":"XXXXXXXXXXXXXXXXXXXXXXXX","userPrincipalName":"XXXXXXXXXXXXXX@XXXXXXXXXXX.com"},"requestDate":"2023-07-26T20:32:35Z","responseDate":"2023-07-26T20:33:19Z","approverResponse":"Approve","comments":" (test)/n"}' due to error 'The specified file or folder name is too long. The URL path for all files and folders must be 400 characters or less (and no more than 400 characters for any single file or folder name in the URL). Please type a shorter file or folder name.'.
clientRequestId: 094501c4-c24b-4e17-a4f8-38b78aa9929c
serviceRequestId: 094501c4-c24b-4e17-a4f8-38b78aa9929c
The file name is only 20 characters long. The above error has responder info in it also. I'm using the "Move File" action and the "Current Item" object for the file. Any suggestions?
Ok, you have to get properties of file associated to the item with "Get file properties" giving it the item ID then use the file identifier returned to move it :
[Edit] if you use the "When a file is created (properties only)" trigger, you don't need the "get file properties" action. You can get the identifier directly from trigger.
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Two follow up questions
1 Since the file name itself is not too long, is there a way to call the relative path?
2 I don't see any reference to the file except in the error itself. Is "current item the wrong object to use? All I see in the message above is approver info.
Path calculation take into account the whole relative path to file not only the file name with extension.
/sites/site-url/documenlibrary/folder1/../folderN/filename.fileextension
calculation :
If I have answered your question, please Accept the post as solution.
If you like my response, please Thumbs Up.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492