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
- Go to: https://api.slack.com/. Create a new Slack App. Give it a name and choose the workplace you want to see messages in
- Click on Incoming webhooks
- Activate incoming webhooks
- Generate a new Webhook url. You will then need to choose a channel that you want the messages to flow into.
- 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:
{
"type": "home",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "There are *$EXPIRATIONS_COUNT* expirations expiring within *$TRIGGER_DAYS* days. View: $EXPIRATIONS_HUDU_URL"
}
}
]
}
Websites
{
"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.