This article will show you how to integrate SHOEBOX Online with Zapier, in order to seamlessly pull participants into a lead management platform.
Follow the video tutorial below to learn how to set up this integration. Text resources are also available below.
In this article:
Javascript sample code (used in above video)
// this is wrapped in an `async` function
// you can use await throughout the function
const sboapi = '<YOUR-API-ENDPOINT-HERE>?limit=1';
//Keep the "?limit=1", only replace <YOUR-API-ENDPOINT-HERE> with your API Endpoint
const sboapikey = '<YOUR-API-KEY-HERE>'
var headers = {
'x-api-key': sboapikey
}
const res = await fetch(sboapi, { method: 'GET', headers: headers});
const body = await res.json();
output = { participant: body[0] };Text guide
There are three key actions Zapier uses to bring participant data into your lead management platform:
- Trigger: Webhook in Zapier.
- Action: Fetch from API from Zapier.
- Secondary Action: Forward the data in an email or send to any Zapier connected program.
Step 1: Create a ZAP in Zapier that will receive a "screening completed" notification webhook as a trigger to your actions.
- Create a "webhook" trigger in Zapier.
- Copy the "Custom Webhook URL" from Zapier, insert into SHOEBOX Portal "Webhook URL" field & Save.
Step 2: Create a “Code Action” that will fetch results from the SHOEBOX Online API in Zapier.
- Now that we have received the webhook trigger to run script, the below script can be used to pull the data from the SHOEBOX API.
- Replace the sboapikey with your key from the portal.
- Replace the sboapi URL with your endpoint URL from the portal.
Javascript sample code:
// this is wrapped in an `async` function
// you can use await throughout the function
const sboapi = '<YOUR-API-ENDPOINT-HERE>?limit=1';
//Keep the "?limit=1", only replace <YOUR-API-ENDPOINT-HERE> with your API Endpoint
const sboapikey = '<YOUR-API-KEY-HERE>'
var headers = {
'x-api-key': sboapikey
}
const res = await fetch(sboapi, { method: 'GET', headers: headers});
const body = await res.json();
output = { participant: body[0] };Step 3: Secondary Action for a Custom Server
Now that the data is in Zapier, you can use the data and forward it to an integrated service with Zapier (ZOHO, email, etc.), or manually forward the data to your server.
The example below shows how to send the fetched data to an external server.
Javascript Sample Code:
const externalServerURL = 'https://webhook.site/72f7eada-21aa-4be9-957a-2202e0ec7793'
var headers = {
'content-type': "application/json"
}
await fetch(externalServerURL,
{
method: "POST",
body: inputData.dataFromSBOAPI,
headers: headers
})
output = {dataFromSBOAPI: inputData.dataFromSBOAPI};
//Keep forwarding SBO data for use in other actions if neededStep 4 : External Server receives data from the secondary action from Step 3.