How to move file in Google drive from folder A to folder B

I want to move the file in “Google Drive” from Folder A to Folder B and got the same file ID.
how to do it
Thank you

Haven’t tried but looks like you can do it by using the update file operation and changing the parent ID


@pemontto is right, you have to update the parent ID like this

You have to set the parent ID to the folder ID that you can grab from the google drive UI



I just tried to move files to Google Drive, but somehow I get an error message. I checked everything and it seems to be correct, yet it doesn’t work. It seems that it is trying to add a parent instead of replacing the existing one or am I missing something? Hope someone can help :slight_smile:

This is the Error:

“message”: “403 - {“error”:{“errors”:[{“domain”:“global”,“reason”:“teamDrivesParentLimit”,“message”:“A shared drive item must have exactly one parent.”}],“code”:403,“message”:“A shared drive item must have exactly one parent.”}}”,

“name”: “Error”,

“stack”: “Error: Request failed with status code 403 at createError (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/createError.js:16:15) at settle (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/core/settle.js:17:12) at IncomingMessage.handleStreamEnd (/usr/local/lib/node_modules/n8n/node_modules/axios/lib/adapters/http.js:269:11) at IncomingMessage.emit (node:events:525:35) at endReadableNT (node:internal/streams/readable:1358:12) at processTicksAndRejections (node:internal/process/task_queues:83:21)”


Hi @denobeno, welcome to the community!

Just cross-referencing your existing thread for this to make sure people don’t respond in two different places: List and Move Files in Folders in Google Drive

1 Like