FileMaker Webhooks

During our Meetups, multiple developers have mentioned the inability to use webhooks directly with FileMaker’s Data API.

What is a webhook?

A webhook (also called a web callback or HTTP push API) is a way for an app to provide other applications with real-time information. A webhook delivers data to other applications as it happens, meaning you get data immediately. Unlike typical APIs where you would need to poll for data very frequently in order to get it real-time. This makes webhooks much more efficient for both provider and consumer.

https://sendgrid.com/blog/whats-webhook/

How can I use webhooks with FileMaker?

When you need real-time updates to your FileMaker database (such as ecommerce orders, new payments, new text messages) and you’re integrating with external APIs, you can either use a scheduled script that runs every X minutes to check the external API for changes (this is known as polling), or you can use a webhook (carrying a payload of data) into your FileMaker database.

Here’s an example for integrating Shopify and FileMaker using webhooks:

  1. A new order was created on Shopify
  2. Shopify makes a POST request to the FileMaker webhooks listener solution. The body of this request carries a payload with order details.
  3. The FileMaker webhooks listener sends the received request’s headers, body and payload to a script in the FileMaker webhooks handler database (as script parameters).
  4. The FileMaker handler script validates, records the headers and payload, and then triggers a script to process the Shopify order (ie: create order in FileMaker, update customer balance, send request to warehouse, etc.)

How does it work?

Flow diagram

The HTTP response in step 5 is a JSON response that contains the script result from the FileMaker webhooks handler script. This script result is customizable and optional. It’s important to note that webhooks can not be made without passing through a basic authentication layer first. Most services that support webhooks also support basic authentication. We can develop other authentication layers if needed. It is also important to note that all of the connections shown in the diagram above are TLS-encrypted.

Some example outputs (step 5):

HTTP 200
{
    "success": true,
    "message": "Action completed successfully"
}
HTTP 500
{
    "success": false,
    "message": "Action failed"
}
HTTP 400
{
    "success": false,
    "message": "Invalid request"
}

How do I get this?

This solution can be deployed on your web server of choice, or on serverless infrastructure (such as AWS Lambda). Please contact sales@app.works for more information.

Main benefits of using webhooks:

  • Receive real-time data into your FileMaker database when integrating with external APIs
  • Integrate with web services quickly without needing scripts that use Insert from URL script steps
  • Integrate thousands of apps with FileMaker using Zapier (or any other API integration service that supports webhooks)

You can use webhooks to integrate thousands of apps with FileMaker using Zapier.

Most of the popular web services with established APIs support webhooks, including:

Conclusion

We are very excited about the opportunities that webhooks and FileMaker provide for our customers. Being able to easily integrate the 1500+ apps at Zapier with FileMaker is a dream come true. If you’re interested in integrating webhooks with your FileMaker database(s), we’re happy to help implement this functionality in your solution. Please contact us at sales@app.works.

Please note that the minimum FileMaker server version currently supported is 18.