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

# Setting Up Connections

> Set up Cashfree Relay connections to link Gmail, Slack, Google Sheets, and other external apps so your automated workflows can act on real data.

Connections link external apps and services to the Cashfree Merchant Dashboard, enabling workflows
to perform actions such as sending emails, updating spreadsheets, or posting messages. You must set
up a connection before you can use an app-based action in a workflow.

All connections are managed from the **Connections** tab on the Relay dashboard and can be
reused across multiple workflows.

## Supported integrations

The following integrations are available for use in workflows.

| Integration       | Authentication type         | Description                                                                          |
| ----------------- | --------------------------- | ------------------------------------------------------------------------------------ |
| Google Sheets     | OAuth2                      | Create and manage spreadsheets; add rows, create spreadsheets, or create worksheets. |
| Slack             | OAuth2                      | Send messages to channels or users via a Slack workspace.                            |
| Gmail             | OAuth2                      | Send emails or request approvals through a Gmail account.                            |
| Calendly          | API key (Personal Token)    | Manage scheduling actions via a Calendly account.                                    |
| WhatsApp Business | Access token                | Send messages via a WhatsApp Business account.                                       |
| Google Gemini     | API key                     | Use Google Gemini models for content generation and analysis.                        |
| OpenAI            | API key                     | Access ChatGPT models for a wide range of AI-powered actions.                        |
| Cashfree Payments | Client ID and Client Secret | Process payments using Cashfree Payments.                                            |

## Add a connection

To add a connection, follow these steps.

