Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Status
colourGreen
titleready

Using Mailchimp with Processmaker I/O

Table of Contents

Video Walk through of this Tutorial


If you would like to see this User Subscription Use Case via MailChimp service in action, click this video below.



Widget Connector
urlhttps://

...

www.youtube.

...

com/watch?v=wa5-pcuRGt4&feature=youtu.be

General Description


This example shows the user how to use ProcessMaker I/O in combination with MailChimp and Slack. Both software programs provide the tools that allow the user to build effective processes while satisfying a variety of business needs. 

...

  1. A user sends an subscribe or unsubscribe request with their email and name 
  2. If the request is subscribe, the process runs MailChimp, subscribes the new user, sends a notification to the Slack channel that the new user subscribed to, and sends a confirmation email to the user
  3. If the request is unsubscribe, the process is the same as subscribe, but with unsubscribe action parameters
  4. If the subscription or unsubscribe fails, a message is sent to the Slack channel

Process Scheme

Process Items

The tasks in the process are listed in the table below:

...

  1. Launch an instance of ProcessMaker I/O on the Instance page.
  2. Copy/remember the instance URL link; this will be required later.
  3. Click on the Form examples link.
  4. Switch to the Mailchimp tab on the top.
  5. Download BPMN file to your computer.
  6. Click on Import tab at the top left and upload the BPMN file from your PC. 

...

  • Install the app to your team
  • Get the Slack app Oauth access token
    • When your Slack app is created and installed to your team, get a Slack bot token via the Oauth & Permissions tab, accessed under Features in the left menu.
    • In the Oauth Tokens & Redirect URLs section, click on Copy in the Bot User OAuth Access Token field to copy the Slack bot token to your clipboard (token starts with 'xoxb' string).
    • This token should be passed to the process start event, as shown later

...

  • To set up the MailChimp connector, you'll need the MailChimp API key. Getting the key is explained in the following guide: http://kb.mailchimp.com/integrations/api-integrations/about-api-keys.
  • To subscribe users to the list, you need the list ID. Log into your MailChimp account and navigate to your lists. Click on the required list and go to its Settings → List name and Defaults page. There you will find List ID (e.g. 47294ece32).

Running the Process

  • To run the process, first import the BPMN file containing the corresponding process to your PMIO instance (this is explained in the Readme section for the specific example case).
  • To initiate the (un)subscription, you can trigger the start event via any means. This might be the TriggerEvent PMIO API call, or the WebHook call for Start Events. Please refer to the API documentation section and API SDK for your desired programming language. Here are the WebHook variables to pass:
  • 'action' => {subscribe} or {unsubscribe} string,
    'list_id' => {your_list_id},
    'customer_email' => {email},
    'email_md5' => md5({email}),
    'customer_fname' => {John},
    'customer_lname' => {Doe},
    'slack_token' => {slackToken},
    'slack_channel' => {slackChannel_name},
    'mailchimp_api_key' => {mailChimpKey}

Substitute in the necessary values, which are marked by brackets.

...