So, I've been playing around with n8n and I'm a big fan of it, I've been following the project's progress ever since it was initially announced on HackerNews all the way back in Oct 2019.
However, I did face some difficulties in figuring out how to enable the Google Sheets API for interacting with my personal Google Drive (even with the very detailed docs here and here)
Here's a simple summary:
-
Create a Google Sheet node in n8n
-
Open up the node edit settings
-
Paste in the sheet ID into the node config (
https://docs.google.com/spreadsheets/d/{{ THIS IS THE ID }}/edit
) -
Click on the edit button for the Oauth2 settings. You will see the redirect URL, and we will need to use it for creating our Oauth2 client.
-
-
In Google Cloud, go to API & Services > Credentials
-
Create an Oauth2 client (and also configure the Oauth2 permissions popup)
-
Select Web Application, fill in your app name as well as the redirect url from above.
-
Once created, copy the client ID and secret into the n8n Oauth2 settings page.
-
-
In Google Cloud, go to API & Services > Library
-
Search for Sheets, click through and enable it.
-
Enabling the service is the most important, as without it, the client created in step 2 will not have sufficient permissions to operate the node correctly.
Hope this helps!