1. Log in to the [Merchant Dashboard](https://merchant.cashfree.com/auth/login) and go to
   **Payment Gateway** > **Relay**.
2. Click the **Connections** tab.
3. Click **Add new connection**. The **Add connection** dialogue opens, listing all available
   integrations.
4. (Optional) Use the **Search integrations** field to filter the list by name.
5. Select the integration you want to connect. The **Configure connection** panel opens for
   the selected app.
6. In the **Connection name** field, enter a name to identify this connection.
7. Fill in the required fields for the selected integration. See [Configure a connection](#configure-a-connection)
   for integration-specific steps.
8. Click **Connect** or **Test** to authenticate, depending on the integration.
9. Click **Save** to add the connection.

<img src="https://mintcdn.com/cashfreepayments-d00050e9/RHCB-qanDSw2OU71/static/images/tool-ai/cashfree-here/adding-connection.gif?s=e09db808a029a0ac195280f5e80c2a91" alt="Add a connection" width="1436" height="814" data-path="static/images/tool-ai/cashfree-here/adding-connection.gif" />

The new connection appears in the list on the **Connections** tab and is available for use in
workflows.

<Note>
  Each connection is specific to the account you authenticate with during setup. If you need
  to connect a different account for the same app, add a new connection for it.
</Note>

## Delete a connection

You can delete a connection that is no longer needed. Connections cannot be edited; to update
a connection, delete it and create a new one.

1. Go to **Payment Gateway** > **Relay** > **Connections**.
2. In the **Actions** column for the connection, click the delete icon. A confirmation dialogue appears.
3. Click **Delete** to confirm, or **Cancel** to go back.

<Warning>
  Deleting a connection removes it permanently and cannot be undone. Any workflow that uses this
  connection will stop working. Review and update affected workflows before deleting.
</Warning>

## Configure a connection

The configuration steps and required credentials vary by integration. Select your integration below
for the required fields and authentication steps.

<Note>
  Google Sheets and Gmail both use OAuth2 and share the same Google Cloud
  credentials. You can use a single Client ID and Client Secret for both integrations by
  registering one OAuth2 application in the Google Cloud Console and enabling each Google API
  under the same project. To enable APIs, go to **APIs & Services** > **Library** in the
  [Google Cloud Console](https://console.cloud.google.com) and enable the APIs for the services
  you want to connect. This avoids creating separate credentials for each integration.
</Note>

<AccordionGroup>
  <Accordion title="Google Sheets" icon="table">
    **Authentication type**: OAuth2

    Google Sheets uses OAuth2 to authenticate via your Google account. Before setting up this
    connection, you must enable both the **Google Sheets API** and the **Google Drive API**, and
    register an OAuth2 application in the Google Cloud Console to obtain a Client ID and Client
    Secret.

    <Warning>
      Enabling both the Google Sheets API and the Google Drive API in your Google Cloud project
      is mandatory. Without these steps, the Google Sheets integration will not work even if your
      OAuth credentials are configured correctly.
    </Warning>

    To enable the required APIs:

    1. Go to the [Google Cloud Console](https://console.cloud.google.com) and select your project.
    2. Go to **APIs & Services** > **Library**.
    3. Search for **Google Sheets API** and **Google Drive API** and click **Enable**.

    To create OAuth2 credentials:

    1. In the [Google Cloud Console](https://console.cloud.google.com/apis/credentials), go to
       **APIs & Services** > **Credentials**.
    2. Click **Create Credentials** > **OAuth client ID**, select **Web application** as the
       application type, and paste the **Redirect URI** (copied from the Configure connection panel)
       under **Authorised redirect URIs**.
    3. Copy the generated **Client ID** and **Client Secret**.

    To configure the connection:

    1. In the **Configure connection — Google Sheets** panel, update the **Connection name**
       if needed.
    2. Copy the **Redirect URI** by clicking **Copy**.
    3. Complete the OAuth2 credential steps above, then enter the **Client ID** and **Client
       Secret** in the respective fields in the panel.
    4. Click **Connect**. The Google authorisation page opens.
    5. Sign in and grant the requested permissions.
    6. Click **Save**.

    <Note>
      If you have already created OAuth2 credentials for Gmail, you can reuse
      the same Client ID and Client Secret for this connection. See the note at the top of this
      section for details.
    </Note>

    For more information, refer to [Setting up OAuth 2.0 – Google Cloud](https://support.google.com/googleapi/answer/6158849).
  </Accordion>

  <Accordion title="Slack" icon="slack">
    **Authentication type**: OAuth2

    Slack uses OAuth2 with a Slack app you register in the Slack API. Install the app to your
    workspace after configuring scopes so Relay can act on behalf of the bot.

    <Note>
      You need an existing Slack app. If you have not created one yet, refer to
      [Creating an app from app settings – Slack Developer Docs](https://docs.slack.dev/app-management/quickstart-app-settings)
      before proceeding.
    </Note>

    1. In the **Configure connection — Slack** panel, update the **Connection name** if needed.
    2. Copy the **Redirect URI** by clicking **Copy**.
    3. In your [Slack app settings](https://api.slack.com/apps), go to **OAuth & Permissions**
       and paste the copied Redirect URI under **Redirect URLs**.
    4. On the same **OAuth & Permissions** page, under **Scopes**, add each of the following
       permissions using **Add an OAuth Scope**.

    | Scope               | Description                                      | Required |
    | ------------------- | ------------------------------------------------ | -------- |
    | `chat:write`        | Send messages to channels                        | Yes      |
    | `chat:write.public` | Send messages to public channels without joining | Yes      |
    | `channels:read`     | View basic information about public channels     | Yes      |
    | `groups:read`       | View basic information about private channels    | Yes      |
    | `users:read`        | View people in the workspace                     | Yes      |
    | `users:read.email`  | View email addresses of people in the workspace  | Optional |
    | `commands`          | Add shortcuts and slash commands                 | Optional |
    | `app_mentions:read` | View messages that mention the app               | Optional |

    5. From the **Basic Information** page of your Slack app, copy the **Client ID** and
       **Client Secret** and enter them in the respective fields in the panel.
    6. Click **Connect**. The Slack authorisation page opens.
    7. Sign in and grant the requested permissions. Install the app to your workspace if Slack
       prompts you to.
    8. Click **Save**.

    <Note>
      If you change scopes after installing the app, reinstall it to your workspace so the
      updated permissions take effect.
    </Note>

    For more information, refer to [Installing with OAuth – Slack Developer Docs](https://docs.slack.dev/authentication/installing-with-oauth/).
  </Accordion>

  <Accordion title="Gmail" icon="envelope">
    **Authentication type**: OAuth2

    Gmail uses OAuth2 to authenticate via your Google account. Before setting up this connection,
    register an OAuth2 application in the Google Cloud Console to obtain a Client ID and
    Client Secret.

    1. In the **Configure connection — Gmail** panel, update the **Connection name** if needed.
    2. Copy the **Redirect URI** by clicking **Copy**.
    3. In the [Google Cloud Console](https://console.cloud.google.com/apis/credentials), go to
       **APIs & Services** > **Credentials**.
    4. Click **Create Credentials** > **OAuth client ID**, select **Web application** as the
       application type, and paste the copied Redirect URI under **Authorised redirect URIs**.
    5. Copy the generated **Client ID** and **Client Secret** from the Google Cloud Console and
       enter them in the respective fields in the panel.
    6. Click **Connect**. The Google authorisation page opens.
    7. Sign in and grant the requested permissions.
    8. Click **Save**.

    <Note>
      If you have already created OAuth2 credentials for Google Sheets, you
      can reuse the same Client ID and Client Secret for this connection. See the note at the
      top of this section for details.
    </Note>

    For more information, refer to [Setting up OAuth 2.0 – Google Cloud](https://support.google.com/googleapi/answer/6158849).
  </Accordion>

  <Accordion title="Calendly" icon="calendar-check">
    **Authentication type**: API key (Personal Token)

    Calendly uses a personal access token for authentication. Follow the steps below to obtain
    your token from the Calendly app.

    To get your Calendly personal access token:

    1. Log in to your [Calendly account](https://calendly.com).
    2. Go to **Integrations** > **API & Webhooks**.
    3. Under **Personal Access Tokens**, click **Get a token now** if you have no prior tokens,
       or **Generate new token** if you already have one.
    4. Enter a name for the token and click **Create Token**.
    5. Copy the token.

    <Note>
      Calendly does not display your personal access token again after generation. Copy and store
      it securely before closing the dialogue.
    </Note>

    To configure the connection:

    1. In the **Configure connection — Calendly** panel, update the **Connection name** if needed.
    2. Paste your personal token in the **Enter API key** field.
    3. Click **Test** to verify the connection.
    4. Click **Save**.

    For more information, refer to [Personal access tokens – Calendly Developer Docs](https://developer.calendly.com/personal-access-tokens).
  </Accordion>

  <Accordion title="WhatsApp Business" icon="whatsapp">
    **Authentication type**: System user access token

    WhatsApp Business uses a system user access token and a business account ID for
    authentication. These are generated from Meta Business Suite and are long-lived, making
    them suitable for automated integrations.

    To get your system user access token and business account ID:

    1. Sign in to [Meta Business Suite](https://business.facebook.com).
    2. Click the **Settings** (gear) icon for your business portfolio.
    3. Go to **Users** > **System Users**.
    4. Click **Add** and create a system user with the **Admin** role.
    5. Click **Assign Assets**, select your WhatsApp app, enable **Full control**, and click
       **Assign assets**.
    6. Click **Generate Token**, select your app, enable the `whatsapp_business_messaging`
       permission, and click **Generate Token**.
    7. Copy and store the token securely. It is displayed only once.
    8. Copy your **WhatsApp Business Account ID** from the Meta for Developers dashboard under
       **WhatsApp** > **API Setup**.

    To configure the connection:

    1. In the **Configure connection — WhatsApp Business** panel, update the **Connection name**
       if needed.
    2. Paste your system user access token in the **System User Access Token** field.
    3. Paste your business account ID in the **Business Account ID** field.
    4. Click **Save**.

    For more information, refer to [System User access tokens – Meta for Developers](https://developers.facebook.com/documentation/business-messaging/whatsapp/access-tokens/).
  </Accordion>

  <Accordion title="Google Gemini" icon="robot">
    **Authentication type**: API key

    Google Gemini uses an API key for authentication. API keys are created and managed in
    Google AI Studio.

    <Note>
      The Google Gemini integration uses an API that is currently in beta and may change
      at any time.
    </Note>

    To get your Google Gemini API key:

    1. Go to [Google AI Studio](https://aistudio.google.com/apikey) and sign in with your
       Google account.
    2. Click **Create API key**.
    3. Select an existing Google Cloud project or create a new one.
    4. Copy the generated API key and store it securely.

    To configure the connection:

    1. In the **Configure connection — Google Gemini** panel, update the **Connection name**
       if needed.
    2. Paste your API key in the **Enter API key** field.
    3. Click **Test** to verify the connection.
    4. Click **Save**.

    For more information, refer to [Gemini API keys – Google AI for Developers](https://ai.google.dev/gemini-api/docs/api-key).
  </Accordion>

  <Accordion title="OpenAI" icon="microchip">
    **Authentication type**: API key

    OpenAI uses an API key for authentication. API keys are created and managed from the
    OpenAI platform dashboard.

    <Note>
      It is strongly recommended that you add your billing information and upgrade to a paid
      OpenAI plan **before** generating an API key. This helps prevent `429` rate limit errors
      when the integration is in use.
    </Note>

    To get your OpenAI API key:

    1. Go to [platform.openai.com/api-keys](https://platform.openai.com/api-keys) and sign in.
    2. Click **Create new secret key**.
    3. Give the key a name and click **Create secret key**.
    4. Copy the key and store it securely. It is displayed only once.

    To configure the connection:

    1. In the **Configure connection — OpenAI** panel, update the **Connection name** if needed.
    2. Paste your API key in the **Enter API key** field.
    3. Click **Test** to verify the connection.
    4. Click **Save**.

    For more information, refer to [API keys – OpenAI Platform](https://platform.openai.com/api-keys).
  </Accordion>

  <Accordion title="Cashfree Payments" icon="https://mintcdn.com/cashfreepayments-d00050e9/RHCB-qanDSw2OU71/static/logo/cf-logo.svg?fit=max&auto=format&n=RHCB-qanDSw2OU71&q=85&s=25002834e55fa441ba30af44b0129a28" width="65" height="65" data-path="static/logo/cf-logo.svg">
    **Authentication type**: Client ID and Client Secret

    Cashfree Payments uses your App ID and Secret Key for authentication. Each Cashfree
    product requires its own set of credentials. If you are connecting multiple products
    such as Payments and Payouts, you must generate separate API keys for each.

    To get your App ID and Secret Key:

    1. Log in to the [Merchant Dashboard](https://merchant.cashfree.com/merchants) and go to
       **Developers**.
    2. Click **API Keys** under the product you want to connect, such as Payment Gateway.
    3. Generate your API keys based on your environment:
       * **Test environment**: Cashfree auto-generates your API keys. No additional action is required.
       * **Production environment**: Click **Generate API Keys** and complete the 2FA authentication to generate the keys.
    4. Once generated, the keys are shown in masked format. Click the ellipsis and select
       **View API Key** to reveal them.
    5. Copy the **App ID** and **Secret Key** and store them securely.

    <Warning>
      You can only generate one API key pair at a time. If your keys are lost, you must
      regenerate them from the dashboard. Never expose your Secret Key on the client side
      or commit it to source control.
    </Warning>

    To configure the connection:

    1. In the **Configure connection — Cashfree Payments** panel, update the **Connection name**
       if needed.
    2. Paste your App ID in the **Cashfree Client ID** field.
    3. Paste your Secret Key in the **Cashfree Client Secret** field.
    4. Click **Save**.

    For more information, refer to [Authentication](/api-reference/authentication#generate-api-keys) topic in the API Reference.
  </Accordion>
</AccordionGroup>
