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

# Jet Admin

> [Jet Admin](https://www.jetadmin.io/) lets you build internal tools fast. It comes with a drag-and-drop component canvas, query builders, a workflow tool, and more.

You can use Sequin to build Jet Admin apps on top of APIs like Salesforce and HubSpot. Sequin will sync your API data to a Postgres database so you can write your integration in SQL. Changes you make to your database records will be applied to the API and your database at the same time.

While Jet Admin has connectors for APIs, it's much faster to build with Jet Admin's Postgres adapter. You don't have to worry about rate limits and SQL is both familiar and expressive.

## Setup a Sequin sync[](#setup-a-sequin-sync "Direct link to Setup a Sequin sync")

Before you can use Sequin with Jet Admin, you'll need to create a sync. Sequin will guide you through authenticating, selecting the data you want to sync, and connecting to your database. Read our [getting started guide](https://docs.sequin.io/getting-started#create-a-sync) for step-by-step instructions.

## Create a Jet Admin Resource[](#create-a-jet-admin-resource "Direct link to Create a Jet Admin Resource")

A [data source](https://docs.jetadmin.io/user-guide/integrations) in Jet Admin is a connection to a database or API.

Sequin uses a [Postgres Proxy](https://docs.sequin.io/writes#configuration) to interface with your Sequin-synced tables. The Proxy lets Sequin capture inserts, updates, and deletes you make in your database and commit them to the API.

To add Sequin's Postgres Proxy as a Jet Admin resource, you can treat it as a regular Postgres database and enter the connection details in the resource configuration:

**Step 1:** Go to your Jet Admin application dashboard and select *Data* from the side menu.

**Step 2:** Click *Add Resource*. From the new page, select *PostgreSQL*.

**Step 3:** This opens up a new configuration menu. Give it a name and paste the values for host, database name, database username, and database password from the *Connection instructions* tab of your Sequin dashboard:

<img src="https://mintcdn.com/sequin/3H0rKJAg0ey1fqux/images/guides/001_sequin_connection_instructions.png?fit=max&auto=format&n=3H0rKJAg0ey1fqux&q=85&s=da9e9ae22cf46ac735a828c00cd6b6be" alt="You can use the connection instructions to connect your service to Sequin." width="608" height="496" data-path="images/guides/001_sequin_connection_instructions.png" />

**Step 4:** Click *Choose Tables*. Select the tables you want to work with. Finally, click *Add Resource*.

## Using the Postgres resource in Jet Admin[](#using-the-postgres-resource-in-jet-admin "Direct link to Using the Postgres resource in Jet Admin")

Now, Sequin is syncing your API data to Postgres. You've also connected Jet Admin to Postgres via Sequin's Proxy. To query this data in your Jet Admin app, go back to your Jet Admin dashboard and select your app:

**Step 1**: Click on the *Data* from the side menu.

Step 2: Click on your PostgreSQL in the Connected Resources.

Step 3: Click *+ Create with SQL Query* to create a new SQL collection.

Step 4: Give the SQL collection a name.

Step 5: Enter a query to retrieve your data.

For instance, if you were using the [Bug Tracker](https://www.airtable.com/templates/bug-tracker/expOzMycWirMsUOTL) template on Airtable, you can use the following query to retrieve a list of bugs:

```sql theme={null}
select bugs_and_issues.id, bugs_and_issues.name, bugs_and_issues.description, bugs_and_issues.priority, bugs_and_issues.status, bugs_and_issues.created_time, tm1.name as reported_by, tm2.name as assigned_to from bugs_and_issues
join team_members as tm1 on created_by[1] = tm1.id
left join team_members as tm2 on assigned_to[1] = tm2.id

```

## Writing back to the API[](#writing-back-to-the-api "Direct link to Writing back to the API")

With Sequin, you can also make [mutations](https://docs.sequin.io/writes) via your database. Inserts, updates, and deletes you make to Sequin-synced tables are first applied to the API. If they pass validation, they're committed to your database.

To write your first mutation query, click *Data* from the side menu and select your PostgreSQL resource. Then, create a new SQL query.

When creating a new mutation query, you can choose the Run SQL operation to write your own SQL query.

Alternatively, if you don't want to write a SQL query on your own you can add the basic create, update, and delete Actions from your GUI components. Learn more about [Actions in Jet Admin](https://docs.jetadmin.io/user-guide/workflow/steps/actions).

Continuing with the bug tracker example, the query below allows a user to update the details of a bug selected in the table component using a Run SQL query:

<img src="https://mintcdn.com/sequin/3H0rKJAg0ey1fqux/images/guides/001_jetadmin_mutation.png?fit=max&auto=format&n=3H0rKJAg0ey1fqux&q=85&s=86d57de97bd488d9add5cc6c7f49b5ad" alt="Adding SQL mutation in Jet Admin." width="1251" height="830" data-path="images/guides/001_jetadmin_mutation.png" />

note

Jet Admin allows you to map the inputs to the values coming from your application. Learn more about [inputs, outputs and parameters](https://docs.jetadmin.io/user-guide/workflow/inputs-outputs-parameters#directly-from-the-step).

## Displaying Errors[](#displaying-errors "Direct link to Displaying Errors")

When Sequin's Proxy encounters an error trying to apply your mutation in the upstream API, the Proxy returns a standard Postgres error. There's no additional configuration required on Jet Admin to display these errors since Sequin's Proxy returns a standard API response message containing the Postgres error.

<img src="https://mintcdn.com/sequin/3H0rKJAg0ey1fqux/images/guides/002_jetadmin_error.png?fit=max&auto=format&n=3H0rKJAg0ey1fqux&q=85&s=67802401eb02cb40b5a0f391b741ae72" alt="Displaying Postgres error in Jet Admin." width="407" height="96" data-path="images/guides/002_jetadmin_error.png" />

## Next steps[](#next-steps "Direct link to Next steps")

You can now use Jet Admin to build on top of sources like Salesforce, Airtable, and HubSpot. If you have any questions, please [reach out to us](mailto:support@sequin.io).
