# Airtable

Collaborative database platform

- Category: APIs
- Runs in: the Phloem cloud

Lets Hamming read records from an Airtable base live, filtered and sorted as you ask.

## What Phloem reads
- **Tables and fields** — field names and types, select options, and links between tables
- **Records** — read live, filtered with an Airtable formula, sorted and limited

Read-only.

## What you need
- The **Base ID** (starts with `app`, in the base's URL).
- An Airtable personal access token with access to that base and these scopes:
  - `data.records:read` — required
  - `schema.bases:read` — lets Phloem list the base's tables and fields. Without it, you paste table IDs and Phloem guesses fields from sample records.

## Connect
1. In the console, open **Connectors**, choose **Add connector**, then **Airtable**.
2. Enter **Base ID** and **Personal Access Token**.
3. Pick the tables. With `schema.bases:read`, choose them from the list. Without it, paste **Table IDs**, one per line (`tblXXXXXXXX`, from the table's URL), and Phloem checks it can read them.
4. Name and save the connection.

## What Hamming can do
- **Query** — read records from a table, with an optional formula filter, sort and limit, e.g. `{"table": "Parts", "filter": "AND({Status}='Open')"}`
- **Sample** — a few records from a table

## Notes
- Connecting stops with a message if the token is invalid, cannot reach the base, or lacks `data.records:read`.

## Connection fields

| Field | Type | Required | Notes |
|---|---|---|---|
| Base ID | Text | Yes | Airtable Base ID (starts with 'app') |
| Personal Access Token | Secret | Yes | Airtable Personal Access Token |
| Table IDs | Text | No | Paste one Table ID per line — find them in the Airtable URL (tblXXXXXXXX). Only shown when your PAT can't list tables itself. |
