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

# AppSheet

> This page outlines the steps to connect AppSheet to the Connect AI Virtual SQL Server API.

## Prerequisites

Before you connect, you must first do the following:

* Connect a data source to your Connect AI account. See [Sources](/en/Sources) for more information.
* Generate a Personal Access Token (PAT) on the [Settings](/en/Settings#personal-access-tokens) page. Copy this down, as it acts as your password during authentication.

## Connect to Connect AI

To establish a connection from AppSheet to the Connect AI Virtual SQL Server API, follow these steps.

<Steps>
  <Step>
    Log in to AppSheet.
  </Step>

  <Step>
    In the top navigation bar, select **My account**.
  </Step>

  <Step>
    On the **Sources** tab, select **New Data Source**.

    <Frame>
      <img src="https://mintcdn.com/cdata/8B5SN8TlQOoh6rM4/en/images/appsheet_newsource.png?fit=max&auto=format&n=8B5SN8TlQOoh6rM4&q=85&s=8afe5cbd278cf9c0be10426931df1636" alt="" width="673" height="343" data-path="en/images/appsheet_newsource.png" />
    </Frame>
  </Step>

  <Step>
    In the data source list, select **Cloud Database**.

    <Frame>
      <img src="https://mintcdn.com/cdata/8B5SN8TlQOoh6rM4/en/images/appsheet_sourcelist.png?fit=max&auto=format&n=8B5SN8TlQOoh6rM4&q=85&s=d5acb7bed35f45c4b47df5a8dbf1392e" alt="" width="474" height="1193" data-path="en/images/appsheet_sourcelist.png" />
    </Frame>
  </Step>

  <Step>
    Enter the connection settings.

    * **Type**—select **SQLServer**.
    * **Server**—enter the Virtual SQL Server endpoint and port separated by a comma: *tds.cdata.com*,*14333*
    * **Database**—enter the Connection Name of the Connect AI data source you want to connect to (for example, *Salesforce1*).
    * **Username**—enter your Connect AI username. This is displayed in the top-right corner of the Connect AI interface. For example, *[test@cdata.com](mailto:test@cdata.com)*.
    * **Password**—enter the PAT you generated on the [Settings](/en/Settings#personal-access-tokens) page.
    * **SSL**—set to **Require SSL**.

    <Frame>
      <img src="https://mintcdn.com/cdata/8B5SN8TlQOoh6rM4/en/images/appsheet_connectiondetails.png?fit=max&auto=format&n=8B5SN8TlQOoh6rM4&q=85&s=17ce1f84cce6b1ea831c7631339734ae" alt="" width="478" height="827" data-path="en/images/appsheet_connectiondetails.png" />
    </Frame>
  </Step>

  <Step>
    Click **Test** to test your entered credentials. If you receive an error, check all fields and try again.
  </Step>

  <Step>
    Click **Authorize Access** to create the connection.
  </Step>
</Steps>

After you create your data source, it appears on the Account Sources list. When creating an app in AppSheet, you can select tables from your connection as the source of data.
