MailChimp

The MailChimp connector lets you perform insert, delete, update, and read operations on MailChimp dataset.

Before you begin

Before using the MailChimp connector, do the following tasks:

MailChimp configuration

Set up a MailChimp account

For more information about setting up the MailChimp account, see Account Login.

Set up authentication

API Keys - authentication type

For more information about generating a MailChimp API Key, see Generate API Key.

  1. Navigate to the API Keys section of your MailChimp account.
  2. Click Create New Key and enter a descriptive name.
  3. Copy the generated key and store it in a secure location.You cannot view or copy the key later.

OAuth 2.0 - authentication type

For more information about generating OAuth Credentials for MailChimp account, see GenerateOAuth Credentials.

  1. Navigate to the Registered Apps page in your MailChimp account.
  2. Click Register An App.
  3. Complete the Register an App form.
  4. Click Create.
  5. Copy the client ID and client secret that appears.

Configure the connector

A connection is specific to a data source. It means that if you have many data sources, you must create a separate connection for each data source. To create a connection, do the following:

  • In the Cloud console, go to the Integration Connectors > Connections page and then select or create a Google Cloud project.

    Go to the Connections page

  • Click + CREATE NEW to open the Create Connection page.
  • In the Location section, choose the location for the connection.
    1. Region: Select a location from the drop-down list.

      For the list of all the supported regions, see Locations.

    2. Click NEXT.
  • In the Connection Details section, complete the following:
  • Connector: Select MailChimp from the drop down list of available Connectors.
  • Connector version: Select the Connector version from the drop down list of available versions.
  • In the Connection Name field, enter a name for the Connection instance.

    Connection names must meet the following criteria:

  • Optionally, enter a Description for the connection instance.
  • Optionally, enable Cloud logging, and then select a log level. By default, the log level is set to Error.
  • Service Account: Select a service account that has the required roles.
  • Optionally, configure the Connection node settings:

    A node is a unit (or replica) of a connection that processes transactions. More nodes are required to process more transactions for a connection and conversely, fewer nodes are required to process fewer transactions. To understand how the nodes affect your connector pricing, see Pricing for connection nodes. If you don't enter any values, by default the minimum nodes are set to 2 (for better availability) and the maximum nodes are set to 50.

  • Datacenter: The datacenter used for your MailChimp account.
  • (Optional) In the Advanced settings section, select the Use proxy checkbox to configure a proxy server for the connection and configure the following values:
  • Optionally, click + ADD LABEL to add a label to the Connection in the form of a key/value pair.
  • Click NEXT.
  • In the Authentication section, enter the authentication details.
    1. The MailChimp connection doesn't require any authentication.
    2. Click NEXT.
  • Review: Review your connection and authentication details.
  • Click Create.
  • Connection configuration samples

    This section lists the sample values for the various fields that you configure when creating the MailChimp connection.

    API Keys - connection type

    Field name Details Location us-central1 Connector MailChimp Connector version 1 Connection Name google-cloud-mailchimp-api-conn Service Account SERVICE_ACCOUNT_NAME@serviceaccount Minimum number of nodes 2 Maximum number of nodes 50 Authentication:Not Available True API Key API_KEY Secret version 1

    OAuth 2 - connection type

    Field name Details Location us-central1 Connector MailChimp Connector version 1 Connection Name google-cloud-mailchimp-oauth-conn Service Account SERVICE_ACCOUNT_NAME@serviceaccount Minimum number of nodes 2 Maximum number of nodes 50 Authentication:OAuth 2.0 - Authorization code True Client ID CLIENT_ID Client Secret CLIENT_SECRET Secret version 1

    Entities, operations, and actions

    All the Integration Connectors provide a layer of abstraction for the objects of the connected application. You can access an application's objects only through this abstraction. The abstraction is exposed to you as entities, operations, and actions.

    System limitations

    The MailChimp connector can process 6 transactions per second, per node, and throttles any transactions beyond this limit. By default, Integration Connectors allocates 2 nodes (for better availability) for a connection.

    For information on the limits applicable to Integration Connectors, see Limits.

    Actions

    This section lists the actions supported by the connector. To understand how to configure the actions, see Action examples.

    CampaignTest action

    Send a test email for a MailChimp campaign.

    Input parameters of the CampaignTest action

    Parameter Name Data Type Required Description
    CampaignID string True The ID of the campaign to test.
    TestEmails string True A comma-separated list of emails to send.
    SendType string True The type of test email to send. Either html or plaintext The allowed values are html, plaintext. The default value is html.

    For example on how to configure the CampaignTest action, see Action examples.

    CampaignSend action

    Send a MailChimp campaign.

    Input parameters of the CampaignSend action

    Parameter Name Data Type Required Description
    CampaignID string True The ID of the campaign to send.

    For example on how to configure the CampaignSend action, see Action examples.

    CampaignPause action

    Pauses a MailChimp RSS campaign.

    Input parameters of the CampaignPause action

    Parameter Name Data Type Required Description
    CampaignID string True The ID of the campaign to pause.

    For example on how to configure the CampaignPause action, see Action examples.

    CampaignResume action

    Resumes a MailChimp RSS campaign.

    Input parameters of the CampaignResume action

    Parameter Name Data Type Required Description
    CampaignID string True The ID of the campaign to resume.

    For example on how to configure the CampaignResume action, see Action examples.

    Action examples

    Example - CampaignTest

    1. In the Configure connector task dialog, click Actions.
    2. Select the CampaignTest action, and then click Done.
    3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {
      "CampaignID": "4bd7a9abac",
      "TestEmails": "sample@gmail.com",
      "SendType": "plaintext"
      }
    4. If the action is successful, the CampaignTest task's connectorOutputPayload response parameter will have a value similar to the following:

      {
      "Success": "true"
      }

    Example - CampaignSend

    1. In the Configure connector task dialog, click Actions.
    2. Select the CampaignSend action, and then click Done.
    3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {
      "CampaignID": "1699382f6d"
      } 
    4. If the action is successful, the CampaignSend task's connectorOutputPayload response parameter will have a value similar to the following:

      {
      "Success": "true"
      }

    Example - CampaignPause

    1. In the Configure connector task dialog, click Actions.
    2. Select the CampaignPause action, and then click Done.
    3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {
      "CampaignID": "4bd7a9abac"
      }
    4. If the action is successful, the CampaignPause task's connectorOutputPayload response parameter will have a value similar to the following:

       {
      "Success": "true"
      }

    Example - CampaignResume

    1. In the Configure connector task dialog, click Actions.
    2. Select the CampaignResume action, and then click Done.
    3. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {
      "CampaignID": "4bd7a9abac"
      }
    4. This example will show the specific Object records. If the action is successful, the CampaignResume task's connectorOutputPayload response parameter will have a value similar to the following:

      {
      "Success": "true"
      }

    Entity operation examples

    This section shows how to perform some of the entity operations in this connector.

    Example - List all campaigns

    1. In the Configure connector task dialog, click Entities.
    2. Select Campaigns from the Entity list.
    3. Select the List operation, and then click Done.
    4. Optionally, in Task Input section of the Connectors task, you can filter your result set by specifying a filter clause. Specify the filter clause value always within the single quotes (').

    Example - Get a single automation

    1. In the Configure connector task dialog, click Entities.
    2. Select Automations from the Entity list.
    3. Select the Get operation, and then click Done.
    4. In the Task Input section of the Connectors task, click EntityId and then enter 1ac204985e in the Default Value field.

      Here, 1ac204985e is a unique record ID in the Automations entity.

    Example - Delete a campaign

    1. In the Configure connector task dialog, click Entities.
    2. Select Campaigns from the Entity list.
    3. Select the Delete operation, and then click Done.
    4. In the Task Input section of the Connectors task, click entityId and then enter 06f20ace93 in the Default Value field.

    Example - Create a campaign folder

    1. In the Configure connector task dialog, click Entities.
    2. Select CampaignFolders from the Entity list.
    3. Select the Create operation, and then click Done.
    4. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {
      "Name": "CampaignFolderCreated1707812599459"
      }
      

      Running this example, returns a response similar to the following in the connector task's connectorOutputPayload output variable:

      {
      "Id": "650469bb07"
      }
      

    Example - Update a file manager folder

    1. In the Configure connector task dialog, click Entities.
    2. Select FileManagerFolders from the Entity list.
    3. Select the Update operation, and then click Done.
    4. In the Task Input section of the Connectors task, click connectorInputPayload and then enter a value similar to the following in the Default Value field:
      {   
      "Name": "MyNewFolder9"
      }
    5. Click entityId, and then enter 18159 in the Default Value field.

      Running this example, returns a response similar to the following in the connector task's connectorOutputPayload output variable:

      {   
      "Id": "18159"
      }

    Create connections using Terraform

    You can use the Terraform resource to create a new connection.

    To learn how to apply or remove a Terraform configuration, see Basic Terraform commands.

    To view a sample terraform template for connection creation, see sample template.

    When creating this connection by using Terraform, you must set the following variables in your Terraform configuration file:

    Parameter name Data type Required Description
    datacenter ENUM False The datacenter used for your MailChimp account. Supported values are: None, US1, US2, US3, US4, US5, US6, US7, US8, US9, US10, US11, US12, US13
    proxy_enabled BOOLEAN False Select this checkbox to configure a proxy server for the connection.
    proxy_auth_scheme ENUM False The authentication type to use to authenticate to the ProxyServer proxy. Supported values are: BASIC, DIGEST, NONE
    proxy_user STRING False A user name to be used to authenticate to the ProxyServer proxy.
    proxy_password SECRET False A password to be used to authenticate to the ProxyServer proxy.
    proxy_ssltype ENUM False The SSL type to use when connecting to the ProxyServer proxy. Supported values are: AUTO, ALWAYS, NEVER, TUNNEL

    Use the MailChimp connection in an integration

    After you create the connection, it becomes available in both Apigee Integration and Application Integration. You can use the connection in an integration through the Connectors task.

    Get help from the Google Cloud community

    You can post your questions and discuss this connector in the Google Cloud community at Cloud Forums.

    What's next