> ## 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.

# Make Integration

> Connect ChatbotX with Make to receive events, send Flow data, and automate Actions for contacts.

The **Make** integration connects ChatbotX with external apps and automated processes. You can send customer data from a Flow to Make, update contacts, or send another Flow without manual work.

For example, after a customer completes a consultation form in ChatbotX, Make can add the information to your CRM and send a confirmation Flow.

## How the integration works

In Make, a **scenario** is an automated process made of connected modules. The ChatbotX integration uses the **ChatConnectX** app with three main components:

| Component      | Function                                                                   |
| -------------- | -------------------------------------------------------------------------- |
| **Trigger**    | Starts a scenario when Make receives an event or data from ChatbotX.       |
| **Action**     | Performs a task in ChatbotX, such as updating a contact or sending a Flow. |
| **Connection** | Authenticates Make with a ChatbotX workspace using a Workspace token.      |

The usual setup order is: install ChatConnectX, create a Connection, choose a Trigger, add an Action, and test the scenario.

## Install ChatConnectX and connect your workspace

### Install the ChatConnectX app

The **Connect** button in ChatbotX opens the **ChatConnectX** installation page in Make. You create and manage scenarios directly in Make.

<Steps>
  <Step title="Open ChatConnectX from Integrations">
    In ChatbotX, select **Settings** from the left menu and open **Integrations**. Find **Make**, then select **Connect** to open **ChatConnectX** in Make.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_connect_chatconnectx.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=457caa7f95be8827b10aa68b57190ac0" alt="Open the ChatConnectX app from the Make integration" width="3011" height="1872" data-path="images/make_connect_chatconnectx.png" />
    </Frame>
  </Step>

  <Step title="Install the app">
    On the ChatConnectX page, select **Install**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/chatconnectx_make_install.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=7ad93ad88b4109bbee346b018f529d53" alt="Install the ChatConnectX app in Make" width="3016" height="843" data-path="images/chatconnectx_make_install.png" />
    </Frame>
  </Step>

  <Step title="Select an organization">
    Select the organization where you want to install the app. Your Make account needs the **Admin**, **Owner**, or **App Developer** role. Select **Install** to finish.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_select_organization.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=7fef84172bd6295094a57fc2cfce25ae" alt="Select an organization and install ChatConnectX" width="2191" height="1461" data-path="images/make_select_organization.png" />
    </Frame>
  </Step>
</Steps>

<Note>
  **Connect** only opens the ChatConnectX app in Make. You install the app, create scenarios, and enable scenarios in Make.
</Note>

### Create a Connection

A Connection gives Make access to the correct ChatbotX workspace. Create it once, then reuse it in other ChatConnectX modules.

<Steps>
  <Step title="Open the Connection dialog">
    In a ChatConnectX module, select **Add** next to **Connection**.
  </Step>

  <Step title="Name the Connection">
    Enter a recognizable name in **Connection name**, such as `ChatbotX Production`.
  </Step>

  <Step title="Enter the Workspace token">
    In ChatbotX, open **Settings > Integrations > Workspace token** and copy the token. Paste it into **Workspace token** in Make.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_create_connection_workspace_token.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=2ae691fe6957fc10f339a78fd5ffa11b" alt="Enter the ChatbotX Workspace token when creating a Make connection" width="2083" height="1013" data-path="images/make_create_connection_workspace_token.png" />
    </Frame>
  </Step>

  <Step title="Save the Connection">
    Select **Save**, then select the new Connection in the module.
  </Step>
</Steps>

<Warning>
  A Workspace token provides access to workspace data. Do not include it in screenshots, emails, or public documentation. Stop using a token if it has been exposed.
</Warning>

## ChatConnectX Triggers

ChatConnectX provides two Triggers that can start a scenario:

<CardGroup cols={2}>
  <Card title="Watch events">
    Use this Trigger with ChatbotX [**Webhooks**](/docs/triggers/webhooks) to start a scenario when Make receives a subscribed event.
  </Card>

  <Card title="Watch flow data">
    Use this Trigger when an **Actions > Triggers > Make** block in a Flow sends data to Make.
  </Card>
</CardGroup>

### Receive data from a Make block in a Flow

