Use outbound webhooks to send incident information from Squadcast into other systems
Webhooks allow you to connect a platform you manage (either an API you create by yourself or a third-party service) to a stream of future events.
Setting up a Webhook on Squadcast enables you to receive information (referred to as events) from Squadcast as they happen. This can help you avoid continuously polling Squadcast’s REST APIs or manually checking the Squadcast web/mobile application for desired information.
Only the Account Owner and Users with the
Manage Webhookpermission will be able to enable, disable and manage Webhooks in Squadcast.
If you do not have access to this feature, please contact your account admin to give you the right permissions.
Navigate to Settings -> Permissions and enable the checkbox under Webhooks for the desired users.
Setting up Webhooks permission
To add a Webhook,
- 1.Navigate to Settings -> Webhooks
- 2.Click Add Webhook. On the next screen, you will be guided through three steps. Navigate between these steps by clicking on any of the steps on the top bar.
- 3.Add Webhook Details:Step 1: Add Webhook Details
Click Save Changes, and navigate to the next step.
- 1.Webhook Name: Enter the Webhook Name.
- 2.Webhook Description (optional): Enter an optional description.
- 3.Failure Notification Email (optional): Enter an email where you want to receive failure notifications. This is particularly helpful when you (or an administrator) would want to be notified of Webhook-related failures.
- 4.URL: Enter the Webhook URL. We support the addition of multiple URL endpoints, with POST, PUT, and PATCH methods. Incident payloads will be sent to all the URL endpoints that are added.
- 5.Additional Headers (optional): You can also configure additional headers. These headers will get attached to all the Webhook calls that will be made based on this configuration. Note: Content-Type: application/JSON is added by default.
- 4.Choose Webhook Type: Choose Webhook type (Manual or Automatic) and add configurations.Step 2(a): Configure Manual WebhookStep 2(b): Configure Automatic Webhook
- 1.Manual Webhook: Manually trigger Webhooks under incidents, on demand. Under Manual Webhook, select the teams that are authorized to access the Webhook. You can select All Teams or enter specific Teams, from the drop-down.
- 2.Automatic Webhook: Automatically trigger Webhooks when the configured conditions match. To set up Automatic Webhook Configurations:
Click Next: Configure Payload, and navigate to the next step.
- 1.Versions: Select the version from the drop-down.
- 1.V1 supports limited events which are backward compatible
- 2.V2 is the latest version and supports a lot more events
- 2.Triggers: Select the Trigger events (conditions) for which the Webhook will be triggered.
- 3.Filters: You can apply filters on top of events, based on Teams, Services, Alert Sources, and Tags, either by having an individual expression or a combination of expressions/expression groups.Applying filters will allow the Webhook to be triggered only for events that match the filter.
- 5.Configure Payload: Configure the payload based on your selected Webhook type.Step 3(a): Configure payload for Manual WebhookStep 3(b): Configure payload for Automatic Webhook
- 1.Manual Webhook:
- 2.Payload: You can reference your selected template payload here. You can modify the payload and validate it before saving the Webhook. You can also test the Webhook by clicking on the Test Webhook on the bottom right.
- 2.Automatic Webhook: You can select between the standard Squadcast payload for all trigger events or customize the payload based on the pre-configured templates.
- 1.Standard Squadcast Payload: You will find the standard payload for your selected trigger events based on the version you have selected. Note: You can only test the Webhook for the first trigger event you have selected in Step 2.
- 2.Custom Payload: You can reference your selected template payload here. You can modify the payload and validate it before saving the Webhook. You can also test the Webhook by clicking on the Test Webhook on the bottom right. Note: You can only test the Webhook for the first trigger event you have selected in Step 2.
Click Save and you're done.
Squadcast uses the below IPs from which it sends Webhook requests. You may need to whitelist these IPs with your firewall to use Webhooks without any issues.
For US region: 126.96.36.199
For EU region: 188.8.131.52
The Webhooks that you have configured can be triggered for certain Trigger Events occurring in Squadcast.
You can choose multiple Trigger Events for a Webhook. Information is sent to the provided URLs if any of the triggers match. The following event types are available for each Webhook version:
Payloads for event types part of both versions are different for each.
Note: Additional event types may be added to this list over time.
To edit the Webhook configurations,
Navigate to Settings -> Webhooks -> Hover over any Webhook you want to edit and click Edit Webhook. It will open up to the guided three-step creation flow, where you can edit by navigating between these steps by clicking on any of the steps on the top bar.
Steps to edit a Webhook
To delete a Webhook,
Navigate to Settings -> Webhooks -> Under more options, click Delete. You will receive a confirmation dialog prompt to confirm the deletion, click Delete.
Steps to delete a Webhook
A Webhook is called whenever the configured events occur in Squadcast.
A Webhook call is made using the
HTTP POSTmethod to the URL(s) that were added when the Webhook was configured, with a body that is encoded using
Squadcast expects the server that responds to the webhook to return a 2xx response code upon success. If a non-2xx response is received, Squadcast will retry the request a maximum of 3 times, over a period of time.
To view logs for Webhook calls that have been made,
Navigate to Settings -> Webhooks -> Hover over any Webhook you want to view the logs for and click View Logs. You can view the Timestamp, Status, and Payloads for each Webhook call.
Steps to view logs for Webhook calls
Webhooks can be leveraged in various scenarios. We have put together some common use cases.
- Building internal custom dashboards to visualize or analyze incidents
- Sending data to ticketing tools like Zendesk, Freshdesk, Shortcut, Asana, etc.
- Sending events to communication apps like Slack, MS Teams, etc.
- Alerting when a workflow is disrupted- then using the API to re-run the workflow
- Triggering internal notification systems to alert people when incidents are created/resolved
- Building your own automation plug-ins and tools
- 1.The Webhooks API provides "at least once" delivery of Webhook events. This means that an endpoint might receive the same Webhook event more than once. You should be able to handle any possible duplicates.
- 2.Ordering amongst Webhooks isn't guaranteed between different topics for the same resource. For example, it's possible that an incident-triggered Webhook for a second incident might get triggered before the first incident when there are many incidents created in quick succession.
- 3.Webhook delivery isn't always guaranteed. You should therefore implement reconciliation jobs to fetch data from Squadcast periodically.