An Airtable API mock for updating account health.

Your agent finds Helix Manufacturing in Accounts and changes Health from At risk to Watch. Read the same record back to check Name and Health; the trace checks the update and read calls.

Connect your agent
The test
  • account_updated_and_read

    Calls each of PATCH /v0/*/Accounts/* and GET /v0/*/Accounts/*

Starting records

  • bases / Customer Success / tables / Accounts / fields

    name
    Name
  • bases / Customer Success / tables / Accounts / records

    Name
    Helix Manufacturing
    Health
    At risk
  • bases / Customer Success / tables / Accounts / fields

    name
    Health

Connect your agent to the Airtable mock

When ancha runs your agent, it sets:

  • AIRTABLE_API_URL
  • AIRTABLE_ENDPOINT_URL
  • AIRTABLE_API_KEY

Point the client you already use at them.

const airtable = (path: string, init: RequestInit = {}) => fetch(process.env.AIRTABLE_API_URL + path, { ...init, headers: { Authorization: 'Bearer ' + process.env.AIRTABLE_API_KEY, 'Content-Type': 'application/json' } }).then(r => r.json());
const { bases } = await airtable('/meta/bases');
const crm = bases.find((base: any) => base.name === 'Customer Success');
const { records } = await airtable('/' + crm.id + '/Accounts?filterByFormula=' + encodeURIComponent("{Name} = 'Helix Manufacturing'"));
const account = records[0];
if (account.fields.Health !== 'At risk') throw new Error('Expected Health: At risk');
const path = '/' + crm.id + '/Accounts/' + account.id;
await airtable(path, { method: 'PATCH', body: JSON.stringify({ fields: { Health: 'Watch' } }) });
const updated = await airtable(path);
if (updated.fields.Name !== 'Helix Manufacturing' || updated.fields.Health !== 'Watch') throw new Error('Expected Helix Manufacturing with Health: Watch');

Locally, ancha runs your agent as an ordinary process, so keep real Airtable credentials out of its environment.

See all 21 endpoints

{baseId}

GET/v0/{baseId}/{tableIdOrName}
POST/v0/{baseId}/{tableIdOrName}
PUT/v0/{baseId}/{tableIdOrName}
PATCH/v0/{baseId}/{tableIdOrName}
DELETE/v0/{baseId}/{tableIdOrName}
GET/v0/{baseId}/{tableIdOrName}/{recordId}
PUT/v0/{baseId}/{tableIdOrName}/{recordId}
PATCH/v0/{baseId}/{tableIdOrName}/{recordId}
DELETE/v0/{baseId}/{tableIdOrName}/{recordId}
GET/v0/{baseId}/{tableIdOrName}/{recordId}/comments
POST/v0/{baseId}/{tableIdOrName}/{recordId}/comments
PATCH/v0/{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId}
DELETE/v0/{baseId}/{tableIdOrName}/{recordId}/comments/{rowCommentId}
POST/v0/{baseId}/{tableIdOrName}/listRecords

meta

GET/v0/meta/bases
GET/v0/meta/bases/{baseId}/tables
POST/v0/meta/bases/{baseId}/tables
POST/v0/meta/bases/{baseId}/tables/{tableId}/fields
PATCH/v0/meta/bases/{baseId}/tables/{tableId}/fields/{columnId}
PATCH/v0/meta/bases/{baseId}/tables/{tableIdOrName}
GET/v0/meta/whoami

Seed your own data

The data the Airtable mock starts with on every run, cut to a few records. ancha twins seed airtable prints every field.

Full seed YAML
twins:
  - airtable
seed:
  airtable:
    user:
      name: Ancha Assistant
      email: ancha@acme.example
    bases:
      - name: Customer Success
        tables:
          - name: Accounts
            fields:
              - name: Name
                type: singleLineText
              - name: Health
                type: singleSelect
                choices:
                  - Healthy
                  - Watch
                  - At risk
            records:
              - fields:
                  Name: Helix Manufacturing
                  Health: At risk

Check what your agent did

Checks YAML
checks:
  - id: account_updated_and_read
    trace:
      called:
        - PATCH /v0/*/Accounts/*
        - GET /v0/*/Accounts/*

More docs and files tools

All 43 tools

Airtable API mock FAQ

Can an Airtable API mock filter records with a formula?

Ancha evaluates filterByFormula against the table's records and combines it with a selected view's filter. Use sort to order the matching records before pagination.

Are Airtable formula and rollup values calculated when I read a record?

The mock evaluates formula fields from their formulas when it builds the record response. A rollup evaluates its formula over linked records, and count returns the number of linked records.

What happens when an Airtable query needs more than one page?

Set pageSize from 1 to 100 and pass the returned offset into the next request. The mock ties that offset to the table, view, formula and sort; changing those inputs can return 422 LIST_RECORDS_ITERATOR_NOT_AVAILABLE.

Install the CLI and run your agent against the Airtable mock.

Book a demo

Ancha is not affiliated with Airtable.