When a Flow uses an **Actions > Triggers > Make** block, select **Watch flow data** as the scenario Trigger. The event names on both platforms must match.

#### Create a Make block in a ChatbotX Flow

<Steps>
  <Step title="Open the Flow">
    In ChatbotX, open the Flow that should send data to Make and select the appropriate message node.
  </Step>

  <Step title="Add the Make block">
    Select **Create**, then choose **Actions > Triggers > Make** to add the block to the message node.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/chatbotx_flow_add_make_action.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=f2c749efbf4410dcb7ac592e43b6a995" alt="Add the Make action block in ChatbotX Flow Builder" width="3045" height="1879" data-path="images/chatbotx_flow_add_make_action.png" />
    </Frame>
  </Step>

  <Step title="Name the event">
    Select **Edit** on the **Make** block. In **Events**, enter an event name such as `make_trigger`, then select **Save**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/chatbotx_flow_configure_make_event.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=25cd4fb6b46aacff44979636909f8d89" alt="Configure an event name in the ChatbotX Make action block" width="3046" height="1882" data-path="images/chatbotx_flow_configure_make_event.png" />
    </Frame>
  </Step>
</Steps>

#### Set up Watch flow data in Make

<Steps>
  <Step title="Create a new scenario">
    In Make, select **Scenarios**, then create a **New scenario**.
  </Step>

  <Step title="Add ChatConnectX">
    In the first module, search for and select **ChatConnectX**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_new_scenario_chatconnectx.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=cc91259de08e607e52e3df4d5f2d6ed9" alt="Search for ChatConnectX in a new Make scenario" width="3015" height="1883" data-path="images/make_new_scenario_chatconnectx.png" />
    </Frame>
  </Step>

  <Step title="Choose Watch flow data">
    Select **Watch flow data** so Make can receive data sent from the ChatbotX Flow.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_watch_flow_data_module.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=2452ca5a29da27ba372ddb2a09691aee" alt="Choose the ChatConnectX Watch flow data module" width="3023" height="1880" data-path="images/make_watch_flow_data_module.png" />
    </Frame>
  </Step>

  <Step title="Create a webhook and choose a Connection">
    Select **Create a webhook**, enter a webhook name, and choose the existing Connection. If no Connection exists, select **Add** and enter the Workspace token.
  </Step>

  <Step title="Enter the Event name">
    In **Event name**, enter the exact name used in **Events** on the **Make** block, such as `make_trigger`, then select **Save**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_watch_flow_data_webhook_event_name.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=e65851da865bc5959394611233125c0d" alt="Match the webhook event name with the ChatbotX Make action event" width="2843" height="1877" data-path="images/make_watch_flow_data_webhook_event_name.png" />
    </Frame>
  </Step>

  <Step title="Run the scenario once">
    Select **Run once** so Make starts waiting for sample data.
  </Step>

  <Step title="Send data from ChatbotX">
    Run the Flow that contains the **Actions > Triggers > Make** block. When the data arrives, Make displays the result in **Operation 1**.
  </Step>
</Steps>

<Warning>
  The webhook **Event name** must exactly match the name in **Events** on the **Make** block. If the names differ, Make does not receive data from the Flow.
</Warning>

The sample output can include `Event`, `Contact`, `Custom Fields`, `Tags`, and `Contact Sequences`. Use these fields to map data into the next module.

<Frame>
  <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_watch_flow_data_sample_output.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=7e6038f374b24c92928daaf030786543" alt="Inspect sample ChatConnectX output in Make" width="2853" height="1882" data-path="images/make_watch_flow_data_sample_output.png" />
</Frame>

## Perform Actions in ChatbotX

An Action is a module that runs after a Trigger. It receives data from previous modules and performs a task in your ChatbotX workspace.

<Steps>
  <Step title="Add a new module">
    In the Make scenario, select the **+** after the Trigger module.
  </Step>

  <Step title="Choose ChatConnectX">
    Search for **ChatConnectX**, then select the appropriate Action.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_chatconnectx_actions_list.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=32f141dea9dbd9c77aaeb4c3004fd194" alt="Choose a ChatConnectX Action module in Make" width="2848" height="1769" data-path="images/make_chatconnectx_actions_list.png" />
    </Frame>
  </Step>

  <Step title="Configure the Action">
    Choose the Connection, complete the required fields, and map data from the previous module. Select **Save** when finished.
  </Step>
