Google Auth - Service Accounts + Google Drive doesn't working

Describe the problem/error/question

I try Service Account - Google Auth but I got an unexpected error

I activate Google Drive on GCP and correctly setup Service Account. But I got only error in graph from GCP

I suspect a bug in api call ?

We can see on GCP the api is Google/Drive/v3 and in node module error Google/Drive/v2, this is normal ?

What is the error message (if any)?

On N8N interface

ERROR: UNKNOWN ERROR - check the detailed error for more information
 Details
Time
12/27/2023, 1:57:23 PM
HTTP Code
undefined
Stack
NodeApiError: UNKNOWN ERROR - check the detailed error for more information
    at Object.googleApiRequest (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Drive/v2/transport/index.js:37:26)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.execute (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Drive/v2/actions/file/createFromText.operation.js:119:30)
    at Object.router (/usr/local/lib/node_modules/n8n/node_modules/n8n-nodes-base/dist/nodes/Google/Drive/v2/actions/router.js:48:41)
    at Workflow.runNode (/usr/local/lib/node_modules/n8n/node_modules/n8n-workflow/dist/Workflow.js:696:19)
    at /usr/local/lib/node_modules/n8n/node_modules/n8n-core/dist/WorkflowExecute.js:656:53

On log file n8nEventLog.log

{"__type":"$$EventMessageWorkflow","id":"d386dc22-2732-49ac-8407-f70bac700920","ts":"2023-12-27T13:57:23.152+01:00","eventName":"n8n.workflow.failed","message":"n8n.workflow.failed","payload":{"executionId":"24","success":false,"userId":"5ec736fd-572e-4725-be3f-812f76d03cbe","workflowId":"AS39lasnMkD2gF67","isManual":true,"workflowName":"Save data","lastNodeExecuted":"Google Drive1","errorNodeType":"n8n-nodes-base.googleDrive","errorNodeId":"2","errorMessage":"UNKNOWN ERROR - check the detailed error for more information"}}
{"__type":"$$EventMessageConfirm","confirm":"d386dc22-2732-49ac-8407-f70bac700920","ts":"2023-12-27T13:57:23.152+01:00","source":{"id":"0","name":"eventBus"}}

On GCP I got only error traffic !

Another screen

Please share your workflow

- Add Google Drive Node 
- Configure Google Auth : Service Account
- Configure on GCP Auth 
- Validate Auth on N8N 
- Play node Google drive 

Share the output returned by the last node

Information on your n8n setup

  • n8n version: 1.22.1
  • Database (default: SQLite): Postgresql
  • n8n EXECUTIONS_PROCESS setting (default: own, main): main?
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ubuntu

Hi @Alexandre_Sandros, welcome to the community and sorry for the trouble.

We’re currently have an open bug for using service accounts with the Google Drive node in our engineering backlog (as NODE-900).

Perhaps you want to follow this thread for updates and a possible workaround?

Hey @Alexandre_Sandros,

I have just merged the change for this so it should be available in 1.25.0 later this week.

1 Like