I am using the branch n8n AI and was developing a flow based on one template utilizing Google Drive
I connected my service account to the appropriate shared folder and I can see my documents no problems with that, but when I ran the node it crashed with this error
ERROR: Cannot read properties of undefined (reading ‘pipe’)
I saw many posts here but with different nodes, with a flexibility to add return statements in them (code) but not with this one here
ANy idea on how to debug this properly and fix this issue ?
Hi @Rad, I am so sorry you’re having trouble. I don’t have a service account ready yet but just gave this a go through OAuth2 just now, where the below workflow is running fine using the latest
ai-beta image as of now:
Can you confirm if you’re also seeing this problem on your end when using OAuth2? If so, can you share your exact workflow please?
If this is working when using OAuth2, but fails with a service account even after pulling the latest
ai-beta image and after sharing your folder/files with your service account, can you give me a quick shout so I can create a new service account for testing on my end?
Thank you so much!
Hi @MutedJam Thank you so much for getting back to me.
I was indeed connecting with Service Account (didnt’t work) I created a new credential based on OAuth and it did work perfectly
thank you so much
Hi! I had the same issue here… I can’t use the service connection to retrieve a file from Google Drive
Is this a bug? Am I triyng to use a wrong connection type?
Thanks a lot!
Hi @Pedro_Cernausan, this sounds likely, though I didn’t get to test this yet unfortunately. Any chance you can simply use OAuth2 here?
Ho @Pedro_Cernausan and @MutedJam i do confirm that was the issue
I reset the connection to be via OAuth and it worked just fine,
Hi @MutedJam ! Is possible use the OAuth2, but because the conection is out of my control (I need to get more privileges on company that I work), I prefer service connection…
When u can test, can u tell us about it?
Thanks a lot!
Hi @Pedro_Cernausan, thanks so much for clarifying. I have tested the service account authentication with the File → Download operation of the Google Drive node and did indeed encounter unexpected behaviour here. I have added these problems to our internal bug tracker for a closer look and a fix.
Hi! All works fine?
Can u send your code to me see if I do a mistake here?
Thanks a lot!
All works fine?
Unfortunately it’s broken for me as well. I do not have a workaround at the moment apart from using OAuth2, but we will of course update this thread once a fix for the service account functionality is available.
Ok! Sorry, fast read and bad understand. Thanks!
Btw @Jon looked into this earlier today and found that version 1 of the Google Drive node seems to work fine with service accounts.
Perhaps you want to test this version of the node? You can copy the node from the below example workflow:
This works even with a service account for me:
Just to add, I have also put in a PR to fix this which is currently being reviewed once that is complete it will be merged and available in a future release.