February 11, 2020 Appworks News Blog FileMaker FileMaker Techniques APIFilemakerFileMaker Server 18HTTPintegrationJSONTLS encryptionwebhookwebhooksZapier 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: A new order was created on ShopifyShopify makes a POST request to the FileMaker webhooks listener solution. The body of this request carries a payload with order details.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).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 us for more information. Main benefits of using webhooks: Receive real-time data into your FileMaker database when integrating with external APIsIntegrate with web services quickly without needing scripts that use Insert from URL script stepsIntegrate 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: ShopifyWooCommerceShipEngineIntuit Quickbooks cloudXeroTwilioSendgridMailgunStripeDocusignPipedriveJiraTypeformGoogle docsGithub 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. If you’re interested in integration, you may enjoy this free webinar on integrating FileMaker with QuickBooks and more. Please note that the minimum FileMaker server version currently supported is 18. By Karl Jreijiri
1 comment so far Jesse Posted on 10:01 PM - May 19, 2020 I am wanting to having something like this in an internet testing scenario I am running. What is the cost for setting it up with a relatively ‘vanilla’ testing scenario? No complex integrations needed.