Overview
Zapier is a powerful tool that allows its users to integrate multiple applications within its app ecosystem by creating what are known as “Zaps”. Within this article, we will cover how to setup a zap within Zapier that will trigger anytime an alarm enters or exits a Virtual Facility lens. When the zap triggers alarm information will be provided to the zap which can then be used to perform actions with the 3000+ integrations available within Zapier.
Prerequisites
- Virtual Facility account that allows custom lenses and lens notifications to be created/edited
- A paid Zapier account is required
Setup the Zapier Zap
Login to Zapier and elect to create a new Zap.
Within the Zap editor select the “Trigger” and choose “Webhooks”
Ignore “Pick off child key” and continue to the next step to test. There will be a webhook url presented and that can be copied. We are done for now but this webhook url will be used to setup the notification within Virtual Facility later so write it down, copy it somewhere, or remember how to get back to this test screen because we will need to come back after we have added this URL to our lens notification settings within Virtual Facility.
Setup lens notification
Login to Virtual Facility and navigate to the alarm section. Edit an existing lens (or create a new one if desired and edit). Once within the lens edit modal select “Add notification” (you can also edit an existing notification if desired).
Within the notification modal scroll down to the “Integrations” section and under “Zapier Webhooks” select “Add webhook url”.
Next we will add the webhook URL provided by Zapier within our Zap setup from the previous section.
Select an Alarm to test your zap with. This can be any desired alarm and will not be limited to the alarms that are only applicable to the alarm lens.
Select the “Test Webhook“ button. This will send a test notification for the selected alarm and the lens that the notification is being created for directly to Zapier so that we can complete our Zap setup within Zapier. Please note that the test could take a little while to complete so be patient. For a complete example of the payload we send to Zapier please see an example below.
Save the webhook URL and then save the lens notification. The setup from within VF is now complete however, we need to finish setting up the Zap within Zapier.
Finish Setup of Zap Trigger
Navigate back to the Zapier Zap setup and click the test trigger button. There should be a recent request displayed e.g. “request A“. Click on it and data that we sent during our test from earlier should be displayed. Verify the data looks good and then click continue to finish setting up the Zap.
Congrats
The trigger step for the Zap is now setup and ready. Next we will setup our
action which is what we want to happen anytime the alarm lens notification
triggers the zap with an alarm. In this example we will setup a Google sheet
row insert so that anytime the Zap is triggered we will insert a new row
into our Google sheet.
Setup Zap Action
Setup a Google Sheet action
The sheet must already exist for it to be selected.
Next we will map the columns/headers within the sheet to the test data we sent to Zapier. Since this is a test we have already added headers “ALARM ID”, “ALARM TIME“, and “END TIME” to our sheet. Once the mappings are complete select continue.
Video of setup
Summary
In this article we learned how to setup a Zap within Zapier that will trigger when an alarm enters a VF lens. However, using these steps many other Zap actions can be setup not just Google sheets (e.g. Smartsheet integration and many more). Additionally there are alternatives to Zapier that may be used instead.