Lens Notification Integrations (Zapier)

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.

LNIZ_1_Login.png

 

Within the Zap editor select the “Trigger” and choose “Webhooks”

LNIZ_2_TriggerWebhooks.png

 
Within the webhook trigger editor select “Catch Hook” option as the trigger event then select continue. Optionally you can rename the trigger to something more meaningful e.g. “Alarm Lens Notification”.
LNIZ_3_CatchHook.png

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.

 

LNIZ_4_AlarmLensNotification.png

 

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”.

LNIZ_5_Integrations.png

 

Next we will add the webhook URL provided by Zapier within our Zap setup from the previous section.

LNIZ_6_Add_URL.png
Copy the Zapier webhook URL into the URL section of the Virtual Facility webhook setup form.

LNIZ_7_CopyZapierURL.png

 

 

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.

LNIZ_10_TestWebhook.png

 

 

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.

LNIZ_9_AddZapierURLStep3.png

Once the test has completed the result (which is the response Virtual Facility received from Zapier) should be shown within the UI and the save button available. Save the webhook url if you are done testing and setting up your Zap. Optionally, an alternate alarm(s) can also be selected and additional test(s) ran to complete the Zap setup from within Zapier as well.
 

image-20241210-184200.png

You will not be able to save the URL until a successful test completes. If testing is not working make sure you copied the correct URL from Zapier into Virutal Facility and try testing again

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.

LNIZ_11_FinishSetup.png

 

Congrats partying face 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

LNIZ_12_SetupZapAction.png

For our action event within the Google sheet (what we want to happen) we will select “Create Spreadsheet Row“ and then continue.

LNIZ_13_CreateSpreadsheetRow.png

Next we need to configure the drive, the target spreadsheet, and the target worksheet within the spreadsheet. This will be the source/target of the row we insert insert.

The sheet must already exist for it to be selected.

 

LNIZ_14_TargetWorksheetInSpreadsheet.png

 

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.

 

LNIZ_15_VF_AlarmLensTester.png
 
 
LNIZ_16_InsertAlarm.png
 
Verify the information looks good and then click “Test Step”. If the test is successful we should see a new row containing test data has been inserted into our google sheet (check it out!).
 
LNIZ_17_InsertAlarm_2.png
Once the test is complete select “Publish” to enable the zap. The next time an alarm meets the lens criteria and enters the lens the zap should trigger and the action (new row inserted into the google sheet) should be performed.

 

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.

Was this article helpful?
0 out of 0 found this helpful