- AI Productivity Insights
- Pages
- Setting Up Google Sheets Integration with n8n
Step-By-Step Implementation Walk Through:
Step 3: Setting Up Google Sheets Integration with n8n
Create a project in Google Cloud by visiting https://cloud.google.com/

Select your project from the dropdown menu

Navigate to APIs & Services (you can use the "Search" feature to find it)

Click "+ Enable APIs and services" and search for "Google Sheets API"

Click "Enable" to activate the Google Sheets API

Click "Create credentials"

Choose "User data" and click "Next"

Enter your App name, User support email, and Email address for developer contact information. Then click "Save and continue"

Click "Add or remove scopes"

Select "All" option and then click "Update"

Click "Save and continue"

For Application type, select "Web application." Name it "Web client 1" and add "http://localhost:5678/rest/oauth2-credential/callback" as the Authorized redirect URI. Then click "Create."

Click "Download" to save your credentials as a JSON file for later use, then click "Done"

Search for "Google Auth Platform"

Select "Audience" menu, click "Add users," enter your email account that will use Google Sheets, and click "Save"

Select the "Client" menu and choose "Web client 1." You will then see the Client ID and Client Secret, which you can copy for adding a new credential configuration in n8n.

Example of the credential screen when adding a new Google Sheets OAuth2 API connection in n8n


Log in to the Gmail account you defined as the test user and create a Google Sheet

Create a Google Sheet, name it "MedicationRefillRequest," and add the following list as columns A through M
SubmittedAt
DisplayName
Email
DateOfBirth
HospitalNumber
Medication
VerifiedGender
GenericName
Strength
Form
UseType
TherapeuticClass
IsControlledSubstance

Navigate to the URL of your Google Sheet and copy the Spreadsheet ID for later use in n8n. In this example screen, the Spreadsheet ID is "1f-NohtNQFoRb3fCWHP6B6aiQEN1L1ILTbrsHKzAr6Sc"

Example of the Google Sheets node when adding a new Google Sheets connection in n8n
