I was preparing a FileMaker 16 demo the other day, and one of the key features that I wanted to highlight is the platform’s ability to easily integrate with other applications through REST APIs. Full disclosure: I was, at one point, a FileMaker developer, but, at this point in my career, I’ve logged more time in management and business development than I have actually coding. Nonetheless, I had two hours before my next meeting started, so, despite knowing that my skills were beyond rusty, I figured I’d give it a try.

Integrations between CRM systems and outbound marketing platforms is something that is near and dear to my heart. Having disparate lists in each tool is a shockingly common occurrence. People tend to muck about with exporting lists from a CRM tool and importing them into their outbound marketing tool whenever they get around to it. This process tends to start out great, but, as with any manual process, it falls victim to entropy from depending on one person who inevitably will have conflicting priorities. As such, I wanted to show how easy it is to get the ball rolling with integrating a popular platform for outbound marketing with FileMaker 16. In this example, I put together a super simple form of integration in which we push new contacts to a specified list in MailChimp.

Gathering data for the integration

MailChimp has great API documentation, and if you’re specifically interested in MailChimp, I’d suggest perusing their Getting Started Guide. Within that guide, there are a couple of key bits of information you need to look for, and that includes:

  • how to generate an API key
  • how to get the list ID for the list to update
  • what the REST API call should look like to add a subscriber

On the FileMaker side, the magic comes from a new functionality that was added in FileMaker 16. The Insert From URL script step was updated to make integration with REST APIs easier by supporting cURL options; cURL is a widely used tool for transferring data using a variety of protocols.

Using the Insert from URL script step, we can specify that we want to post data to a specific location, authenticate with that location, and pass along the the data as a JSON string. (FileMaker 16 also added some calculation functions for working with JSON data.) A simple integration can be accomplished with a single script step.

Steps for the MailChimp and FileMaker integration

The example file that I created began with the FileMaker Contacts Starter solution, and I created two scripts with nine total script steps (excluding comments). Most of the script steps are self explanatory, in that we’re setting the values required to create a successful REST API call for MailChimp. The $$Subscriber Variable uses the new FileMaker 16 JSONSetElement calculation to format the data that we want to send to MailChimp.

The URL that we are submitting to is defined by MailChimp’s documentation:

  • https://YourMC-Server.api.mailchimp.com/3.0/lists/YourListID/members/

In order to connect to the REST API successfully, we need to click the Specify cURL Options button in the options for the Insert From URL script step. We use the following simple calculation which specifies some cURL options as the variables we set:

  • “–user “&$$API_Auth &
  • “–request POST”&
  • “-d “&$$Subscriber

All that remains is to add a button to call the script to the Contacts layout.

Final thoughts on the integration

While this integration isn’t up to the level of polish that MainSpring delivers to its customers, it’s a workable concept that was was put together in less than two hours by someone who hasn’t developed a FileMaker solutions in at least 7 years—a.k.a. me.

If you’re wondering whether FileMaker can integrate with the other tools that you’re using, the answer is almost always yes. Integrations are now easier to develop than ever before, and rapidly produce return on investment (ROI) by eliminating duplicated effort, removing manual processes, and eliminating error.

Download your sample file »

5 comments

  1. What are the costs involved in integrating MailChimp into my FileMaker? also interested in stripe payment systems as well.

    Posted by terry casey on January 9, 2019. Reply

  2. Although I am a relatively experienced FM developer, I am less than a newbie when it comes to integrations, REST etc. So I found this post and your example file extremely helpful. However, I am puzzled that in the Add Subscriber script that as the Target you use a global variable $$JSON_Response that does not seem to be defined anywhere. Also there is a field JSON_Response that does not seem to be used anywhere. Can you help with my confusion? Many thanks.

    Posted by Stuart Lynn on February 6, 2019. Reply

  3. Please ignore previous comment/question. $$JSON_Response is just what gets returned from the API.

    Your approach now works for me. Thanks again.

    Stuart

    Posted by Stuart Lynn on February 6, 2019. Reply

  4. I just want to say THANK YOU for providing this information and for going the extra mile in providing a sample file.
    I am in the process of learning REST and JSON and you have just added to my skillset enormously – this is really appreciated! :)

    Posted by Thomas Heppleston-Tait on July 2, 2019. Reply

    • Kyler Mitchell

      We are so glad you found this blog so helpful! Be sure to subscribe to our FileMaker Community blog for weekly updates sent right to your inbox! :)

      Posted by Kyler Mitchell on July 5, 2019. Reply

Leave a comment

Your email address will not be published. Required fields are marked *