With Cloud Notify you can receive real-time notifications from your machine(s) in a robust and safe way. By connecting an external application via webhook, you can expand your options even further. Think about a chain of recipients (first person one gets a message, if he doesn't respond, person two gets a message), SMS functionality, automated calls, and more.
The use of webhooks in the StrideLinx Cloud is free. However, keep in mind that the external application(s), that you connect to via a webhook, may not be.
What is a webhook?
A webhook is a way for an application to provide external applications with real-time information. It's sometimes referred to as "reverse API", because the external application is not requesting the information itself, but is simply being given the information instead. It then needs to be able to interpret this information, because it's being provided in a certain format. More details on this later.
What can I send?
All messages that you receive in your StrideLinx message center can be forwarded via a webhook, in real-time. This includes:
- When a device from your company is transferred to another company.
- When any Cloud Notify alarm has been triggered.
Add a webhook in the StrideLinx Cloud
Now that you understand what a webhook is and which information you can send via a webhook, you can add a webhook in the StrideLinx Cloud using a webhool URL. You can get a webhook URL at the website or service that you want to connect to via webhook (e.g. SIGNL4, PagerDuty, Zapier, IFTTT, etc.). On that website you need to follow the appropriate steps to connect via a webhook and it will provide you with a webhook URL.
Please follow the steps described below to add a webhook URL in the StrideLinx Cloud:
- Go to the StrideLinx Cloud. if you are not already there.
- Go to Messages , press on the settings menu .
- Select [Configure webhooks], then select [Add a new webhook]
- Enter the name and URL of the Webhook you want to add, then press [Confirm].
Webhook added
New messages in your message center will now be forwarded to the connected external application.External application configuration
You may still need to configure the external application to properly interpret the information. Please take a look below for an example and description.Information format
The StrideLinx Cloud sends the information in a specific format. As external application you can use services that can already interpret this information format (e.g. SIGNL4, PagerDuty, IFTTT), or use an integration service like Zapier to indirectly connect to numerous other services, like Google Sheets. If you're really tech-savvy you can even develop your own application, in which case the options are endless.
Below is an example of the Cloud Notify alarm format that is sent via a webhook.
{
"alarmRateLimitTill": null,
"companyId": "2618-3162-2154-8450-3278",
"companyName": "StrideLinx Product Demo",
"createdOn": "2019-05-10T09:20:58",
"extraInfo": {
"Counter1000Max30": "30",
"Device ID": "Txv221Us6poE",
"Device name": "Project #D4 - Alarming machine"
},
"longContent": "Instructions: Your machine entered an alarm state. Please turn the machine off, open valve D5, and clear any dirt. Reset the alarm afterwards to resume production.",
"shortContent": "Alarm every 30s of Project #D4 - Alarming machine was triggered at 5/10/19, 9:20 AM UTC",
"systemLabel": "alarm-medium",
"userId": "8WL2I3FsCO4e",
"userName": "Demo user"
}
Some explanatory details on the above information:
Property | Remark |
---|---|
createdOn | The timestamp is in ISO 8601 format. |
extraInfo | This property contains the value of the variable at the moment the alarm fired - in the example above the variable "Counter1000Max30" had value "30" - and the device name, which often is the project or customer name. |
longContent | This is the information that's entered as "instructions" in the alarm for more information about the alarm situation |
shortContent | This is the subject of the message/e-mail |
systemLabel | This property indicates the type of message (e.g. "alarm-medium" means a medium priority alarm) |