How to: Configure a New Relic and Teams Integration with a Webhook

Here are a few quick steps on how to configure New Relic alerts to be sent to a Teams channel of your choosing.

Here are the steps we will be following:

  1. Configure a Webhook
  2. Configure an Alert Notification Channel
  3. Configure your Notifications
  4. Test your Notification Channel
  5. Add your Alert Policies

Step 1: Configure a Webhook

To configure a webhook for your Teams channel, open up the next to your Teams channel and select the “Connectors” option.

Once selected, press the “Configure” button next to the Incoming Webhook connector.

Once selected, fill out the required fields for the configuration of a new webhook. If you’re doing this for New Relic, I would just name the configuration “New Relic” and upload the . Once complete, click “Create”!

Once the webhook is created, copy the webhook URL to your clipboard and then select “Save”. You’ll need this URL when you go to New Relic to configure an alert notification channel.

Step 2: Configure an Alert Notification Channel

Next, lets head over to New Relic and configure an alert notification channel. Once you have logged in to New Relic, go to your alerts dashboard and select the “Notification Channels” menu item. You should see a list of all your configured notification channels. Let’s add another. Click on “New notification channel” and select “Webhook” as the channel type.

Great. Let’s configure this webhook channel with the information from our Teams webhook creation. Name your new notification channel with a meaningful channel name and paste your Teams webhook URL into the “Base Url” field. But don’t click “Create channel” just yet!

Step 3: Configure your Notifications

We aren’t quite there yet. For this to work, we first need to use a custom payload to communicate to Teams how we would like our notification from New Relic to be formatted. Click on the “+” icon under the “Use Custom Payload” header to add our own custom payload. This payload should use fields that come from a New Relic alert (those fields will be mentioned below). Once you’ve created a custom payload, click “Create channel”! If you don’t want to create your own, feel free to use one of these (one is simple, the other is more involved):

Custom New Relic Payload: Simple
Custom New Relic Payload: Involved

If you would like to create your own, here are the fields available from a New Relic alert event.

New Relic Event Fields

Step 4: Test your Notification Channel

We’re almost there! Only two more steps. Let’s make sure our notification channel works. Click on the “Send a test notification” button at the bottom of the notification channel configuration (make sure to save first).

You should see a test notification appear in your Teams channel!

A Test New Relic Notification

Step 5: Add an Alert Policy

We are at our last and final step. Let’s add an alert policy to our new notification channel in New Relic:

Add an Alert Policy

That’s it! Once you have added your alert policy, you’re good to go. You now have a New Relic and Teams notification with a webhook.


Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store