Checkbox webhooks can be added to any page of your survey, allowing you to post real-time response data to an API of your choice. One of the most common tools to integrate with webhooks is Zapier, but you can also create your own API to submit the webhook to.
As an example, this guide will show how to submit your survey response to Zapier, parse the relevant data, and then send a Slack message notifying your team of the survey response. These basic steps can be modified to automate other tasks or actions using Zapier, or to use with your own APIs.
This should result in the screen below. You will want to copy and save the webhook URL for later.
For security reasons, the webhook item is disabled by default in Checkbox. System administrators can enable the item by going to the Application Settings -> Survey -> Advanced Settings -> Enable webhook item. This step only needs to be performed once, prior to creating your first webhook.
Although you can add a webhook item to any page of your survey, it is most commonly added to the Completion Page. Adding the webhook to the Completion Page will result in Checkbox sending the entire response to the API (in this case Zapier) when the respondent submits their response.
Create a test survey response in Checkbox to test your webhook. This should submit the data to Zapier, which will populate fields on your zap. Testing at this stage will make the following steps easier to complete and test.
Click Continue and paste the following code, which allows you to access specific pages of your response, into the Code box:
You can now access specific pages of your response in the following way:
*Note that you will want to look at the response returned by your webhook to find the specific page ID for the data of your survey. You will then replace "1778" with that page ID.
You can then get answer data to specific questions like this:
Matrix items are a little more complicated. Matrix item answer data can be obtained like this:
*Important Note: Make sure to change all of the IDs above to match your specific survey.
Once the above steps are completed, click Next to test your action. You should see the data from your test response being populated and ready to send to the next step.
To send this data to Slack (as in this example), add a new step “Send Channel Message in Slack.” Follow the prompts to connect to Slack and choose the channel you'd like to post the response data to.