Webhooks offer a powerful mechanism for integrating and automating processes across different applications and services. Elements supports executing custom webhooks as actions on automations. For example, create a webhook to post a message to Microsoft Teams when a Door Forced Open event occurs, or send Device Offline events to PagerDuty or ServiceNow for further triage.
Configuration
Elements automation action webhooks support the following HTTP scheme, methods, and body content types.
URL endpoint
Scheme must be
https://
Host must be a fully qualified domain name (FQDN); IP addresses are not allowed.
HTTP methods:
GET
POST
PUT
PATCH
DELETE
HEAD
Body content types:
application/json
application/xml
text/plain
Context
Enrich webhooks with context from the event that triggered the automation.
Available Variables
Trigger Context
id
eventType
eventTypeLocalized
severity
severityLocalized
timestamp
(example: 1717768279000)dateTimeLong
(example: Friday, June 07 at 09:51:19 AM)timeZone
(example: America/New_York)device.id
device.name
device.type
space.id
space.name
person.id
person.firstName
person.lastName
person.customFields.department
Custom person fields may be configured in System Options.
credential.id
credential.badgeId
lockdownProfile.id
lockdownProfile.name
Usage
Reference context variables in webhook URLs and body payloads like {{context.trigger.device.name}}
. See sample webhook payloads below for more examples.
Request Details
Webhooks include the following request headers to facilitate system integration:
Name | Value type | |
---|---|---|
1 |
| Unix time in milliseconds |
2 |
| UUID |
3 |
| UUID |
4 |
| UUID |
5 |
| UUID |
6 |
| UUID |
Additionally, the user-agent
header will be set to elements
.
Sample Webhook Payloads
For your convenience, we have created a selection of sample webhook payloads for popular services. Either copy and paste these as-is into a webhook body, or customize them to meet your needs. For more detailed information, refer to each service’s respective documentation.
Google Sheets
Google Sheets is a web-based spreadsheet application offered by Google. It allows users to create, edit, and collaborate on spreadsheets online.
POST https:
//script.google.com/macros/s/<replace_with_your_webhook_key>/exec
Content-Type: application/json
{
"eventId"
:
"{{context.trigger.id}}"
,
"eventType"
:
"{{context.trigger.eventType}}"
,
"severity"
:
"{{context.trigger.severity}}"
,
"timestamp"
:
"{{context.trigger.timestamp}}"
,
"deviceId"
:
"{{context.trigger.device.id}}"
,
"spaceId"
:
"{{context.trigger.space.id}}"
,
"personId"
:
"{{context.trigger.person.id}}"
,
"credentialId"
:
"{{context.trigger.credential.id}}"
}
IFTTT (If This Then That)
IFTTT is a web-based service that automates tasks by creating simple conditional statements ("applets") based on triggers from various web services, allowing users to connect and synchronize different apps and devices effortlessly.
POST https:
//maker.ifttt.com/trigger/<replace_with_your_event_name>/with/key/<replace_with_your_webhook_key>
Content-Type: application/json
{
"eventId"
:
"{{context.trigger.id}}"
,
"eventType"
:
"{{context.trigger.eventType}}"
,
"severity"
:
"{{context.trigger.severity}}"
,
"timestamp"
:
"{{context.trigger.timestamp}}"
,
"deviceId"
:
"{{context.trigger.device.id}}"
,
"spaceId"
:
"{{context.trigger.space.id}}"
,
"personId"
:
"{{context.trigger.person.id}}"
,
"credentialId"
:
"{{context.trigger.credential.id}}"
}
Microsoft Teams
Microsoft Teams is a comprehensive collaboration platform that integrates chat, video conferencing, file sharing, and app integration, enabling seamless teamwork within organizations.
POST https:
//<replace_with_your_tenant_name>.webhook.office.com/webhook/<replace_with_your_webhook_url>
Content-Type: application/json
{
"@context"
:
"https://schema.org/extensions"
,
"@type"
:
"MessageCard"
,
"themeColor"
:
"0072C6"
,
"title"
:
"{{context.trigger.eventTypeLocalized}}"
,
"text"
:
"{{context.trigger.dateTimeLong}}"
,
"sections"
: [
{
"facts"
: [
{
"name"
:
"Person"
,
"value"
:
"{{context.trigger.person.firstName}} {{context.trigger.person.lastName}} ({{context.trigger.credential.badgeId}})"
},
{
"name"
:
"Space"
,
"value"
:
"{{context.trigger.space.name}}"
},
{
"name"
:
"Device"
,
"value"
:
"{{context.trigger.device.name}}"
}
]
}
],
"potentialAction"
: [
{
"@type"
:
"OpenUri"
,
"name"
:
"View Event"
,
"isPrimary"
:
true
,
"targets"
: [
{
"os"
:
"default"
,
"uri"
:
"https://portal.elementssecure.com/events/{{context.trigger.id}}?activeCustomer={{context.trigger.customerId}}"
}
]
}
]
}
PagerDuty
PagerDuty is an incident management platform that centralizes alerts from monitoring tools, facilitating quick response and resolution of incidents by notifying the right team members and coordinating their efforts to minimize downtime and ensure system reliability.
POST https:
//events.pagerduty.com/v2/enqueue
Content-Type: application/json
{
"routing_key"
:
"<replace_with_your_integration_key>"
,
"event_action"
:
"trigger"
,
"payload"
: {
"summary"
:
"{{context.trigger.eventTypeLocalized}}"
,
"source"
:
"LenelS2 Elements"
,
"severity"
:
"warning"
,
"component"
:
"security"
,
"group"
:
"production"
,
"class"
:
"application"
,
"custom_details"
: {
"event_id"
:
"{{context.trigger.id}}"
,
"event_type"
:
"{{context.trigger.eventType}}"
,
"severity"
:
"{{context.trigger.severity}}"
,
"timestamp"
:
"{{context.trigger.timestamp}}"
,
"device_id"
:
"{{context.trigger.device.id}}"
,
"space_id"
:
"{{context.trigger.space.id}}"
}
},
"links"
: [
{
"href"
:
"https://portal.elementssecure.com/events/{{context.trigger.id}}?activeCustomer={{context.trigger.customerId}}"
,
"text"
:
"View Event"
}
]
}
Microsoft Power Automate (Microsoft Flow)
Power Automate is a service that automates workflows across multiple applications and services, enabling users to create automated workflows and tasks based on triggers, actions, and conditions without requiring extensive coding knowledge.
POST https:
//<instance>.<region>.logic.azure.com/workflows/<replace_with_your_flow_id>/triggers/manual/paths/invoke?api-version=2016-10-01&sp=%2Ftriggers%2Fmanual%2Frun&sv=1.0&sig=<replace_with_your_flow_trigger_signature>
Content-Type: application/json
{
"eventId"
:
"{{context.trigger.id}}"
,
"eventType"
:
"{{context.trigger.eventType}}"
,
"severity"
:
"{{context.trigger.severity}}"
,
"timestamp"
:
"{{context.trigger.timestamp}}"
,
"deviceId"
:
"{{context.trigger.device.id}}"
,
"spaceId"
:
"{{context.trigger.space.id}}"
,
"personId"
:
"{{context.trigger.person.id}}"
,
"credentialId"
:
"{{context.trigger.credential.id}}"
}
ServiceNow
ServiceNow is a cloud-based platform that automates and streamlines IT and business workflows, enhancing efficiency and service delivery across an organization.
POST https:
//<replace_with_your_username>:<replace_with_your_password>@<replace_with_your_instance>.service-now.com/api/now/table/incident
Content-Type: application/json
{
"short_description"
:
"Elements Device Offline"
,
"description"
:
"{{context.trigger.eventTypeLocalized}}: {{context.trigger.device.name}}. This incident was created via a webhook."
,
"category"
:
"Software"
,
"subcategory"
:
"Application"
,
"priority"
:
"2"
,
"impact"
:
"2"
,
"urgency"
:
"2"
}
Slack
Slack is a messaging app for teams, offering channels for organized communication, file sharing, integration with various tools and services, and customizable workflows to streamline collaboration.
POST https:
//hooks.slack.com/services/<replace_with_your_webhook_key>
Content-Type: application/json
{
"username"
:
"Elements Automation Webhook"
,
"icon_url"
:
"https://portal.elementssecure.com/android-chrome-192x192.png"
,
"attachments"
: [
{
"fallback"
:
"<https://portal.elementssecure.com/events/{{context.trigger.id}}?activeCustomer={{context.trigger.customerId}}|View Event>"
,
"pretext"
:
"<https://portal.elementssecure.com/events/{{context.trigger.id}}?activeCustomer={{context.trigger.customerId}}|View Event>"
,
"color"
:
"warning"
,
"fields"
: [
{
"title"
:
"{{context.trigger.eventTypeLocalized}}"
,
"value"
:
"{{context.trigger.dateTimeLong}}"
},
{
"title"
:
"Person"
,
"value"
:
"{{context.trigger.person.firstName}} {{context.trigger.person.lastName}} ({{context.trigger.credential.badgeId}})"
},
{
"title"
:
"Space"
,
"value"
:
"{{context.trigger.space.name}}"
},
{
"title"
:
"Device"
,
"value"
:
"{{context.trigger.device.name}}"
}
]
}
]
}
Zapier
Zapier is an online automation tool that connects apps and services to automate repetitive tasks and workflows, allowing users to create "Zaps" that trigger actions in one app based on events in another, thereby streamlining processes and improving efficiency.
POST https:
//hooks.zapier.com/hooks/catch/<replace_with_your_webhook_key>
Content-Type: application/json
{
"eventId"
:
"{{context.trigger.id}}"
,
"eventType"
:
"{{context.trigger.eventType}}"
,
"severity"
:
"{{context.trigger.severity}}"
,
"timestamp"
:
"{{context.trigger.timestamp}}"
,
"deviceId"
:
"{{context.trigger.device.id}}"
,
"spaceId"
:
"{{context.trigger.space.id}}"
,
"personId"
:
"{{context.trigger.person.id}}"
,
"credentialId"
:
"{{context.trigger.credential.id}}"
}
© Honeywell International Inc. All Rights Reserved.