Cant get Google Service Account Credentials to Impersonate / Drive Node to work

For the life of me, I can’t get the Google Service Account credentials to work when adding a user to impersonate. I have everything set up including domain-wide delegation. When impersonate is turned off, credential connects just fine. When its on, it errors out. I also tried to continue run Drive node with the error in credential but it failed.

401 - {“error”:“unauthorized_client”,“error_description”:“Client is unauthorized to retrieve access tokens using this method, or client not authorized for any of the scopes requested.”}

Please share your workflow

Schedule Trigger > Search Google Drive Files/Folders

Information on your n8n setup

  • n8n version: 1.71.3
  • **Database (default: SQLite):**SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system:

This might not be the answer you were looking for, but it might solve your problem:

Use OAuth instead.

It works very well and is fairly easy to set up, once you learn how it’s done.

I’ve used plenty of Google APIs and still never needed the service account credentials.

If my reply solves your issue, please remember to mark it as the solution.

Thanks, I did end up having to use OAuth, but this is not preferred for me. The biggest reason I wanted to use impersonation is because each employee will have to have a separate workflow and I wanted to prevent issues with passwords. Easiest is to just impersonate! Hoping one day I can get this fixed!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.