Connectors / Service / Mailchimp

Email marketing tool (updated: 1602081589531)

Mailchimp

Mailchimp is an all-in-one marketing platform that helps you manage and talk to your clients, customers, and other interested parties.

Overview

Mailchimp is a software which gives you the ability to create and manage mailing lists, newsletters, automated campaigns and more. It puts you in the driver’s seat and lets you have full control over your email marketing efforts from beginning to end.

Authentication

When using the Mailchimp connector, a new authentication has to be created in the step editor. Drag a Mailchimp connector in the workflow and click on the 'New Authentication' button.

add-auth

When the new window opens, click the 'Add authentication' button.

mailchimp-add-auth

Connect Tray.io to your Mailchimp account by adding the username and the password from Mailchimp account in the popup window and click 'Log in'.

mailchimp-connect

Click the 'Save' button to create the authentication.

Mailchimp trigger

If you wish your workflow to be kicked off by a particular action in Mailchimp, you can use the Mailchimp Trigger.

The Mailchimp trigger allows you to receive notifications and trigger workflows when given events occur associated with the selected trigger operation.

Instead of using a connector, choose Mailchimp as your trigger at the 'Create new workflow' section and wait to be redirected to your new workflow.

Operations available:

  • Webhook

Webhook setup

As the trigger needs a Webhook setup in order to activate, the first step will be to head to the gear icon in the top left side and get to your workflow settings page:

mailchimp-public-url

Here you will need to copy the URL and save it for use later. Sign into your Mailchimp account and navigate to 'Audience' at the top of the navigation plane. On said audience page,you will see a button called 'Manage Audience'. Once you click on this button you will be given a list od dropdown options from which you need to select 'Settings':

mailchimp-audience-settings

Once on the settings page you will see a list of options and at the very bottom will be 'Webhooks'. Click through once more.

mailchimp-settings-webhook

Here you will see either a list of previously configured webhooks or none at all depending on your usage. Click the 'Create New Webhook' button.

mailchimp-create-webhook

This is where you will need your public URL that you saved earlier in your Tray.io settings page. Paste it here in the input field marked 'Callback URL' and set your permissions as appropriate for your project.

mailchimp-create-new

Back in the Tray.io dashboard, your trigger will require you to select an appropriate 'List ID' (or Audience) for it to respond to. Select one making sure to choose from the dropdown list available.

You will also see the trigger has a list of possible 'Events' and 'Sources' you can configure as per your permissions preferences:

Set these appropriate for your project.

mailchimp-trigger-sources

Now that you have completed the Webhook settings, you should have a complete working Mailchimp trigger that will activate when called.

Available Operations

The examples below show one or two of the available connector operations in use.

Please see the Full Operations Reference at the end of this page for details on all available operations for this connector.

Example usage

In order to demonstrate what is possible with Tray.io automation and Mailchimp, this example will send an email notification each time a new subscriber joins:

  1. Create a form input for new subscribers to fill in.

  2. Select the Mailchimp connector to add said new subscriber to your mock newsletter list.

  3. Create and send an email notification each time a new subscriber joins.

The completed workflow will look like this:

mailchimp-completed

1 - Setup trigger

Choose the 'Form trigger' from the trigger options available in your Tray.io dashboard, when creating a new workflow.

This trigger only has one operation available ('Form request') but its always best to check it is set correctly.

Your inputs should be project specific, which means that in our case we will be referencing a situation where a new subscriber wants to join our mailing list.

You will need the following inputs filled in for our demo:

  • 'Form title': Our Newsletter,

  • 'Description': Fill out your details to subscribe to our newsletter!

  • 'Name': firstName

  • 'Label': First Name

  • 'Name': lastName

  • 'Label': Last Name

  • 'Name': email

  • 'Label': Email

In order to have the option for these input labels, you will need to make sure you click on the 'Add Field' option - this is a greyed out button below the 'Description'. See the gif below for more details on setting up the input fields in the form trigger.

mailchimp-add-fields

Last but not least make sure you ENABLE your workflow by pressing the green button in the bottom right hand corner.

2 - Add member to your list

Add the Mailchimp connector to the next step of your workflow. Make sure you hve your authentication is set up and selected before continuing with the rest of the example.

