Capture API: Zapier Automation

Zapier is a service which connects hundreds of popular web apps, including Google Sheets, MailChimp, and Salesforce among others.

A webhook is a URL published from within your Zapier account that allows Kiosk Pro to communicate with Zapier.  Once the webhook is published, it is referenced inside our JavaScript API call to Zapier along with a set of key:value pairs defining the data you’d like to pass.  Inside Zapier, calls to the webhook act as a trigger, which can be used to start an action in another app. 

If the device is offline and unable to contact Zapier's servers, Kiosk Pro will store calls locally and send them when the device is reconnected to the Internet.

Functions

Related Settings

Requirements

  • Access JavaScript API
    • By Import - recommended, works both online & offline, requires inclusion of kiosk_functions.js prior to any of the following calls.
    • By Injection - only works offline, may not be available 'onload' event.
  • Zapier account - sign up for free at Zapier.com

Sample Code

This sample code relies on the JavaScript APIs built into Kiosk Pro and will not run successfully in other browsers or within our in-app help interface.  
To run sample code, set the app's homepage to http://www.kioskproapp.com/zapier

kp_Zapier_sendNotificationToZap

This function sends a trigger to a Zapier Webhook URL, passing data specified in the call.

Format
kp_Zapier_sendNotificationToZap(URL, data, callback);
		
Parameters
  • URL = [required] URL of Zapier webhook, created within your Zapier account.
  • data = [required] array of key:value pairs in the format {"key1":"value1","key2":"value2"..."keyN":"valueN"}
  • callback = [optional] name of callback function which will be called with the following signature: callback(success).
Callback format
callback(success);
		
Callback return values success = if defined, the function was formatted correctly and sent to Zapier.  Since Zapier is a high-volume server endpoint, they always return a success message when collecting webhooks, regardless of if there is a zap behind the webhook or if it is paused or not.

Still stuck? How can we help? How can we help?