Set up alerts in Slack

   This article has been moved!

We've recently updated our support center articles - Please bear with us while we make the transition. This article can now be found here!

You can have notifications from Hudu posted in your Slack.

Overview

With Hudu, you can create alerts for expirations and monitored website alerts. You can use email to receive these alerts, but you can also use Webhooks to send to outside services. In this case, we will setup Slack to receive the messages.

Prerequisites

Before starting, you should create the workspace and channel (within that workspace) that you want messages to arrive in.

Instructions

  1. Go to: https://api.slack.com/. Create a new Slack App. Give it a name and choose the workplace you want to see messages inmceclip0.png
  2. Click on Incoming webhooksmceclip1.png
  3. Activate incoming webhooksmceclip2.png
  4. Generate a new Webhook url. You will then need to choose a channel that you want the messages to flow into.mceclip3.png
  5. Copy the generated url and paste into Hudu.

 

Example Payloads

Expirations

In order to have a message in your Slack, you will need to deliver a payload. Here are some examples:

mceclip1.png

{
"type": "home",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "There are *$EXPIRATIONS_COUNT* expirations expiring within *$TRIGGER_DAYS* days. View: $EXPIRATIONS_HUDU_URL"
}
}
]
}

Websites

mceclip2.png

{
"type": "home",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*$WEBSITE_NAME* appears to be down. View: $WEBSITE_HUDU_URL"
}
}
]
}

Testing Webhooks

We provide a way to test your Webhooks. Navigate to Admin -> Alerts and click on Test Webhook. Note: we are only testing your connection and payload, not your variables, so sample variables will be filled in. 

mceclip0.png

 

 

Was this article helpful?
0 out of 0 found this helpful