mirror of
https://github.com/n8n-io/n8n-docs.git
synced 2025-11-20 17:48:34 +00:00
| .. | ||
| README.md | ||
| using-oauth-calendar.gif | ||
| using-service-account.gif | ||
| permalink | description |
|---|---|
| /credentials/google | Learn to configure credentials for the nodes based on Google services in n8n |
You can use these credentials to authenticate the following nodes with Google.
- G Suite Admin
- Gmail
- Google Analytics
- Google Books
- Google Calendar
- Google Cloud Firestore
- Google Cloud Natural Language
- Google Cloud Realtime Database
- Google Drive
- Google Sheets
- Google Tasks
- Google Translate
- YouTube
Prerequisites
Create a Google Cloud account.
Using OAuth
- Access your Google Cloud Console.
- Click on the hamburger menu on the top left.
- Select 'Credentials' from the APIs & Services dropdown list.
- Click on the + CREATE CREDENTIALS button.
- Select 'OAuth client ID' from the dropdown list.
- Select 'Web application' from the Application type dropdown list.
- Click on the + Add URI button under the Authorized redirect URIs section.
- Copy the 'OAuth Callback URL' provided in the 'Google OAuth2 API' credentials in n8n and paste it in the URIs field in the Create OAuth client ID page.
- Click on the CREATE button.
- Use provided Client Secret and Client ID with your Google node credentials in n8n.
- Click on the circle button in the OAuth section to connect a Google account to n8n.
- Click on the Save button to save your credentials.
- On Google Cloud Console, click on Library in the menu on the left.
- Search for the API that you want to enable. For example, search for 'Calendar', and click on 'Google Calendar API'.
- Click on the ENABLE button.
Using Service Account
- Access your Google Cloud Console.
- Click on the hamburger menu on the top left.
- Select 'Credentials' from the APIs & Services dropdown list.
- Click on the + CREATE CREDENTIALS button.
- Select 'Service account' from the dropdown list.
- Enter the required information and click on the CREATE button.
- Based on your use-case, you may want to select a role from the Select a role dropdown list.
- Based on your use-case, you may want to grant user access in the Grant users access to this service account section.
- Click on the Done button.
- Select the newly created service account under the Service Accounts section.
- Under the Keys section, click on ADD KEY and select 'Create new key'.
- Click on the Create button.
- Save the JSON file on your machine.
- Use the client_email and private_key from the JSON file you downloaded for your Google Credentials in the n8n node.
Note: Before entering the private_key in n8n, make sure that you replace all the \n with new lines.
FAQs
How to implement user impersonification?
To implement user impersonification make sure to check the Enable G Suite Domain-Wide Delegation on your Google Cloud Console.
Refer to the Delegation domain-wide authority to the service account documentation to learn more.