Updating this documentation Google - n8n Documentation
Using Service Account#
From your Google Cloud Console dashboard:
- Click on the hamburger menu and select APIs & Services > Credentials.
- Click on + CREATE CREDENTIALS and select Service account.
- Enter a name in the Service account name field.
- Click on the CREATE button.
- Based on your use-case, you may want to Select a role and Grant users access to this service account using the corresponding sections.
- Click Done.
- Select your newly created service account under the Service Accounts section and open the Keys tab.
- Click on ADD KEY and select Create new key.
- In the modal that appears, select JSON and click Create. n8n saves the file to your computer.
From you n8n instance:
- Enter a Credentials Name.
- In the Service Account Email field, enter the email associated with your new Service Account (visible in the Details tab).
- Enter the Private Key from the downloaded JSON file. If you are running an n8n version older than 0.156.0: replace all instances of
\n in the JSON file with new lines.
- Optional: Click the toggle to enable Impersonate a User and enter the desired email.
Save your credentials.
Now you must enable each Google service API that you want to use.
The following video demonstrates the steps mentioned above.
To enable an API, follow the steps below:
- Access your Google Cloud Console.
- From the hamburger menu select APIs & Services > Library.
- Search for and select the API(s) you want to enable.
- Click on the ENABLE button.
Google Chat Configuration
In the same chat API screen - click on the tab called Configuration
Fill in the details - the input values will be what you will refer to when you add this “app” to any Google Chat workspace
The App Name is the “App” you will be finding for and adding in Google Chat
The Avatar URL has to be any logo image
Further down check these settings
The App URL is not really relevant to sending messages but best to give it any https URL that you control
Finally in the permissions section - you can allow your whole domain to have access or restrict it to some people only.
Save the configuration.
Testing and using the App/Bot in Google Chat
To test in Google Chat - first start a 1:1 conversation with the bot to make sure it is accessible (sometimes it takes a few minutes for the bot to show up after you hit the Save above
** ** Important - When you chat with the app/bot or add the app/bot to a Space, type in all the characters of the name. In the above example the App/Bot was named n8nbot.
If you just type n8n, the autocomplete will NOT show you the app at all - just keep typing n8nbot and then you will see it
Create a new space to test
It is s good idea to use a test space. The space (probably) need to allow people outside the org to join
Then add the app to this space
How to use this app in a n8n Node
Finally to use n8n to send messages to this space get the space identifier using this method
Add a new webhook - it doesn’t matter what it is called - it is not being used for anything
spaces/AAAA_41A_L4 (no slash at the end)
is the value to be used in the n8n node to send a message like this