Skip to content

Quickstart

cbseven edited this page Mar 20, 2020 · 4 revisions

Create a Mailchimp Account (if necessary)

If you don't yet have a Mailchimp account, you'll need to create one. Navigate to https://mailchimp.com/ and sign up for a free account. Once you've created an account, (a multi-step process involving a round trip email and a step by step wizard to configure your account), you'll have a single "Audience" with one contact in it (you!). The free tier is limited to one audience and 2,000 contacts.

Generate an API Key

At mailchimp.com, navigate to your 'Account' settings page and select 'Extras/API keys'. In the 'Your API keys' section, select 'Create an API Key'. Copy this new API Key, it'll look something like this:

6dw48220578n31cb5bd02966445e6c2c-us16

(don't use this key, it won't work!)

Configure MailchimpModule.fmp12

Download the latest version of MailchimpModule.fmp12 from this repository and open it with FileMaker Pro (v18+).

Edit the script 'API key ==> text' in the 'mailchimp configuration' folder and add your API Key from above in the first Set Variable script step so that it looks like this:

API_key

Edit the script 'API root URL ==> text', changing the URL prefix to match the URL for your Mailchimp account. This prefix is part of your API key (it's after the hyphen at the end of the key) but you can also see it in the address bar in your browser when logged into your Mailchimp account.

API_root_URL

Save these script edits.

Test the Connection to the API

Run the script 'test: ping the API' in the 'mailchimp PUBLIC/testing' folder. If everything is peachy, you'll get a Success dialog: ping the API Success

If you get an error dialog, check the value of $$console with the Data Viewer to get some hints on what went wrong. Make some corrections and try again.

Integrate into your Solution

Copy the entire 'mailchimp' folder into your own solution and use the scripts in the 'mailchimp PUBLIC' folder to interact with your Mailchimp account. Each script is documented within the script. Some scripts require a properly formatted parameter (most use JSON). Most scripts return JSON of the form:

{ "error" : 0, "error_text" : "success", "result" : "{**JSON**}" }

where JSON is the stuff you're interested in. You'll need to parse the JSON yourself (Anders Monson has a great article on using the built-in FileMaker functions to do just that).

Send Feedback, Bug Reports, and Feature Ideas

If you've got a bug report or feature idea, please submit it on the Issues Tab.