> ## Documentation Index
> Fetch the complete documentation index at: https://docs.refold.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Setup

> Connect to your Mailchimp app for OAuth

Refold offers both **Key Based** and **OAuth 2.0** integration for Mailchimp. In this guide, we will look at the OAuth App setup process.

To setup your Mailchimp app in Refold for OAuth, you will need the following credentials from your [Mailchimp account](https://login.mailchimp.com/):

* Client ID
* Client Secret

### Pre-requisites

1. Mailchimp Developer account. You can create one [here](https://login.mailchimp.com/signup/).

<Info>If you haven't already created an app in Mailchimp, you'd need to create one.</Info>

### Creating an app in Mailchimp

To create a Mailchimp app and acquire the above mentioned credentials, please follow the steps mentioned below:

1. Log in to your [Mailchimp account](https://login.mailchimp.com/).
2. Click on the `Profile` icon in the top right > select `Account and billing` > Select `Extras` > Click on `Registered Apps`.

<img height="200" src="https://mintcdn.com/cobalt-55/0IGKzTphHY-auv_h/images/Mailchimp/mailchimp_navigation.png?fit=max&auto=format&n=0IGKzTphHY-auv_h&q=85&s=ccfbf2e2d1fd0375dd7b2c3de4881ffd" alt="Navigation for App setup" data-path="images/Mailchimp/mailchimp_navigation.png" />

3. Click on `Register an App` button.
4. Go to your [`Apps catalog`](https://app.gocobalt.io/apps) in **Refold** > Search for `Mailchimp` > `Settings` > `Use your credentials` > `Callback Url` > Copy it.
5. In the App, enter `App name`, `App description` and `Company/organization` > Provide `App website` > paste the Callback Url under `Redirect URL` > Click on `Create`.
6. Copy the **Client ID** and **Client Secret** displayed on the screen after App creation.

<img height="200" src="https://mintcdn.com/cobalt-55/0IGKzTphHY-auv_h/images/Mailchimp/mailchimp_credentials.png?fit=max&auto=format&n=0IGKzTphHY-auv_h&q=85&s=8e0d51a27aa04d8f33dc68978017e7bb" alt="Getting Credentials" data-path="images/Mailchimp/mailchimp_credentials.png" />

#### Configuring credentials in Refold

App settings page lets you configure the authentication settings for an `OAuth 2.0` based application. For your customers to provide you authorization to access their data,
they would first need to install your application. This page lets you set up your application credentials.

<img height="200" src="https://mintcdn.com/cobalt-55/0IGKzTphHY-auv_h/images/Mailchimp/mailchimp_cobalt.png?fit=max&auto=format&n=0IGKzTphHY-auv_h&q=85&s=196bd77ff918b722a0f42a757dce5c93" alt="Setting up application client credentials" data-path="images/Mailchimp/mailchimp_cobalt.png" />

Provide the acquired Client ID and Client Secret under Settings of the app and save it.

#### Actions and triggers

Once the above setup is completed, you can create orchestrations of your use-cases using Mailchimp actions and triggers. Following are the set of Mailchimp actions and triggers
supported by Refold.

<Tabs>
  <Tab title="Actions">
    <AccordionGroup>
      <Accordion title="List">
        1. **Create A List** - Create a new listin Mailchimp.
        2. **Add Member To List** - Add member to list in Mailchimp.
      </Accordion>

      <Accordion title="Members">
        3. **Update A Member** - Update a list member in Mailchimp.
        4. **Add Member Note** - Add a new note for a subscriber in Mailchimp.
      </Accordion>

      <Accordion title="Others">
        5. **HTTP Request** - Make HTTP API calls to any Mailchimpdocumented REST APIs.
        6. **Add Or Remove Member Tags** - Add or remove tags from a list member in Mailchimp.
      </Accordion>
    </AccordionGroup>
  </Tab>

  <Tab title="Triggers">
    1. **Campaign Sent** - Triggers when a campaign is sent or cancelled on Mailchimp.
    2. **Subscribe** - Triggers when a subscriber is subscribed to the list on Mailchimp.
    3. **Unsubscribe** - Triggers when a subscriber is unsubscribed from the list on Mailchimp.
  </Tab>
</Tabs>
