n8n Hands-On Guide 2: How to Add Google Drive Configuration

a year ago

When configuring workflows in n8n, we often need to perform file operations, such as handling spreadsheets, documents, etc. Some nodes require authorization to use, and the authorization configuration can be complex. This article will demonstrate step by step how to configure it.

https://appstore.lazycat.cloud/#/shop/detail/cloud.lazycat.app.n8n

image.png

First, create a new workflow and add any trigger.

image.png

image.png

After adding, it should look like this:

image.png

Click the + on the right to add a Google Drive node, using "Download File" as an example.

image.png

Click to create an authorization.

image.png

Select the OAuth authorization method. You need to obtain a Client ID and Secret.

image.png

Go to Google Cloud and create a new project.

image.png

Click the navigation menu here.

image.png

Under "APIs & Services", select "OAuth consent screen".

image.png

Click "Start".

image.png

Enter a name and your email address.

image.png

For personal use, select "External".

image.png

Enter your email address again.

image.png

After clicking "Create", return to the navigation menu and click "Credentials".

image.png

Create a credential.

image.png

Select "OAuth client ID".

image.png

For application type, choose "Web application".

image.png

The most important step is to add the following URL in the designated field.

image.png

Return to n8n, copy this address, and paste it into the URI field mentioned earlier.

image.png

image.png

After clicking "Create", the Client ID and Secret will be displayed. Copy them into the corresponding fields in n8n.

image.png

Click "Sign in with Google" here.

image.png

You won't be able to proceed at this point; you will see the following prompt.

image.png

You need to add your account as a test user. Under "Test users", add a user.

image.png

Enter your email address.

image.png

Return to the n8n authorization and click "Continue".

image.png

Authorization successful. You will see a confirmation message.

image.png

n8n will also show a success message.

image.png

At this point, the operation is successful. You can now use n8n to upload and download files.

Author
天天