</Steps>

### Manage contacts

| Action                            | Function                                                                                  |
| --------------------------------- | ----------------------------------------------------------------------------------------- |
| **Create contact**                | Creates a new contact in the workspace.                                                   |
| **Update or create contact**      | Updates an existing contact or creates one if it does not exist.                          |
| **Get contact**                   | Retrieves a contact by `id`, `email`, or `phone`, including Tags and Custom Field values. |
| **List contacts**                 | Lists contacts and optionally filters them by name, email, or phone number.               |
| **Find contacts by custom field** | Finds contacts whose Custom Field exactly matches a value.                                |
| **Delete a contact**              | Permanently deletes a contact by `id`, `email`, or `phone`.                               |

### Update Tags and Custom Fields

| Action                            | Function                                                                       |
| --------------------------------- | ------------------------------------------------------------------------------ |
| **Add tags to contact**           | Adds up to 100 Tags. Tags already assigned to the contact are skipped.         |
| **Remove tags from a contact**    | Removes Tags from a contact without deleting them from the workspace.          |
| **Set custom fields to contact**  | Sets up to 20 Custom Field values for a contact.                               |
| **Delete a contact custom field** | Clears a Custom Field value from a contact while keeping the field definition. |

### Send content and perform advanced tasks

| Action               | Function                                                                                   |
| -------------------- | ------------------------------------------------------------------------------------------ |
| **Send message**     | Sends a text message of up to 1,000 characters to a contact with an existing conversation. |
| **Send flow**        | Sends a published Flow to a contact.                                                       |
| **Make an API call** | Performs a custom task through the ChatbotX API using the current Connection.              |

<Warning>
  **Delete a contact** permanently deletes the contact and cannot be undone. Check the contact identifier before running the scenario with live data.
</Warning>

## Example: Send a Flow with Make

Suppose Make receives customer information from an external form. Use **Send flow** to send a confirmation or consultation Flow through the contact's most recently used channel.

<Steps>
  <Step title="Choose Send flow">
    Add a new ChatConnectX module and select **Send flow**.

    <Frame>
      <img src="https://mintcdn.com/chatbotx/WZzzEu-A09Zs_0PH/images/make_select_send_flow.png?fit=max&auto=format&n=WZzzEu-A09Zs_0PH&q=85&s=f707b533f6b8f1f7263794c3ed93d573" alt="Select the ChatConnectX Send flow action in Make" width="2834" height="1765" data-path="images/make_select_send_flow.png" />
    </Frame>
  </Step>

  <Step title="Choose a Connection">
    Select the existing Connection. If no Connection exists, select **Add** to create one.
  </Step>

  <Step title="Enter the Contact identifier">
    Enter or map the contact identifier. You can use the `Contact ID` from the Trigger. Make also accepts `id:123456`, `email:user@example.com`, or `phone:+84912345678`.
  </Step>

  <Step title="Choose the Flow">
    Enter the ID of a published Flow. Enable **Map** if the Flow ID comes from a previous module.
  </Step>

  <Step title="Choose an Inbox">
    Choose an **Inbox** to send through a specific channel. Leave it empty to use the contact's most recently used channel.
  </Step>

  <Step title="Save and test">
    Select **Save**, then select **Run once** to test the scenario.
  </Step>
</Steps>

<Note>
  The contact must already have a conversation before receiving a Flow. If **Inbox** is empty, ChatbotX uses the contact's most recently used channel.
</Note>

## Test the scenario before enabling it

<Steps>
  <Step title="Receive sample data">
    Select **Run once** in Make, then run the Flow or data source that should activate the Trigger.
  </Step>

  <Step title="Check the output">
    Open **Operation 1** and confirm that the required fields contain the correct data.
  </Step>

  <Step title="Check the Action">
    Confirm that the Action succeeds and the contact receives the correct content or data update.
  </Step>

  <Step title="Enable the scenario">
    After a successful test, enable the scenario schedule so Make can process future runs automatically.
  </Step>
</Steps>

<Note>
  If the scenario does not run, check the Connection, the data in the Operation, and the scenario's enabled status.
</Note>
