# Create alerts in Google Chat

{% hint style="info" %}
**Connect your Google Chat workspace with ilert first**

Before you proceed, please make sure that an administrator has connected your Google Chat workspace with your ilert account (as described in our [Google Chat App guide](https://docs.ilert.com/chatops/google-chat/google-chat-app))
{% endhint %}

Our integration for Google Chat lets you create alerts directly within Google Chat and streamlines your incident management process, making it even easier for your team and stakeholders to report incidents.

## Overview

There are two ways to configure the alert creation feature in Google Chat:

1. **Restrict to Google Chat users with an ilert account**: This mode doesn't require any additional configuration other than installing our Google Chat app (as described in the [Google Chat App guide](https://docs.ilert.com/chatops/google-chat/google-chat-app))
2. **Allow any Google Chat user to create an alert:** This method requires the creation of a dedicated Google Chat alert source in ilert and allows you to control the Google Chat spaces where users will be able to create an alert, to which escalation policy the alert is routed to and what [notification priority](https://docs.ilert.com/alerting/configure-alerting/alert-sources#customise-your-alerts-with-notification-priority) is used.

## Option 1: Restrict to Google Chat users with an ilert account

Once you have our Google Chat app installed in your Google Chat workspace, any Google Chat user with an ilert account can create an alert from any space by mentioning the ilert app with `/il-alert`.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-6d89e704ada6030e301b83e946d0129ea1707b8d%2Fgoogle-chat-il-alert-command.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

{% hint style="info" %}
The text after `/il-alert` will be automatically filled in as the alert summary.
{% endhint %}

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-3cbec738756eef7e640c8ad66c3b023fe72d054a%2Fgoogle-chat-create-alert.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

The user's permissions in ilert will be taken into account. Therefore, they will only see alert sources and escalation policies which they have access to.

## Option 2: Allow any Google Chat user to create an alert

You can let any Google Chat user (even if they don't have an ilert account) create an alert from Google Chat. In order to control which spaces they will be able to alert and control notification priority, you need to create a dedicated Google Chat alert source in ilert.

1. Go to Alert sources --> Alert sources and click on **Create new alert source**
2. Select **Google Chat** as the alert source type, give it a name, e.g. *Google Chat alerts from space xyz*, select an escalation policy and click on **Create**.
3. In the next screen, click on the **Google Chat settings** tab to configure
   * the Google Chat spaces from where Google Chat users should be able to create alerts, and
   * the escalation policies that users can select from

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-56cdf415350f8f05e9a88ed50665d79c2a6ac5e9%2Fgoogle-chat-alert-source-settings.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

4. Now any Google Chat user in your workspace will be able to create alerts from the configured spaces. They will be limited to the pre-configured escalation policies and the alert creation will take into account whatever is configured in the alert source (e.g. notification priority and other alert actions). To create a new alert, use the command `/il-alert` in any of the configured spaces.

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-6d89e704ada6030e301b83e946d0129ea1707b8d%2Fgoogle-chat-il-alert-command.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

<figure><img src="https://3394882078-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M76ygPnS4HUcFSX8ulm%2Fuploads%2Fgit-blob-daa1ae8b229d686c7ea2ad6bcde46383d71553f6%2Fgoogle-chat-create-alert-from-space.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

## FAQ

### **I have received following error messages:** There is no Google Chat alert source configured for this space in ilert, which is required to enable alert creation for Google Chat users without an ilert account.

If an unauthorised user tries to create a new alert from Google Chat, the ilert app for Google Chat requires the space to be set in a Google Chat alert source in ilert. To fix this issue, please follow the steps in [Option 2](#option-2-allow-any-google-chat-user-to-create-an-alert).

If your ilert app for Google Chat has no permission. Please reauthorise your app.
