OAuth 2.0 Connected But Not Working

First off, I want to say thank you to anyone willing to help with the issue I’m having. I’m going to go ahead and jump right in here.

I’m new to N8N but I have had previous experience with similar programs in the past. I elected to install N8N using Linux and Docker Desktop for Linux.
Here is the command I used to install it:

~$ docker run -it --name n8n -p 5678:5678 -v ~/.n8n:/home/node/.n8n n8nio/n8n n8n start --tunnel

The problem I’m having is that my first workflow is the following:
Scheduled Event (Runs Every 30 Minutes)
Microsoft SQL Connection (Connects to a local network database)
Google Sheets (Is supposed to take the info from SQL Step and Import into G-Sheets)
and I need OAuth 2.0 to do this workflow. Everything before google sheets works fine. When I go to add the Append/Update function of google sheets, I get a weird error that says it can not read my files from my google account. (I’m unclear as to if/how to attach image/screenshot on this platform so if you need one please let me know how and I will send or edit/add a screenshot)

So, I installed the desktop version of n8n just to eliminate any weird install issues as I’m not great with Linux or docker. I replicated the exact same problem on that as well. Interesting enough though. If I switch the options in the Google sheet step on my workflow for the desktop app to pull Document information from a URL instead of OAuth 2.0 and enter the google sheets shared URL it will let me append the information to it.

I tried the same thing in the self hosted version running on Linux and Docker and got and even weirder result. When I change the document option to “From URL” instead of “From List” the Sheet option “From List” starts working. I can also change the Sheet Option to “From URL” and it works. So basically I need to figure out why the From List option doesn’t work on the Document Selection Section even though the OAuth 2.0 Credentials say they are linked and the Google OAuth Credential get “pinged” when I try. I only know that it at least reaches out to my OAuth 2.0 Callback URL because the stats page says it receives requests.

Here is my workflow nodes copied in order:

**Node 1 - Schedule**
{
  "meta": {
    "instanceId": "bc1cb5210e1e9c3dfc16073dbcca10c738aceb62e0d1aea3403b1678044d5011"
  },
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "field": "minutes",
              "minutesInterval": 30
            }
          ]
        }
      },
      "id": "6fa7ef2d-5439-41a7-805d-b5c5612708de",
      "name": "Schedule Trigger",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1,
      "position": [
        820,
        460
      ]
    }
  ],
  "connections": {}
}





**Node 2 - Microsoft SQL Server Connection & Pull from Table**
{
  "meta": {
    "instanceId": "bc1cb5210e1e9c3dfc16073dbcca10c738aceb62e0d1aea3403b1678044d5011"
  },
  "nodes": [
    {
      "parameters": {
        "operation": "executeQuery",
        "query": "SELECT * FROM Database_Table_Goes_Here;"
      },
      "id": "ba7142f5-0068-4fc3-882b-3dcfbef0c612",
      "name": "Microsoft SQL",
      "type": "n8n-nodes-base.microsoftSql",
      "typeVersion": 1,
      "position": [
        1040,
        460
      ],
      "credentials": {
        "microsoftSql": {
          "id": "2",
          "name": "Microsoft SQL account"
        }
      }
    }
  ],
  "connections": {}
}



**Node 3 - Google Sheet Node To Drop SQL Data To G-Sheet**
{
  "meta": {
    "instanceId": "bc1cb5210e1e9c3dfc16073dbcca10c738aceb62e0d1aea3403b1678044d5011"
  },
  "nodes": [
    {
      "parameters": {
        "operation": "appendOrUpdate",
        "documentId": {
          "__rl": true,
          "mode": "list",
          "value": ""
        },
        "sheetName": {
          "__rl": true,
          "mode": "list",
          "value": ""
        }
      },
      "id": "9b04f66c-6351-4fc9-8d3b-4bac9a99c9c6",
      "name": "Google Sheets",
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 3,
      "position": [
        1260,
        460
      ],
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "1",
          "name": "Google Sheets account"
        }
      }
    }
  ],
  "connections": {}
}

Any help you can provide will be greatly appreciated.

Information on n8n setup

  • V 0.217.0
  • Docker Running Standard Install using SQLite
  • Running on Linux Debian GNU/Linux 11 (bullseye) 64bit GNOME V_3.38.5 Wayland Windowing system Running On VM By ESXI 7.0 Free edition

Thanks for reporting this, @kgrdl123.

Do you have the Google Drive API enabled in your Google Console? You need to have both this and the Google Sheets API enabled to use the node.

@sirdavidoff

I feel very stupid right now. I thought I already enabled that but it looks like I didn’t have the permissions to do so. I asked my boss to grant me access to the company admin portal and I enabled it from there and now it works. Thank you sir. I greatly appreciate your help!

1 Like

I wouldn’t feel stupid at all! We need to make this much clearer — thanks for pointing it out

1 Like

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