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

# Airtable Integration

> Use Airtable as your database

## What is Airtable?

Airtable is like a spreadsheet and database combined. It's super easy to use - you can see your data in a visual table, add attachments, and organize everything beautifully.

**Perfect for:**

* Visual content management
* Product catalogs
* Customer databases
* Project management
* Anything where you want to see data in a table

## What You'll Need

<Steps>
  <Step title="Airtable Account">
    Sign up at [airtable.com](https://airtable.com) - free plan available!
  </Step>

  <Step title="Create a Base">
    Like a database with tables
  </Step>

  <Step title="API Key">
    Get your personal access token
  </Step>

  <Step title="A good initial prompt">
    A concise prompt goes a long way in minimizing iterations to implement the feature
  </Step>
</Steps>

## Step 1: Set Up Airtable

### Create Account

1. Go to [airtable.com](https://airtable.com)
2. Click **Sign up**
3. Create your account (free)

### Create a Base (Database)

1. Click **Create a base**
2. Choose **Start from scratch**
3. Name it (like "My App Data")
4. You'll see a spreadsheet-like table

### Design Your Tables

**Example: Product Catalog**

1. Rename the table to "Products"
2. Add columns:
   * Name (text)
   * Description (long text)
   * Price (number)
   * Image (attachment)
   * In Stock (checkbox)
   * Category (single select)
3. Add some sample data by clicking in cells

<Tip>
  **Visual and Easy!** Airtable shows your data like a spreadsheet. You can see everything at a glance.
</Tip>

### Get Your API Credentials

1. Click your **profile icon** (top right)
2. Go to **Developer hub**
3. Click **Create new token**
4. Give it a name (like "My App")
5. Add scopes:
   * `data.records:read`
   * `data.records:write`
   * `schema.bases:read`
6. Choose which bases to access
7. Click **Create token**
8. **Copy the token immediately!**

<Warning>
  \*\*Save your token - \*\*It's shown only once.
</Warning>

### Get Your Base ID

1. Go to [airtable.com/api](https://airtable.com/api)
2. Click on your base
3. Copy the **Base ID** (starts with `app`)

## Step 2: Tell the Agent What You Want

Describe your use case:

### Example 1: Product Catalog

```
I want to use Airtable as my product database.

Airtable credentials:
- Personal Access Token: [paste token]
- Base ID: appXXXXXXXXXXXXXX
- Table name: Products

Columns in my table:
- Name
- Description
- Price
- Image
- Category
- In Stock

Features:
- Display all products on homepage
- Filter by category
- Show product details page
- Update stock status

Please set this up.
```

### Example 2: Content Management

```
Use Airtable to manage blog content.

Airtable credentials:
- Personal Access Token: [paste token]
- Base ID: appXXXXXXXXXXXXXX
- Table name: Blog Posts

Columns:
- Title
- Content
- Author
- Published (checkbox)
- Featured Image
- Category
- Published Date

Features:
- List all published posts
- View individual posts
- Filter by category
- Author pages

Please build this.
```

### Example 3: Customer Database

```
Manage customers in Airtable.

Airtable credentials:
- Personal Access Token: [paste token]
- Base ID: appXXXXXXXXXXXXXX
- Table name: Customers

Columns:
- Name
- Email
- Phone
- Company
- Status (dropdown)
- Notes
- Last Contact Date

Features:
- View all customers
- Add new customers
- Update customer info
- Search customers
- Filter by status

Please set this up.
```

<Tip>
  **That's it!** The agent will connect to Airtable and sync your data.
</Tip>

## Step 3: Test the Connection

After setup:

<Steps>
  <Step title="Click Preview">
    In Emergent, click **Preview**
  </Step>

  <Step title="Check Data Display">
    You should see data from your Airtable
  </Step>

  <Step title="Add Test Record">
    Try adding something in your app
  </Step>

  <Step title="Check Airtable">
    Go to Airtable - see the new record!
  </Step>

  <Step title="Update in Airtable">
    Change something in Airtable
  </Step>

  <Step title="Refresh App">
    Should see the changes
  </Step>
</Steps>

## Common Questions

<AccordionGroup>
  <Accordion title="How much does Airtable cost?">
    **Free plan:**

    * 1,000 records per base
    * Unlimited bases
    * 2 GB attachments
    * Great for small projects!

    **Plus:** \$10/user/month

    * 5,000 records per base
    * More features

    **Pro:** \$20/user/month

    * 50,000 records per base
    * Advanced features
  </Accordion>

  <Accordion title="Can I add images/files?">
    Yes! In Airtable:

    1. Add an "Attachment" column
    2. Upload images/files
    3. Your app will access them

    Tell the agent:

    ```
    Display images from Airtable attachment field.
    Show thumbnails in grid.
    ```
  </Accordion>

  <Accordion title="Can users edit data from my app?">
    Yes! Tell the agent:

    ```
    Let users:
    - Add new records
    - Edit existing records  
    - Delete records

    Add forms and edit interfaces.
    ```
  </Accordion>

  <Accordion title="Airtable vs regular database?">
    **Use Airtable if:**

    * Want visual data management
    * Need to manually edit data often
    * Like spreadsheet interface
    * Small to medium data (under 50k records)

    **Use traditional database if:**

    * Very large data
    * Complex queries
    * High performance needs
  </Accordion>
</AccordionGroup>

## Something Not Working?

### Can't Connect

**Tell the agent:**

```
Can't connect to Airtable. Error:
[paste error]

Can you check:
1. Access token is correct
2. Base ID is correct
3. Token has proper permissions
```

### Data Not Showing

**Tell the agent:**

```
Connected but no data appears.

Table name in Airtable: [exact name]
Columns: [list them]

Can you debug this?
```

### Can't Add Records

**Tell the agent:**

```
Can read data but can't add new records.

Error: [paste error]

Can you check write permissions?
```

## Real Examples

### Example 1: Restaurant Menu

```
Use Airtable for restaurant menu.

Airtable credentials: [will provide]
Table: Menu Items

Columns:
- Dish Name
- Description  
- Price
- Photo
- Category (Appetizers, Mains, Desserts)
- Available (yes/no)
- Spicy Level

Features:
- Display menu by category
- Show only available items
- Filter by spicy level
- Beautiful image gallery

Please build this.
```

### Example 2: Team Directory

```
Team directory with Airtable.

Airtable credentials: [will provide]
Table: Team Members

Columns:
- Name
- Role
- Department
- Email
- Phone
- Photo
- Bio
- LinkedIn

Features:
- Grid of team members
- Filter by department
- Individual profile pages
- Contact buttons

Please set this up.
```

## Advanced Features

Once basics work:

### Linked Records

```
I have two tables in Airtable:
- Orders
- Customers

Orders table links to Customers.
Show customer info with each order.
```

### Formulas

```
My Airtable has formula fields.
Make sure to fetch and display those calculated values.
```

### Views

```
I have different views in Airtable:
- All Products
- In Stock Only
- By Category

Let users switch between these views.
```

## Quick Checklist

Before going live:

* Data displays correctly
* Images/attachments show up
* Can add new records (if needed)
* Can edit records (if needed)
* Filters work properly
* Tested with real data
* Check Airtable record limits

## Remember

**Super visual** - See your data like a spreadsheet

**Easy to manage** - Edit data directly in Airtable

**Free tier is good** - 1,000 records per base

**Great for non-technical teams** - Anyone can update content

**Perfect for small to medium data** - Not for huge datasets

<Info>
  Stuck? Tell the agent: "I need help with Airtable integration" and describe the issue.
</Info>
