Source: https://cli.nylas.com/guides/email-to-airtable

# Send Email to Airtable from the Terminal

Airtable is the database teams reach for when a spreadsheet isn't enough, and a lot of what fills it starts as email. The default bridge is a Zapier task billed per record. The Nylas CLI gives you the inbox as JSON; the Airtable API creates records with your fields mapped. This guide builds an email-to-Airtable pipeline that maps sender, subject, and date to columns, batches up to ten records per call, and runs on a schedule for free.

Written by [Hazik](https://cli.nylas.com/authors/hazik) Director of Product Management

Updated June 8, 2026

> **TL;DR:** Pull messages with `nylas email search --json`, map each to an Airtable `fields` object with `jq`, and POST to the Airtable API records endpoint. The API accepts up to 10 records per request, so batch them. The CLI handles the inbox across six providers; jq handles the field mapping; the Airtable API handles the write — no Zapier and no per-record fee.

Command references used in this guide: [`nylas email search`](https://cli.nylas.com/docs/commands/email-search), [`nylas email list`](https://cli.nylas.com/docs/commands/email-list), and [`nylas email read`](https://cli.nylas.com/docs/commands/email-read).

## How do you send email to Airtable?

You send email to Airtable by pulling the messages as JSON and POSTing them as records to a table. The CLI returns structured messages with `nylas email search --json`, and the Airtable API creates records when you POST a `records` array to the base-and-table endpoint. The create-records contract, including the 10-records-per-request limit, is in the [Airtable Web API reference](https://airtable.com/developers/web/api/create-records).

You'll need a personal access token scoped to the base and the base and table IDs, both visible in the API docs for your base. Field names in your request must match the table's columns exactly, since Airtable rejects unknown fields. With those in hand, each message maps to one record.

```bash
# Pull the messages to file into Airtable
nylas email search "subject:application newer_than:1d" --json --limit 50 > apps.json
```

## How do you map a message to Airtable fields?

Map each message to a `fields` object whose keys are your column names. A row of Subject, Sender, and Received maps directly from the message's subject, from-address, and date. Build the records array with `jq`, wrapping each message under a `fields` key so the output matches the API's expected body shape exactly.

Batch up to ten records per call to stay within the API limit and cut round trips — filing 50 messages is five requests, not 50. Use jq's `_nwise` or a chunking loop to split the array into tens. Null-safe fallbacks keep a missing subject from creating a record Airtable rejects for a type mismatch.

```bash
BASE="appXXXX"; TABLE="Applications"
jq -c '[.[] | {fields: {Subject: (.subject // "(no subject)"),
                        Sender: (.from[0].email // "")}}]
        | _nwise(10)' apps.json | while read -r batch; do
  curl -s -X POST "https://api.airtable.com/v0/$BASE/$TABLE" \
    -H "Authorization: Bearer $AIRTABLE_TOKEN" \
    -H "Content-Type: application/json" \
    -d "{\"records\": $batch}"
done
```

## How do you avoid duplicate records?

Avoid duplicates by storing the message ID in a field and skipping any message already present. The simplest version scopes the search to `newer_than:1d` and runs daily, so each run only sees the last day's mail and can't re-import older records. For exactness, query Airtable for the message ID before creating, or use an upsert by a unique field.

Run the pipeline on a schedule — cron, CI, or a Kubernetes CronJob — to keep the base current. A daily job that files new applications costs nothing per record, unlike a per-task automation. The Airtable token is separate from the mailbox grant, so scope it to just the one base and rotate it independently.

## Next steps

- [Email to Notion](https://cli.nylas.com/guides/email-to-notion) — the same pattern into a Notion database
- [Log email to Google Sheets](https://cli.nylas.com/guides/email-to-google-sheets) — a spreadsheet target
- [Extract email data with jq](https://cli.nylas.com/guides/extract-email-data-jq) — the JSON-shaping toolkit
- [CRM email workflows](https://cli.nylas.com/guides/crm-email-workflows) — file threads into a CRM instead
- [Email to Discord](https://cli.nylas.com/guides/email-to-discord-notifications) — post email to a channel via webhook
- [Full command reference](https://cli.nylas.com/docs/commands) — every flag and subcommand documented