If this is not the case then please follow the example outlined above in the "Authentication" section above.

Select 'Create List Member' for your operation.

Your 'List ID' will automatically create a dropdown list of options for you, from the lists available in your mailchimp account. Select the appropriate list - in our case we have a list named 'Subscribers'.

Note that in Mailchimp, your lists are known as 'Audience's. Make SURE that under your settings tab in your Mailchimp audience dashboard you have nothing ticked under 'Required?' apart from 'email' otherwise your workflow will fail on the this step.

mailchimp-audience-dashboard

The email can be generated from your trigger output. Click on the 'Debug' button above your workflow to see your output. When you run your workflow (or trigger it so to speak), you will get more tha just first and last name - there is also 'email'.

mailchimp-output

Use the following JSON path to target said result, while making sure your type elector is set to 'jsonpath': $.steps.trigger.result.email.

Under the 'Merge fields' option, click on the 'Add Field' button again, twice, so that you have two new Key - Value pairs to fill in.

The 'Key' will be an auto-generated dropdown list (which in our case includes "first name" etc as options), while the value fields should have the following JSON paths.

Again, this can be confirmed through opening your debug panel and looking at your output. See above image for reference. Once more double check that your type elector is set to 'jsonpath' for the value inputs:

  • 'Key': First Name

  • 'Value': $.steps.trigger.result.firstName

  • 'Key': Last Name

  • 'Value': $.steps.trigger.result.lastName

Notice that the final section in the value JSON path, correlates to the 'Name' field you created earlier, when you were setting up your trigger.

mailchimp-key-value

Check that your 'Status' input (under the 'Add Field' button) is automatically displaying 'Subscribed'.

3 - Send email update

Finally add a 'Send email' connector as your last step.

Set the operation to 'Send email' and put your recipient as appropriate. The same goes for the 'Name' and 'Subject' fields.

You can see from our example image that we have used Tray.io's Interpolation method to include the results from our workflow in our final email output and we highly recommend using this method for production as it avoids hard coding and means that in the long run there is less maintenance to deal with.

mailchimp-send-email

Go to the gear icon in the top left corner and get your 'Public URl'.

mailchimp-url

Paste this into a separate tab and fill it in with some demo data:

mailchimp-signup

As a result you should not only get green output in your debugger panel, but also an email notification telling you that you have a new subscriber!

mailchimp-mail

All Operations

Latest version:

8.0

Archive list member

Archive a list member.

Create customer

Add a new customer to a store.

Create ecommerce store

Add a new store.

Create member in list

Add a new member to the list.

Create order

Add a new order to a store.

Create segment member

Add a member to a static segment.

Delete customer

Delete a customer from a store.

Delete ecommerce store

Delete a store.

Delete list member

Delete all personally identifiable information related to a list member, and remove them from a list. This will make it impossible to re-import the list member.

Delete order

Delete an order from a store.

Get ecommerce store

Get information about a specific store.

List account orders

Get information about an account's orders.

List campaign email activity

Get a list of email activities that have happened for a given campaign.

List campaign folders

Get all folders used to organize campaigns.

List campaign folders DDL

List campaign recipients

Get a list of all the people who received a particular campaign.

List campaign sub reports

Get a list of sub reports for a parent campaign.

List campaign subscriber activity

Get a list of email activities that have happened for a given campaign and a particular subscriber.

List campaigns

Get a list of campaigns.

List campaigns DDL

List currency code DDL

List customers

Get information about a store's customers.

List ecommerce store IDs DDL

List ecommerce stores

Get information about all stores.

List interest categories

Get information about a list’s interest categories.

List interest categories DDL

List interests

Get information about an interest category's interests.

List interests DDL

List language codes DDL

List list merge fields

Retrieve all merge fields for a specific list.

List list merge fields DDL

List list segments

Get a list of all segments in a list.

List list segments DDL

List lists

Get a list of lists.

List lists DDL

List member activity

Retrieve details about a subscriber's recent activity.

List recent member notes

Retrieve recent notes for a specific list member.

Raw HTTP request (advanced)

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.

Search members

Search for members across your Mailchimp lists.

Update ecommerce store

Update a store.

Update order

Update a specific order.

Upsert list member

Add or update a list member.