- A Slack workspace and channel (within the workspace) that you want messages to arrive in.
- Admin or super-admin user role within Hudu.
At any time, you can come back to the Hudu admin area >> Alerts >> edit specific alert to make changes to the alert.
- Navigate to your Hudu admin area >> Alerts.
- Click ((+ New Alert)).
- Give your alert a name.
- Select the expiration type from the choices and complete the required fields (see Alerts for more information).
- Click Configure WebHook and obtain the required WebHook URL from Slack.
- Provide payload delivery information in the WebHook payload field (must be valid JSON format).
- Save the alert by clicking ((Create Alert)).
Obtaining the Slack WebHook URL
- Navigate to your Slack Workspace, and into the channel that you'd like messages to be sent to.
- Click on your Slack Workspace Name >> Settings & Administration >> Manage Apps.
- In the window that opens, click Build in the top right of the toolbar (next to your workspace name).
- Alternatively, navigate to https://api.slack.com/apps/
- Click Create an App >> from scratch.
- Name the app and choose a workspace (choose the workspace that you'd like to receive the notifications in).
- Click Create App.
- Select Incoming WebHooks and activate incoming WebHooks on the next window.
- Click Add New WebHook to Workspace and select which channel you'd like to send notifications to.
- Copy the newly generated WebHook URL into Hudu WebHook alert settings exactly.
WebHook PayloadsIn order to have a message generated in your Slack, you will need to deliver a payload. A payload is a piece of essential information in a data block that you send to or receive from the server when making API requests. The payload must be sent or received in JSON format.
- Here are some examples of WebHook Payloads:
"text": "There are *$EXPIRATIONS_COUNT* expirations expiring within *$TRIGGER_DAYS* days. View: $EXPIRATIONS_HUDU_URL"
"text": "*$WEBSITE_NAME* appears to be down. View: $WEBSITE_HUDU_URL"
- Navigate to your Hudu admin area >> Alerts and find your created alert from the list.
- Click on Test WebHook.
We are only testing your connection and payload, not your variables; sample variables will be filled in.
The guides below will serve to assist with setting up WebHook notifications to alternative common providers.