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 IXON 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 IXON 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 IXON 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 IXON Cloud.
- First you'll need a webhook URL so the IXON Cloud knows where to send messages to.
Webhook URL?You can get a webhook URL at the website or service that you want to connect to via webhook (e.g. 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. These steps can vary per service.
- In the IXON Cloud, go to [Messages]in the main menu and open the Message Center settings by pressing the settings icon in the top right corner.
- Press [Add new webhook], enter a name, enter the webhook URL, and press [Add].
Webhook addedNew messages in your message center will now be forwarded to the connected external application.
External application configurationYou may still need to configure the external application to properly interpret the information. Please take a look below for an example and description.
The IXON Cloud sends the information in a specific format. As external application you can use services that can already interpret this information format (e.g. 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.
"companyName": "IXON Product Demo",
"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",
"userName": "Demo user"
Some explanatory details on the above information:
|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)|