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

# ActiveCampaign Integration

> Connect ActiveCampaign with ChatbotX to create or update contacts, apply Tags, and add them to a List or Automation from a Flow.

The **ActiveCampaign** integration sends contact information from ChatbotX to ActiveCampaign directly within a Flow. You can create or update contacts, add customers to lists, apply Tags, and enroll customers in an Automation.

For example, after a customer provides an email address for a consultation, ChatbotX creates the contact in ActiveCampaign, applies the `NEW` Tag, and enrolls the customer in a relevant email nurture series.

## Prepare your API URL and API Key

You need the **API URL** and **API Key** from your ActiveCampaign account before connecting. These credentials allow ChatbotX to send contact data to the correct account.

<Steps>
  <Step title="Sign in to ActiveCampaign">
    Sign in to the ActiveCampaign account that you want to connect to ChatbotX.
  </Step>

  <Step title="Open Developer Settings">
    Select **Settings** in the lower-left corner, then select **Developer** from the account settings menu.
  </Step>

  <Step title="Copy the API credentials">
    Copy both the **API URL** and **API Key** from the API Access section. You will enter these values in ChatbotX during the next procedure.

    See [Getting started with the API](https://help.activecampaign.com/hc/en-us/articles/207317590-Getting-started-with-the-API) in the official ActiveCampaign documentation.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/m1KhKPOSptGzQPOL/images/activecampaign_developer_settings_api_credentials.png?fit=max&auto=format&n=m1KhKPOSptGzQPOL&q=85&s=c869b8569e55a421d84ddaa8941b737e" alt="ActiveCampaign Developer Settings API Credentials" width="3328" height="1882" data-path="images/activecampaign_developer_settings_api_credentials.png" />
    </Frame>
  </Step>
</Steps>

<Warning>
  Your API Key allows other applications to access your ActiveCampaign data. Do not share it in messages, public screenshots, or customer-facing documents.
</Warning>

Each ActiveCampaign user has a separate API URL and API Key. If the user who provided the credentials is deleted or the key is reset, update the connection in ChatbotX.

## Connect ActiveCampaign to ChatbotX

<Steps>
  <Step title="Open Settings">
    In your ChatbotX workspace, select **Settings** from the left menu.
  </Step>

  <Step title="Select Integrations">
    Select the **Integrations** tab, then open **ActiveCampaign**.
  </Step>

  <Step title="Open the connection window">
    Click **Connect** to open the **Connect ActiveCampaign** window.
  </Step>

  <Step title="Enter the API credentials">
    Paste the address into **API URL** and the key into **API Key**. The API URL usually follows the format `https://youraccount.api-us1.com`.
  </Step>

  <Step title="Confirm the connection">
    Click **Confirm**. When the credentials are valid, ChatbotX saves the connection for use in your Flows.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/m1KhKPOSptGzQPOL/images/connect_activecampaign_in_chatbotx_integrations.png?fit=max&auto=format&n=m1KhKPOSptGzQPOL&q=85&s=c3782b8fc1b8d35c86eb42819f278e62" alt="Connect ActiveCampaign in ChatbotX Integrations" width="3182" height="1496" data-path="images/connect_activecampaign_in_chatbotx_integrations.png" />
    </Frame>
  </Step>
</Steps>

## Add ActiveCampaign to a Flow

After connecting your account, add the ActiveCampaign action to a Send Message node or another suitable position in your Flow.

<Steps>
  <Step title="Open the Flow">
    Select **Flows**, then open the Flow that you want to use for contact synchronization.
  </Step>

  <Step title="Add Actions">
    In a Send Message node, click **+ Create**, then select **Actions**.
  </Step>

  <Step title="Select Email Actions">
    Open **Email Actions** and select **Add Contact to ActiveCampaign**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/m1KhKPOSptGzQPOL/images/select_add_contact_to_activecampaign_action.png?fit=max&auto=format&n=m1KhKPOSptGzQPOL&q=85&s=485e7759e1e0b66d203de7483c083e85" alt="Select Add Contact to ActiveCampaign Action" width="3182" height="1892" data-path="images/select_add_contact_to_activecampaign_action.png" />
    </Frame>
  </Step>

  <Step title="Open the configuration">
    Click **Edit** on the new action to select an operation and map contact data.
  </Step>
</Steps>

## Create or update a contact

Select the **Create or Update Contact** operation to send customer data from ChatbotX to ActiveCampaign. If the email address already exists, ActiveCampaign updates the contact instead of creating a duplicate record.

| Field                               | Configuration                                                                                                               |
| ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| **Email Field**                     | Select the ChatbotX field that stores the customer's email address. ActiveCampaign uses this value to identify the contact. |
| **Phone**                           | Select the phone number field if you also want to synchronize this information.                                             |
| **List**                            | Select one or more ActiveCampaign lists that the contact should join.                                                       |
| **Tags**                            | Select the ActiveCampaign Tags to apply, such as `NEW` or `Fashion Lead`.                                                   |
| **Custom Fields in ActiveCampaign** | Click **+ Add custom field** to map a ChatbotX Custom Field to its corresponding ActiveCampaign field.                      |

Click **Save** to save the action.

<Frame>
  <img src="https://mintcdn.com/chatbotx/m1KhKPOSptGzQPOL/images/configure_activecampaign_create_or_update_contact.png?fit=max&auto=format&n=m1KhKPOSptGzQPOL&q=85&s=f540eb427ce6a41bea0e9dd14601a4f5" alt="Configure Create or Update Contact in ActiveCampaign" width="3181" height="1894" data-path="images/configure_activecampaign_create_or_update_contact.png" />
</Frame>

<Note>
  Collect the customer's email address with Get User Data before this action runs. ChatbotX cannot create the correct ActiveCampaign contact if the email field is empty or invalid.
</Note>

## Add a contact to an Automation

Select the **Add Contact to Automation** operation to enroll a contact with an email address in an ActiveCampaign automation.

<Steps>
  <Step title="Select the operation">
    In **Operation**, select **Add Contact to Automation**.
  </Step>

  <Step title="Select the email field">
    In **Email Field**, select the ChatbotX field that contains the customer's email address.
  </Step>

  <Step title="Select the Automation">
    In **Automation**, select the ActiveCampaign automation that the customer should join, then click **Save**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/m1KhKPOSptGzQPOL/images/configure_add_contact_to_activecampaign_automation.png?fit=max&auto=format&n=m1KhKPOSptGzQPOL&q=85&s=d04705a3507804eb01646c2784169615" alt="Configure Add Contact to ActiveCampaign Automation" width="3184" height="1897" data-path="images/configure_add_contact_to_activecampaign_automation.png" />
    </Frame>
  </Step>
</Steps>

For example, a customer asks to receive new collection announcements by email. After the customer enters an email address, the Flow creates or updates the contact and enrolls them in an Automation that introduces the new products.

## Test the integration

Before publishing the Flow, test it with an email address that you can verify.

* Open **Contacts** in ActiveCampaign and confirm that the contact was created or updated.
* Check that ActiveCampaign received the correct Lists, Tags, and Custom Fields.
* If you use **Add Contact to Automation**, confirm that the contact appears in the selected Automation.
* If the connection fails, copy the API URL and API Key again from **Settings > Developer**, then reconnect the integration.

<Warning>
  Resetting the API Key in ActiveCampaign stops the current connection from working. After resetting the key, update it in ChatbotX.
</Warning>
