Configure a single Webhook with many Webhook data types

Solved
Roey1984
Building a reputation

Configure a single Webhook with many Webhook data types

Hello

We have an API Webhook configured to push notification to a Receiver (Slack channel).

I`m using the Built in Template ( Slack (included) ), but it seems that it doesn't include all Webhook data types (or at least the ones i need)

 

How can i configure a single Receiver to use multiple Webhook data types?

For example, i wish to have a receiver (the slack channel) to get notifications for the following:

AP came up \ AP went down \ cable error \ power supply went down , etc.

 

Any idea how to configure multiple?

I created a new Template, and my question is, how or what do i need to fill in the "Edit" field?

I found a picture on the Meraki site (EXAMPLE) - and it looks very good to me, how do i configure it?chrome_D8VyHpsTWS.pngchrome_r0NW0MlKlt.png

1 Accepted Solution
alemabrahao
Kind of a big deal
Kind of a big deal

The difference between webhook templates typically lies in the specific data format and the type of events they are designed to handle. Each template is tailored to work with a particular service or application, such as Meraki, Webex, Slack, or Microsoft Teams. 

 

Meraki: This template is likely designed for Cisco Meraki devices and would include fields relevant to network events, such as device status updates or security alerts.

 

Webex: A Webex template would be formatted to send notifications related to Cisco Webex events, such as meeting starts, message alerts, or call notifications.

 

Slack: The Slack template is structured to send messages to a Slack channel and would include fields for message text, attachments, and other Slack-specific formatting options.

 

Microsoft Teams: Similar to Slack, a Microsoft Teams template would be set up to send notifications to a Teams channel, with fields that support Teams' formatting and messaging features.

 

 

Choose the template that matches the service you're integrating with. If you're sending notifications to Slack, use the Slack template.

 

 

Select the template that supports the types of events you want to monitor. For example, if you're monitoring network events from Meraki devices, the Meraki template would be the most appropriate.

 

If you need to customize the payload beyond what's provided by the built-in templates, you may need to create a custom template or modify an existing one to suit your needs.

 

Refer to the documentation provided by the service you're integrating with for specific instructions on how to set up and use the templates. This will often include examples of the JSON payload and the expected fields for each event type.

 

Understanding the Difference Between Webhooks vs. APIs (hubspot.com)

 

Remember, the key is to match the template with the service you're using and the types of notifications you want to receive. If you're still unsure, you can test each template to see which one provides the notifications in the format that best suits your requirements.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.

View solution in original post

4 Replies 4
MartinLL
Building a reputation

I'm not 100% sure if i understand what you want, but the default template is fine in most cases.

To controll which event types you get you must tick the boxes you want under network-wide -> Alerts and add your HTTPS receiver to Default recipients. 

 

The key fields in your liquid body is just that, keys. The values in {{value}} is populated depending on which alert is triggered.

 

MLL
alemabrahao
Kind of a big deal
Kind of a big deal

To configure a single Slack channel to receive notifications for multiple webhook data types, you'll need to customize the payload that is sent to Slack's Incoming Webhook URL. 

 

Since you've already created a new template, you'll need to edit the JSON payload in the "Edit" field to include the information for the different webhook data types you want to receive notifications for.

 

To configure your webhook to send notifications to Slack with the data types you need, you’ll want to structure your JSON payload to include the relevant information for each event type. Here’s an example of how you might set up a JSON payload for different event types:

JSON

{
"text": "Network Alert",
"attachments": [
{
"fallback": "Required plain-text summary of the attachment.",
"color": "#36a64f",
"pretext": "Pretext message to introduce the alert",
"author_name": "Network Monitoring System",
"title": "Event Type: AP came up",
"text": "Details about the event, such as location and time",
"footer": "Network Operations Center",
"footer_icon": "https://path_to_your_logo.png",
"ts": 123456789
}
]
}


In this payload:

"text" is the main message text that will be displayed in the Slack channel.
"attachments" is an array of structured messages that can include more detailed information.
"fallback" is a plain-text summary of the attachment.
"color" is a hex color code that will be used as a strip along the left side of the message attachment.
"pretext" is optional text that appears above the attachment block.
"author_name" is the name of the author or system sending the alert.
"title" specifies the event type.
"text" provides additional details about the event.
"footer" and "footer_icon" allow you to add a small footer with an icon.
"ts" is an optional Unix timestamp that Slack will convert into a time.


You can create multiple attachments within the "attachments" array for different event types, and each attachment can have its own color and details.

 

To handle multiple event types like 'AP came up', 'AP went down', 'cable error', 'power supply went down', etc., you can set up multiple attachments within the same payload, each with its own `title` and `text` reflecting the specific event.

 If you want to include dynamic data from the webhook, you can use placeholders in your template that will be replaced with actual data when the webhook is triggered.

 

For the exact fields and formatting options available in Slack messages, refer to the [Slack message formatting documentation].

 

Sending messages using Incoming Webhooks | Slack

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Roey1984
Building a reputation

thank you very much

alemabrahao
Kind of a big deal
Kind of a big deal

The difference between webhook templates typically lies in the specific data format and the type of events they are designed to handle. Each template is tailored to work with a particular service or application, such as Meraki, Webex, Slack, or Microsoft Teams. 

 

Meraki: This template is likely designed for Cisco Meraki devices and would include fields relevant to network events, such as device status updates or security alerts.

 

Webex: A Webex template would be formatted to send notifications related to Cisco Webex events, such as meeting starts, message alerts, or call notifications.

 

Slack: The Slack template is structured to send messages to a Slack channel and would include fields for message text, attachments, and other Slack-specific formatting options.

 

Microsoft Teams: Similar to Slack, a Microsoft Teams template would be set up to send notifications to a Teams channel, with fields that support Teams' formatting and messaging features.

 

 

Choose the template that matches the service you're integrating with. If you're sending notifications to Slack, use the Slack template.

 

 

Select the template that supports the types of events you want to monitor. For example, if you're monitoring network events from Meraki devices, the Meraki template would be the most appropriate.

 

If you need to customize the payload beyond what's provided by the built-in templates, you may need to create a custom template or modify an existing one to suit your needs.

 

Refer to the documentation provided by the service you're integrating with for specific instructions on how to set up and use the templates. This will often include examples of the JSON payload and the expected fields for each event type.

 

Understanding the Difference Between Webhooks vs. APIs (hubspot.com)

 

Remember, the key is to match the template with the service you're using and the types of notifications you want to receive. If you're still unsure, you can test each template to see which one provides the notifications in the format that best suits your requirements.

I am not a Cisco Meraki employee. My suggestions are based on documentation of Meraki best practices and day-to-day experience.

Please, if this post was useful, leave your kudos and mark it as solved.
Get notified when there are additional replies to this discussion.