/

Webhooks for custom monitors

This article helps you:

  • Set up a webhook and assign custom monitors to it

  • Post monitors directly into a Slack channel

Webhooks are automated messages your application sends when something happens. They include a message (or payload) and are sent to a unique endpoint. They're an efficient way for one application to deliver real-time information to other applications, without having to wait for your API to poll data.

Custom alerts notify you when your most important KPIs change in meaningful ways.

With webhooks for custom monitors, you can use a webhook to send triggered monitors to an endpoint for a number of applications whenever user behavior changes in a way that affects your KPIs.

Note

This feature is only available to Enterprise customers and those with the Insights package.

Create and configure a webhook

To create and configure a webhook, follow these steps:

  1. Navigate to Settings by clicking on the gear icon:

gear_icon_for_settings.png

  1. Click the name of the project you want to receive notifications for.
  2. Click the Webhooks tab. This is where you can manage your webhooks, as well as your automatic and custom monitors. The owner of the webhook, managers, and admins can edit or delete webhooks.
  3. To create a new webhook, click + Create.
  4. Give your webhook a name and paste the URL for the endpoint you’d like to send the message to.
  5. At the bottom, select the custom monitors to be sent to the endpoint you’ve configured.

Once you’ve chosen your custom monitors, you can test your endpoint by clicking Send a test message to see how the message will be posted to your endpoint.

Send monitors to Slack

One of the most common applications of webhooks and custom monitors is to send triggered monitors to a Slack channel.

To post monitors to your Slack workspace, you’ll need to have a Slack app created. If you don’t have one, Slack outlines the process here.

If you do have an existing Slack app, follow these steps:

  1. In Slack, navigate to the app management page.
  2. Click your own app to reach the Settings page.
  3. Click Incoming Webhooks in the sidebar, then toggle the Activate Incoming Webhooks switch to On.
  4. Now that incoming webhooks are enabled, the settings page will refresh, displaying some additional options. Click Add New Webhook to Workspace.
  5. Pick a Slack channel where the monitors will post, and then click to authorize the app. You'll be sent back to your app’s settings page. You should now see a new entry under the Webhook URLs for Your Workspace section, with a webhook URL that'll look something like this:

https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX

  1. Copy the URL generated, and paste it into the URL field from the Create Webhook flow in Amplitude.

Form there, you can select the monitors you want posted to your Slack channel and test the URL. Now, the monitors you’ve selected will also post to your Slack channel when triggered.

Was this page helpful?

Thanks for your feedback!

May 10th, 2024

Need help? Contact Support

Visit Amplitude.com

Have a look at the Amplitude Blog

Learn more at Amplitude Academy

© 2024 Amplitude, Inc. All rights reserved. Amplitude is a registered trademark of Amplitude, Inc.