Get error Google Drive Node : Increasing the number of parents is not allowed

Hello,

When I use the Google Drive node to move a file by replacing the current ParentID with the destination one I sometimes have the following error on some files: “Increasing the number of parents is not allowed”.

After some research it seems that Google no longer allows multiple ParentIDs for files, as my use case is to have only one parent, how can we not add but replace the ParentID? and avoid this error?

Last information, it seems that the problem occurs when moving a file created by another user (on a shared drive)

Thank you for your advice and help.
Gregory

Version 0.152.0
Running via n8n.cloud

Hi @Gregory_CHAURAND, I quickly tried this but could move a file just fine using the File:Update operation of the Google Sheet node:

So in order to reproduce this, could you confirm how the other user created the file you were unable to update and how it was shared with you?

Hello @MutedJam ,
Yes if the same user created and moved no worries.
But when a user (in our case a service account) wants to move a file created by to another user (via directory sharing) it doesn’t work

how the other user created the file you were unable to update and how it was shared with you?

User A: Upload a file to the folder shared by user B
Service account: access this file in n8n and move it to another folder of user B

Thanks for confirming @Gregory_CHAURAND! Was actually testing this with an OAuth account using which it wasn’t a problem for user B to create a file in a folder shared by user A and afterwards move it out of said folder by updating the file.

Would using OAuth perhaps be an option for you?

image

Hi @MutedJam,
I get the same error message (“Increasing the number of parents is not allowed”) when I try to update the Parent ID. According to the Google documentation(Section Move files between folders) , it looks like you have to remove the Parent ID before you want to insert a new Parent ID. I guess that you have to create a Custom API Call with the HTTP Request Node, is that correct?