How can we help?

Integrating Auvik with Google Chat

Follow

For more information on editing, deleting, disabling, and enabling integrations, see How do I edit, delete, disable, or enable integrations?

Auvik connects to Google Chat for alert notifications using an incoming webhook. All of your Auvik alerts will feed into a Google Chat space. To have alerts sent to multiple spaces, create a new webhook integration for each space you’d like to post to. Webhooks can only be managed from your global site.

  • Create a new Google Chat webhook for Auvik
  • Add a new webhook integration in Auvik

Create a new Google Chat webhook for Auvik

  1. Go to the desired Google Chat space.
  2. Click on the context menu beside the space name.

  1. Select Apps & integrations.
  2. Click on Add webhooks.

  1. Provide a name for the webhook.

  1. Click Save.
  2. Click on the menu beside the new webhook.

  1. Click Copy link.
  2. Save the webhook URL for use in the next step.

For details, refer to the Google Chat webhook quick start guide.

How to add a new webhook integration in Auvik

  1. In Auvik, click Integrations in the side navigation bar.
  2. Hover over the Add Integration button.
  3. Select Webhook.
  4. Enter a name for the integration in Integration name.
  5. Enter the API URL that the webhook will call in Webhook URL.
  6. Skip Add Additional HTTP headers to send.
  7. Set your authentication method to No Authentication.
  8. Enter a JSONata expression to transform the webhook payload format to one required by the Google Chat API. The minimum required format to send a message to Google Chat is a JSON with a text field as noted in the Google Chat webhook quick start guide.


“text”: alertDescription 

}
    • Substitute with the desired Auvik field names.
      • Use the Example Payload for the list of field names.
    • View the transformed payload in Example Payload, transformed.
  1. Click Test Connection to confirm your settings are accurate.
  2. Verify that a test message appears in the Google Chat space.
  3. Click Save.

Payload Transformation Example

The Auvik alerting webhook payload and the available fields are detailed in this article. Here is a sample webhook payload transformation that provides more detailed information about the alert and a link to the alert in the Auvik UI.

{

    "cardsV2": [

        {

            "card": {

                "header": {

                    "title": companyName

                },

                "sections": [

                    {

                        "header": subject,

                        "widgets": [

                            {

                                "textParagraph": {

                                    "text": alertDescription

                                }

                            },

                            {

                                "textParagraph": {

                                    "text": $join(["Entity Name: ", entityName])

                                }

                            },

                            {

                                "textParagraph": {

                                    "text": $join(["Entity Type: ", entityType])

                                }

                            },

                            {

                                "textParagraph": {

                                    "text": $join(["Date/Time (UTC): ", date])

                                }

                            }

                        ]

                    }

                ]

            }

        }

    ],

    "accessoryWidgets": [

        {

            "buttonList": {

                "buttons": [

                    {

                        "text": 'View in Auvik',

                        "onClick": {

                            "openLink": {

                                "url": link

                            }

                        }

                    }

                ]

            }

        }

    ]

}

The test message in Google Chat will look something like this:

For more complex transformations, refer to the JSONata documentation. Refer to the Google Chat API guide for creating messages on supported message content types. 

Configure a notification channel

Before you can use the webhook integration with Google Chat, there’s one final configuration step: creating a notification channel to be associated with the Auvik alerts you’d like sent to Google Chat.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request