Understanding WebHooks

Webhooks are automated messages sent from one app to another when something happens. Each webhook has a message, called the payload, that is sent to a unique URL, called the webhook URL. This article covers sending Hudu alert webhooks to any generic provider and lists the variables you can use in your payloads.

    Visit Alerts for additional information on alert types and settings.

You can send webhooks to any generic provider if the provider:

  • Supports webhooks.
  • Supports requests with the Content-Type set to application/json.
  • Allows JSON payloads.

Guides

Setting up a webhook alert

  • Navigate to the Hudu admin area >> Alerts.
  • Click ((+ New Alert)).
  • Enter a Name for the alert.
  • Choose an option from Alert type and complete the required fields, including the company or companies the alert applies to.
  • Enter the email address to receive the alert in Send alert to.
  • Under Configure Webhook:
    • Enter the Webhook URL from your provider.
    • Enter your Webhook payload. The payload must be valid JSON.
    • The Hudu Webhook Variables available for the selected alert type are listed below the payload field.
  • Click Create Alert to save.

    To change an alert later, return to the Hudu admin area >> Alerts and edit it from the list.

Using Hudu webhook variables

Hudu variables are tokens that start with $. Add them to your JSON payload, and Hudu replaces each one with real alert data when the webhook is delivered. Each alert type supports a different set of variables, listed below.

Single expiration
  • $HUDU_URL = Link to the relevant expiration in Hudu
  • $RECORD_NAME = Name of expiring record
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Name of expiring record's company
  • $COMPANY_ID = Company ID
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $TRIGGER_DAYS = Number of days set as trigger time
  • $EXPIRATION_TYPE = Type of expiration (e.g., domain, ssl_certificate, warranty)
  • $EXPIRATION_DATE = The expiration date
  • $USER = Who triggered the alert (the scheduled job for automated alerts)
Expiration list
  • $HUDU_URL = Link to the relevant expirations in Hudu
  • $EXPIRATIONS_COUNT = Number of expirations
  • $TRIGGER_DAYS = Number of days set as trigger time
  • $USER = Who triggered the alert (the scheduled job for automated alerts)
Website down
  • $HUDU_URL = Link to the website in Hudu
  • $RECORD_NAME = Name of website
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Name of the website's company
  • $COMPANY_ID = Company ID
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $USER = Who triggered the alert (the scheduled job for automated alerts)
One-time shared password reveal
  • $HUDU_URL = Link to the password in Hudu
  • $RECORD_NAME = Name of password
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Name of the password's company
  • $COMPANY_ID = Company ID
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $USER = Who triggered the alert
Record created/updated/deleted
  • $HUDU_URL = Link to the record in Hudu
  • $RECORD_NAME = Name of record
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $ACTION = Action that occurred (create, update, or delete)
  • $COMPANY_NAME = Name of the record's company (if present)
  • $COMPANY_ID = Company ID (if present)
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $ASSET_LAYOUT_ID = Asset layout ID (if present)
  • $USER = Who made the change

   $WEBSITE_NAME, $WEBSITE_HUDU_URL, and $EXPIRATIONS_HUDU_URL are no longer listed on the alert form. Existing alerts that use them still work: Hudu treats $WEBSITE_NAME as $RECORD_NAME, and $WEBSITE_HUDU_URL and $EXPIRATIONS_HUDU_URL as $HUDU_URL. Use the current variable names for new alerts.

Example JSON payload (generic webhook receiver)

{
  "message": "Hudu alert: $RECORD_NAME ($RECORD_TYPE) was $ACTIONd by $USER. Link: $HUDU_URL"
}

Testing webhooks

  • Navigate to the Hudu admin area >> Alerts and find your alert in the list.
  • Click Test WebHook.

    The test checks your connection and payload only. Sample values are filled in for your variables.

Alerts_-_HUDU.png

Provider guides

Visit the guides below for provider-specific setup and payload examples.

slacklogo.png

Slack

teamslogo.png

Microsoft Teams

discordlogo.png

Discord

zapierlogo.png

Zapier

FAQ

Why does my test webhook show sample values instead of real data?

Test WebHook only checks that your provider receives the request and that the payload is valid. Hudu fills in sample values for variables during a test. Real values are sent when the alert triggers.

What does $USER show for expiration alerts?

Expiration alerts are sent automatically, so $USER shows the scheduled job that triggered the alert rather than a person.

Why is a variable empty in my webhook?

Variables marked "(if present)" are only filled in when the record has that information. For example, $COMPANY_NAME is empty for records that don't belong to a company. Also check that the variable is supported for the alert type you're using.

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