n8n-docs/docs/nodes/credentials/Google
2021-01-13 15:33:27 +05:30
..
README.md Add documentation for Google Analytics node 2021-01-13 15:33:27 +05:30
using-oauth-calendar.gif Changed header structure / added permalinks (#6) 2020-06-26 14:06:54 +02:00
using-service-account.gif Changed header structure / added permalinks (#6) 2020-06-26 14:06:54 +02:00

permalink description
/credentials/google Learn to configure credentials for the nodes based on Google services in n8n

Google

You can use these credentials to authenticate the following nodes with Google.

Prerequisites

Create a Google Cloud account.

Using OAuth

  1. Access your Google Cloud Console.
  2. Click on the hamburger menu on the top left.
  3. Select 'Credentials' from the APIs & Services dropdown list.
  4. Click on the + CREATE CREDENTIALS button.
  5. Select 'OAuth client ID' from the dropdown list.
  6. Select 'Web application' from the Application type dropdown list.
  7. Click on the + Add URI button under the Authorized redirect URIs section.
  8. 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.
  9. Click on the CREATE button.
  10. Use provided Client Secret and Client ID with your Google node credentials in n8n.
  11. Click on the circle button in the OAuth section to connect a Google account to n8n.
  12. Click on the Save button to save your credentials.
  13. On Google Cloud Console, click on Library in the menu on the left.
  14. Search for the API that you want to enable. For example, search for 'Calendar', and click on 'Google Calendar API'.
  15. Click on the ENABLE button.

Using Service Account

  1. Access your Google Cloud Console.
  2. Click on the hamburger menu on the top left.
  3. Select 'Credentials' from the APIs & Services dropdown list.
  4. Click on the + CREATE CREDENTIALS button.
  5. Select 'Service account' from the dropdown list.
  6. Enter the required information and click on the CREATE button.
  7. Based on your use-case, you may want to select a role from the Select a role dropdown list.
  8. Based on your use-case, you may want to grant user access in the Grant users access to this service account section.
  9. Click on the Done button.
  10. Select the newly created service account under the Service Accounts section.
  11. Under the Keys section, click on ADD KEY and select 'Create new key'.
  12. Click on the Create button.
  13. Save the JSON file on your machine.
  14. 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.