Teams - WebHooks

WebHooks are automated messages sent from apps when something happens. They have a message—or payload— and are sent to a unique URL; named WebHook URL. This article will serve to assist with sending WebHook notifications to a Microsoft Teams channel.
Before setting up notifications to Teams, please read over our Alerts article to learn basic concepts and useful tips.
In order to set up WebHook notifications to Teams, you will need:
  • A team created and channel (within the team) 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.

Enabling Alerts

  • 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 Workflow URL from Teams.
    • Provide payload delivery information in the WebHook payload field (must be valid JSON format).
  • Save the alert by clicking Create Alert.

Obtaining Workflow URL in Teams

  • Navigate to Microsoft Teams, and into the team & channel that you'd like messages to be sent to.
  • Click on your Channel name → Workflows.

workflows.png

  • Or navigate to Apps on the left-hand side bar and search for and open Workflows.
  • Find "Send webhook alerts to a channel" in the list of Teams templates.
  • Make sure all apps have a valid connection. 
  • Click Next.
  • Confirm the Team and Channel to post the card to.
  • Click Save.
  • Copy the newly generated URL into Hudu WebHook alert settings exactly.

Please also see the Microsoft guide on how to Create incoming webhooks with Workflows for Microsoft Teams for more information.

webhook_url.png

 

    The existing Microsoft 365 connectors across all cloud platforms are being deprecated, and the creation of new Microsoft 365 connectors will soon be blocked. For more information, here is an article on the Retirement of Office 365 connectors with Microsoft Teams.

Transition from Office 365 connectors to Workflows

If you are currently using Office 365 connectors in Microsoft Teams, you will need to migrate your existing connectors to Workflows. 

  • Go the Workflows app in Teams and click on the "Create" tab at the top.
  • Choose the type of workflow you want either from a template or from scratch.
    • If you choose to create from a template, you can search for a workflow template that matches your Office connectors' functionality. 
    • If you choose to create from scratch, you can select the trigger and action for your workflow. 
  • The Workflows app can be accessed within a chat or channel by right-clicking on the conversation, or by clicking on More options (...). 

WebHook Payloads

In order to have a message generated in Microsoft Teams, you will need to deliver a payload. A payload is a block of essential information, formatted in JSON, that you send to or receive from the server when making API requests.

❗ Important

Microsoft Teams only supports Adaptive Cards for webhooks. Make sure your JSON payload conforms to the Adaptive Card schema and includes a valid type, version, and body structure.

    Hudu Radar alert webhooks send a preconfigured JSON payload that can't be customized. Because Microsoft Teams expects its own message format, Radar alert webhooks may not post to a Teams channel without additional configuration to handle the payload.

Supported variables and example payloads

Expand an alert type to see its supported variables and an example Teams payload.

Single expiration

Supported variables

  • $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)

Example payload

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "Heads up! *$RECORD_NAME* under *$COMPANY_NAME* is expiring in *$TRIGGER_DAYS* days. View: [$HUDU_URL]($HUDU_URL)"
          }
        ]
      }
    }
  ]
}
Expiration list

Supported variables

  • $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)

Example payload

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "There are *$EXPIRATIONS_COUNT* expirations expiring within *$TRIGGER_DAYS* days. View: [$HUDU_URL]($HUDU_URL)"
          }
        ]
      }
    }
  ]
}
Website down

Supported variables

  • $HUDU_URL = Link to the relevant record in Hudu
  • $RECORD_NAME = Name of record
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Name of company (if present)
  • $COMPANY_ID = Record's company ID (if present)
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $USER = Who triggered the alert (the monitoring job for automated checks)

Example payload

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "*$RECORD_NAME* appears to be down. View: [$HUDU_URL]($HUDU_URL)"
          }
        ]
      }
    }
  ]
}
One-time shared password reveal

Supported variables

  • $HUDU_URL = Link to the relevant record in Hudu
  • $RECORD_NAME = Name of record
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Name of company (if present)
  • $COMPANY_ID = Record's company ID (if present)
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $USER = Who revealed the password (a guest with their IP address)

Example payload

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "The shared password *$RECORD_NAME* was just viewed. View: [$HUDU_URL]($HUDU_URL)"
          }
        ]
      }
    }
  ]
}
Record created / updated / deleted

Supported variables

  • $HUDU_URL = Link to the relevant record in Hudu
  • $RECORD_NAME = Name of record
  • $RECORD_ID = Record ID
  • $RECORD_TYPE = Type of record
  • $COMPANY_NAME = Record's company name (if present)
  • $COMPANY_ID = Record's company ID (if present)
  • $HUDU_COMPANY_URL = Link to the company in Hudu (if present)
  • $ACTION = Name of the action that occurred (create, update, delete)
  • $ASSET_LAYOUT_ID = Record's Asset Layout ID (if present)
  • $USER = Who made the change (user, API, integration, or HuduBot)

Example payload

{
  "type": "message",
  "attachments": [
    {
      "contentType": "application/vnd.microsoft.card.adaptive",
      "content": {
        "type": "AdaptiveCard",
        "version": "1.5",
        "body": [
          {
            "type": "TextBlock",
            "wrap": true,
            "text": "*$RECORD_NAME* [*$RECORD_TYPE*] has been *$ACTIONd*. View: [Link to Hudu]($HUDU_URL)"
          }
        ]
      }
    }
  ]
}

Testing WebHooks

  • 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.

Alerts_-_HUDU.png

Alternative Guides

The guides below will serve to assist with setting up WebHook notifications to alternative common providers.

discordlogo.png

Discord

slacklogo.png

Slack

genericwebhook.png

Generic Provider

zapierlogo.png

Zapier

Helpful Links

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