Mailchimp Marketing v2

Provides integration with Mailchimp Marketing to manage audiences, members, campaigns, templates, reports, and search operations through the Marketing API.

Revision History

0.0.0.3 - Initial release.
0.0.0.6 - Updates Runtime compatibility and template parameter metadata.
0.0.0.10 - Runs on Cloud Runtimes only. Renamed Connection labels, added TimeoutSeconds, per-item route values, CSV lists and JSON text fields, and requires Items for Create and Update.

Connection

Use this Connection to store the OAuth or API-key credentials and Mailchimp data-center prefix used by all Node methods.

Property Type Description
AuthenticationType Enum Authentication method. Select OAuth or ApiKey. Defaults to OAuth.
ApiKey Masked Mailchimp API key, including its data-center suffix, used when AuthenticationType is ApiKey.
ClientId String Mailchimp OAuth client identifier used when AuthenticationType is OAuth.
ClientSecret Masked Mailchimp OAuth client secret used when AuthenticationType is OAuth.
AccessToken Masked Non-expiring Mailchimp OAuth access token. Reconnect the Connection if Mailchimp revokes it.
ServerPrefix String Mailchimp data-center prefix, for example, us8. The Node derives it from the API-key suffix or OAuth metadata.
TimeoutSeconds Integer Seconds to wait for each Mailchimp request. It must be greater than zero. The default is 125.

Setup Notes

Create the credentials for your preferred authentication method before configuring the Connection.

OAuth

  1. In Mailchimp, open the Registered Apps page and click Register An App.
  2. Complete the form, enter https://app.flowgear.net/r/auth as the redirect URI, and click Create.
  3. Copy the generated client ID and client secret. Mailchimp displays the client secret only when it is generated, so store it securely.
  4. In Flowgear, select OAuth in AuthenticationType, enter the values in ClientId and ClientSecret, and complete the authorization flow. The Node stores the returned AccessToken and discovers the account's ServerPrefix.

API key

  1. In Mailchimp, click your profile icon and select Profile.
  2. Open Extras and select API keys. Under Your API Keys, click Create A Key.
  3. Name the key, click Generate Key, and copy it immediately. Mailchimp does not display the full key again after you finish creating it.
  4. In Flowgear, select ApiKey in AuthenticationType and enter the key in ApiKey. The key includes a data-center suffix, for example, -us8, which the Node uses to derive ServerPrefix.

After configuring either authentication method, test the Connection. The test calls Mailchimp's read-only ping endpoint.

This Node runs on Cloud Runtimes.

Methods

The Node groups its curated Mailchimp Marketing operations into query, create, update, and delete Methods.

Query

Queries Mailchimp Marketing resources and pages collection responses automatically.

Parameter Type Description
Connection Connection Mailchimp Marketing Connection profile.
OperationId String Query operation selected from the template list.
Options Object Route, filter, and projection values for the selected operation.
Return Type Description
Response Array Provider-shaped business rows. Collection wrappers and paging metadata are removed, and an empty collection returns no rows.

Create

Creates Mailchimp Marketing resources one input item at a time.

Parameter Type Description
Connection Connection Mailchimp Marketing Connection profile.
OperationId String Create operation selected from the template list.
Options Object Route and query values for the selected operation. An item's own route values override these.
Items Array JSON request objects sent one item at a time. Each item can also carry its own route values, for example list_id. Required.
Return Type Description
Response Array One result row per input item. Each row contains the provider payload and nested Flowgear result metadata.

Update

Updates Mailchimp Marketing resources one input item at a time, including member tag changes.

Parameter Type Description
Connection Connection Mailchimp Marketing Connection profile.
OperationId String Update operation selected from the template list.
Options Object Route and query values for the selected operation. An item's own route values override these.
Items Array JSON request objects sent one item at a time. Each item can also carry its own route values, for example list_id and subscriber_hash. Required.
Return Type Description
Response Array One result row per input item. Each row contains the provider payload and nested Flowgear result metadata.

Delete

Deletes or archives the resource identified by the selected operation and route values. With Items, it deletes the record each item names, so one Step can delete several records.

Parameter Type Description
Connection Connection Mailchimp Marketing Connection profile.
OperationId String Delete operation selected from the template list.
Options Object Route values that identify the resource, or the values used for items that do not supply their own.
Items Array Optional. Route values only, one record per item.
Return Type Description
Response Array One normalized result row per delete, containing nested Flowgear result metadata.

Usage Notes

  • Select a template before configuring Options or Items. The selected template supplies the request and response structure for its operation.
  • Templates leave Options values and the route values in Items empty, so you must enter any filters, search terms and record IDs yourself.
  • The Node manages the count and offset values used to page query operations.
  • Create and Update require Items. If Items is not connected, the Step fails with Items was not provided.
  • Each Create, Update and Delete item can carry its own route values, such as list_id or subscriber_hash; Options values apply to items that do not. You can map the id returned by Create straight into a later Update or Delete.
  • Item fields that are null are not sent, and a Workflow mapping sends null for template fields the source row does not have, so a null cannot clear a field. Map an explicit value instead.
  • String lists, such as member tags and the fields and exclude_fields query options, use comma-separated values (CSV) in Items, Options and Response, for example a,b. Enclose values containing commas, quotes or line breaks in double quotes, and double any quotes inside a value. Empty text represents an empty list.
  • Member merge_fields and interests, template sections and segment options.conditions use JSON text in Items and Response, for example {"FNAME":"Jane","LNAME":"Doe"}. Parse the JSON text before mapping its fields. Send segment options.conditions as a flat list for both Add segment and Update segment.
  • Query errors, and authentication, throttling and server errors, fail the Step.
  • When Mailchimp rejects a Create, Update or Delete item as invalid, not found or conflicting (400, 404, 409 or 422), or the item has an invalid route value, CSV list or JSON text, that item returns Flowgear.IsSuccess set to false with the message in Flowgear.Message, and later items still run. A rate limit (429), an authentication or server error, a timeout or a connection failure fails the Step instead, and earlier items are already saved.
  • Create, Update and Delete requests are not retried. If the Step fails, check which items Mailchimp processed before running it again.
  • Workflows built on version 0.0.0.6 must disconnect Items from a Delete Step that should delete only the record in Options, and read Response list fields, such as tags, as CSV text.
  • An invalid API key or access token usually returns 403, so check the key or reconnect the Connection.
  • The curated surface excludes whole-list deletion, permanent member deletion, campaign send and schedule actions, batch and bulk endpoints, automations, ecommerce, and account administration and security endpoints.

See also