This assumes you’ve read the Webhooks Introduction.
Setting Up Webhooks
Choosing an Endpoint
Since webhooks are HTTP-based callbacks, our Fulcrum servers make HTTP POST requests to web servers whose URLs you give us. This means you need an endpoint that can receive these POST requests.
Writing an Endpoint
It’s likely you will want to write your own endpoint to implement functionality custom to your organization. If this is the case, see the Webhooks Developer Documentation for more details.
Using an Existing Endpoint
In the process of adding the webhooks functionality to Fulcrum, we built several applications that are webhook endpoints. We’ve taken some of these and created comprehensive walk-throughs to give a complete example of how to get webhooks working.
We’ve made other applications available to you as well. Their links are below. You can use the applications as a foundation to build on or simply illustration on how you might create your own.
To get started, pick one of these applications and follow the steps in the project’s README to get it running. Once you’ve done that, remember the URL where the application is running. You will use it in steps down below.
- Polis.js - A simple webhook endpoint that listens for POST requests and writes the contents to STDOUT. Used in a walk-through above.
- Folis.js - A simple webhook endpoint that listens for POST requests and writes the contents to a file.
- Fulcrum Webhook Sample - Rails 4 - A simple Rails 4 application that accepts POST requests and inserts them into a database. A foundation for more sophisticated applications. Used in a walk-through above.
- Fulcrum Fusion - A more involved Sinatra application which listens for POST requests and pushes the data to Google’s Fusion Tables using their API.
Creating the Webhook
Once you have an endpoint running, you can create a webhook within Fulcrum with the following steps:
- Click the cog in the upper right of the page.
- Click Settings.
- If you were in another organization, on the left menu, click the name of the organization you’re interested in.
- Click API Webhooks in the list of links for that org’s settings.
- Click Add Webhook.
- Enter the webhook’s name.
- Enter the webhook’s URL.
Once a webhook has been created and is active, it will begin to receive HTTP POST requests at its URL as events occur within the organization.
Webhooks are active by default. This means that new events will automatically be sent to the webhook’s URL via an HTTP POST request. If you wish to leave the webhook in the organization but prevent any events from being sent to that URL, set it to be inactive. To do this, when editing a webhook, simply uncheck the
Active?checkbox and save the webhook.
NOTE: Plans are limited to having 10 total webhooks.
Please see the Webhooks Developer Documentation for more details on how to receive, use, and respond to these POST requests.