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

# Airtable Integration

> Connect HelloLeo to your Airtable bases

Connect HelloLeo to your Airtable bases to read and write data directly from your spreadsheets and databases.

## Setup

1. Go to **Project Settings** → **Project Integrations**
2. Select **Airtable** from the list
3. Enter your credentials:
   * **Access Token** - Your Airtable personal access token
     * Get it from [Airtable Token Creation](https://airtable.com/create/tokens/new)
4. Test the connection
5. Start using Airtable in your prompts

## How It Works

HelloLeo uses the Airtable API through the Integration Proxy. Your access token is encrypted and stored securely on the backend. API calls are made directly from your frontend through the proxy, avoiding CORS issues.

## API Endpoints

The integration uses Airtable's REST API. Endpoints follow the format:

* `/v0/{baseId}/{tableIdOrName}` - Access tables in your bases

## Common Operations

### List Records

* **GET** `/v0/{baseId}/{tableIdOrName}` - List records from a table
* Supports query parameters: `fields[]`, `maxRecords`, `pageSize`, `offset`, `sort`, `filterByFormula`, `view`

### Create Records

* **POST** `/v0/{baseId}/{tableIdOrName}` - Create new records

### Update Records

* **PATCH** `/v0/{baseId}/{tableIdOrName}/{recordId}` - Update a record

### Delete Records

* **DELETE** `/v0/{baseId}/{tableIdOrName}/{recordId}` - Delete a record

## Example Usage

### Display Records

```
Show all customers from my Airtable "Contacts" table. 
Display name, email, phone, and company.
```

### Create a Record

```
When the contact form is submitted, save the data to Airtable 
in the "Leads" table with fields: Name, Email, Message.
```

### Search Records

```
Find all customers in Airtable where the company is "Acme Corp".
```

### Update Records

```
Update the customer record in Airtable to change their email 
to "newemail@example.com".
```

## Query Parameters

When listing records, you can use:

* **fields\[]** - Specify which fields to return
* **maxRecords** - Limit the number of records
* **pageSize** - Set page size for pagination
* **offset** - Pagination offset
* **sort** - Sort records by field and direction
* **filterByFormula** - Filter records using Airtable formulas
* **view** - Use a specific view

## Best Practices

* **Specify base and table** - Always mention which Airtable base and table you're working with
* **Name fields explicitly** - Tell Leo which fields to display or update
* **Use table names** - Reference tables by their display names (e.g., "Contacts", "Orders")
* **Mention the integration** - Always say "from Airtable" or "to Airtable" so Leo knows which integration to use

## Troubleshooting

### Connection Issues

* **Check access token** - Verify your personal access token is correct
* **Token permissions** - Ensure your token has access to the bases and tables you need
* **Base ID** - Make sure you're using the correct base ID

### Data Not Showing

* **Check table name** - Verify the table name or ID is correct
* **Field names** - Ensure field names match exactly (case-sensitive)
* **Permissions** - Verify your token has read access to the base

### Can't Save Data

* **Write permissions** - Ensure your token has write access
* **Field types** - Check that data types match field types in Airtable
* **Required fields** - Make sure all required fields are provided

<CardGroup cols={2}>
  <Card title="Working with Integrations" icon="plug" href="/integrations/working-with-integrations">
    Learn how to use integrations effectively
  </Card>

  <Card title="Network Monitor" icon="activity" href="/features/network-monitor">
    Debug Airtable API calls
  </Card>
</CardGroup>
