Send Alert SMS using Lenze integration in PagerDuty

With Cloud Notify you receive real-time notifications from your machine(s) in a robust and safe way. By connecting an external application via a webhook, you can expand your options even further. Using the webhook PagerDuty, you can further customize alarm messages and determine specific roles for the alarm messages of Cloud Notify.

PagerDuty is an industrial incident response platform and can notify via phone, SMS, e-mail and push messages. Furthermore, you can also provide “On-call schedules” to specify shifts or timetables, so you will only receive notifications during your shift.

The use of webhooks in X4 Remote is free. However, keep in mind that applications such as PagerDuty may charge a fee for using their services.

This article explains how you can connect X4 Remote to PagerDuty via a webhook.

How it works

Based on the alerts in X4 Remote, PagerDuty notifies the right recipients by sending enriched event data, including an alarm description. X4 Remote uses webhooks to send HTTP POST message events to an endpoint in PagerDuty. When PagerDuty receives a message event, it will trigger an incident to notify users on-call, based on your configuration.

Integration walkthrough

The integration is configured in both X4 Remote and on the PagerDuty website. First we will add a service in Pagerduty:

Required permission

In PagerDuty you require a Manager role or higher for the service your X4 Remote is integrated with. If you do not have this role, please contact an administrator or Account Owner within your organization to configure the integration.

  • From the [Configuration] menu, select [Services].
  • On your Services page: click [+Add New Service].
  • Give the Service a [Name], select [Customer Event Transformer] from the [Integration type] menu and enter an [Integration name].

Make sure to set How should responders be notified under Incident Settings to Use alert severity to determine how responders are notified for each incident. This enables you to specify the Pagerduty urgency of a Cloud Notify alarm. You can customize these settings to meet your requirements.


After adding the Service, use the [Event Rules] tab to create these event rules. If you follow these settings, only alarms with systemLabel alarm-high and alarm-medium will generate a High Urgency incident. Alarms with systemLabel alarm-low will generate a Low Urgency incident. Each user can specify for themselves how they should be notified for each urgency level. By default, a High Urgency Incident triggers an email, a call and an SMS. A Low Urgency Incident will only trigger an email. You can customize these settings to your liking.


We need to add some custom code so PagerDuty can understand the data it receives from X4 Remote.

  • Use the [Edit] action on your Custom Event Transformer.
  • Copy and paste the code below.
var input = PD.inputRequest.body;

var normalized_event = { 
  event_type: PD.Trigger, 
  description: input.shortContent, 
  client: "X4 Remote", 
  client_url: "", 
  details: input 

  • After saving the changes, copy the Integration URL.

Now that the PagerDuty setup is complete, we can proceed with configuring the X4 Cloud:

  • Go to [Messages] in the main menu and open the Message Center settings by pressing the settings icon  in the top right corner.
  • Add a new Webhook.
  • Add your Integration URL.
  • Create a message, e.g. “trigger an alarm”.

The message will be sent to PagerDuty and a new incident will be created.


PagerDuty and X4 Remote are now integrated

New alarm messages in X4 Remote will now be sent to and handled by PagerDuty.

Please refer to PagerDuty’s documentation on how to best utilise their wide range of functions.