Thats a good idea.
I could have that in my account or ask them to share a google folder with me so they own the docs when done.
Also noticed a transfer ownership option when sharing a file/folder in n8n, which could work too. They would just have to accept it when they get the email.
Looks like if I do a shared folder, either owned by myself or them, that the files that are created are still owned by my google account.
I tried setting the permissions to share a folder and set it to “owner” and toggled ON the “transfer ownership” feature, however it is throwing an error stating that ownership cannot be transferred without consent from the receiving party. Which makes sense, otherwise you could send a lot of unwanted docs to someone else and why when you do an ownership transfer manually that it sends the recipient an email to accept. n8n does not seem to send the email, just an error.
Yes, it matters who owns the document at the end.
If for some reason my google account goes down then all of the clients assets that were created will go with it for all of the clients. From a security/scalability aspect the ownership is important I believe.
I currently have it where if they want “their own copy” then they can just copy it into their google drive, however the 10-15 docs/assets that are created are all linked to each other and them creating a copy would generate a unique URL for each new doc/asset and unlink everything. The linking is a main feature of the way we set these documents up, so I cant really do that unfortunately
What I usually like to do in cases like these is to simply ask the client to give me access to their google account or create a new google account that they can give me access to. The account has all of their details and they have full control over it and can take my access away whenever they want. This way I can easily build the automations and ultimately they will have ownership over everything.
I have a feeling that is what I’ll need to do…
Doing it that way also poses a question… I dont particularly want to create a new task for every client so that each Google node uses their predefined credentials. I will if necessary, but I noticed when creating/editing credentials you can use an expression. Do you know if it is possible to have that be dynamic and change based on an input from somewhere?
ok so without getting their google login details or api key for their account etc the easiest way would be for them to create a folder in their drive and share access with your account.
You can create files etc and move/copy them to the shared folder but you will still own them.
You cannot transfer ownership of a file/folder to another google account unless it is on the same domain i.e in the same Google Workspace etc. You cannot transfer ownership from your account to another.
They would need to make copies of the files that you created so they have their own copy of which they are the owner.
With all the above in mind - I haven’t tested a gmail-gmail transfer as I use Workspace with my custom domain. You may be able to action it and then they just need to authorise it.
you can use this code to send link to our user and then after that you can get access_token for every user after that you save it on your table. you must use http request node to access the google operation.