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

# Zapier

> Open is integrated with Zapier! You can automate multiple Open actions and triggers using zapier.com and using OpenCX app.

This guide shows you how to create your own zaps using Open's Action and Triggers.

A Zapier zap consists of a Trigger and an Action.

Zapier Triggers allows you to do an action when something happens.

Zapier Action is an action that happens when a trigger is activated.

## Open Actions

<CardGroup cols={2}>
  <Card title="Create a contact" icon="user-plus" iconType="solid">
    Create a new contact to be stored in your Open Dashboard.
  </Card>

  <Card title="Delete a contact" icon="user-minus" iconType="solid">
    Deletes a contact from your contact list.
  </Card>

  <Card title="List contacts" icon="user-group" iconType="solid">
    Lists all your contacts.
  </Card>

  <Card title="Create Chat Session" icon="message-plus" iconType="solid">
    Creates a chat session with a contact in any type of channel
  </Card>

  <Card title="List Chat Sessions" icon="messages" iconType="solid">
    Lists all chat sessions of organization.
  </Card>

  <Card title="List Chat Session History" icon="messages" iconType="solid">
    Lists the history of a particular chat session
  </Card>

  <Card title="Make AI Phone Call" icon="phone" iconType="solid">
    Make an AI phone call using your phone number created in Open
  </Card>

  <Card title="Send Emails" icon="envelope" iconType="solid">
    Send emails to multiple contacts, possibly with a time delay. To send emails using the API, you
    must first verify the domain you want to send emails from. You can add and verify custom domains
    in the settings.
  </Card>
</CardGroup>

## Open Triggers

<CardGroup cols={2}>
  <Card title="Conversation Started" icon="messages" iconType="solid">
    Is triggered when a new conversation of any channel type starts
  </Card>

  <Card title="Conversation Ended" icon="messages" iconType="solid">
    Is triggered when a new conversation of any channel type ends
  </Card>

  <Card title="Handoff to Human Agent" icon="user-headset" iconType="solid">
    Triggers when a conversation is handed off to a human agent. Note that a handoff event can
    happen for multiple reasons; for example, a human agent might decide to take over the
    conversation, or the AI might decide to hand off the conversation to a human agent.
  </Card>
</CardGroup>

## Steps for creating you first Zap using Open's Actions and Triggers

### Creating a Zap using one of Open's Triggers

<Steps>
  <Step title="Go to your Zapier Zaps dashboard">
    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zapier-zaps.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=a5c313048b14666ff8165d8729c0b92f" alt="Zapier Zaps dashboard landing view" width="2704" height="1526" data-path="images/zapier-zaps.png" />
    </Frame>

    Firstly go to your Zapier Zaps Dashboard using [this](https://zapier.com/app/zaps) link, and signup if you do not have an account.
  </Step>

  <Step title="Create a new Zap">
    Click on the "+ Create" button on the top right to create a new Zap. The following screen should now be visible.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zap-preview.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=bb17719999b096938d13f15719f7b1bb" alt="New Zap editor with empty Trigger and Action blocks" width="2698" height="1516" data-path="images/zap-preview.png" />
    </Frame>

    Press on the box with the title "Trigger"
  </Step>

  <Step title="Choose OpenCX as the trigger app">
    This screen should now be visible.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zapier-app-search.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=5f8edbf2a2af9fe345d2dbe243c3185b" alt="Zapier trigger app search panel" width="2704" height="1530" data-path="images/zapier-app-search.png" />
    </Frame>

    In the search bar type "OpenCX" and our app should be visible to choose.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zapier-choose-trigger.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=729be2e846702f3cb5eb0be8e2173ee2" alt="OpenCX app result selected in the Zapier app picker" width="2704" height="1520" data-path="images/zapier-choose-trigger.png" />
    </Frame>

    Choose this app.
  </Step>

  <Step title="Pick a trigger event and connect your account">
    This screen should now be visible.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/choose-open-option.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=c471bb2c801d32287cc9b74dc2d56e37" alt="List of OpenCX trigger events in Zapier" width="2704" height="1528" data-path="images/choose-open-option.png" />
    </Frame>

    After choosing one of our triggers for this example we chose "Conversation Started", you will then press on the sign in button below to sign in using you Open Account so we can verify your identity.
    You will then be redirected to this page

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zapier-login.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=a49edfa9d23338da6b4c3047f2dfc330" alt="Zapier prompt asking for an OpenCX API key" width="2704" height="1522" data-path="images/zapier-login.png" />
    </Frame>

    Here we request an API key that is connected to your OpenCX account. To get this API key, go to your OpenCX dashboard and open Settings.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/open-settings.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=c6159b0acec3935e581742fa163494df" alt="OpenCX dashboard settings menu" width="2522" height="1386" data-path="images/open-settings.png" />
    </Frame>

    Then choose "API Token" from the left menu

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/open-settings-api-tokens.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=77bb1593f28c89817b368ebbb34c4d3c" alt="API Tokens page in OpenCX settings" width="2654" height="1480" data-path="images/open-settings-api-tokens.png" />
    </Frame>

    Press "Add" to add a new token, choose a name for this token. Copy the generated token and store it in a safe place, then paste it in the Zapier Login Screen like so.

    <Frame>
      <img src="https://mintcdn.com/openchat/QQBUZEMVWs_GKqcv/images/zapier-login-added-api-key.png?fit=max&auto=format&n=QQBUZEMVWs_GKqcv&q=85&s=caa2b31a5c2331f084e8810d05899439" alt="Zapier login screen with the OpenCX API key pasted" width="2704" height="1514" data-path="images/zapier-login-added-api-key.png" />
    </Frame>

    Then press continue and you will be immediatly redirected to your Zap.

    Your trigger part of the Zap is now setup and ready!
  </Step>
</Steps>

### Creating a Zap using one of Open's Actions

For actions you will do the exact same steps as Triggers with the exception that you will be choosing Action instead.
