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

# Airtable

> Send Airtable records into a Kerux campaign with an automation script, and update them from the campaign with the Airtable API.

> [!NOTE]
>
> **Pro plan.** Airtable works through a trigger URL, a connection and HTTP steps, which are part of Pro and Agency (and the free trial). Anything you already have keeps working on every plan. See [Plans and billing](/help/account/billing.md).

An Airtable automation posts new records to a Kerux campaign. Later, a **Webhook / HTTP** step updates the same record (for example **Status: Replied**) through Airtable's API.

> [!NOTE]
>
> **How it connects:** an Airtable automation script to Kerux's trigger URL, and Airtable's Web API with a personal access token. See Airtable's [update record](https://airtable.com/developers/web/api/update-record) docs (available on all Airtable plans, needs the `data.records:write` scope). Requests and answers follow Airtable's docs.

## Before you start

* **A personal access token:** in Airtable's **Builder hub > Personal access tokens**, create one with `data.records:read` and `data.records:write`, limited to your base.
* **The base id** (starts with `app`) and the table name.
* **A LinkedIn URL field** in the table.

## 1. Send records to a campaign

**1. Copy the Kerux trigger URL**

In Kerux, open the campaign, click **+ Add** on the **Trigger** half of the start box, choose **Incoming webhook (API)**, click **Add**, then **Copy link**.

**2. Add an automation in Airtable**

Trigger: **When record enters view** (for example a "Ready for LinkedIn" view). Action: **Run a script**, with inputs `recordId`, `linkedin`, `firstName`, `email`, `company` taken from the record.

**3. Paste the script**

Put your trigger URL in it:

```javascript theme={null}
const { recordId, linkedin, firstName, email, company } = input.config();
const res = await fetch("https://www.usekerux.com/t/YOUR_TRIGGER_TOKEN", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    linkedin_url: linkedin,
    first_name: firstName,
    email,
    company,
    custom: { airtable_id: recordId },
  }),
});
console.log(res.status, await res.text());
```

Kerux answers `202` with `{ "data": { "enrolled": 1, "already_in": 0, "lead_ids": ["..."] } }`. The record id is kept on the contact as `{{contact.custom.airtable_id}}`.

## 2. Connect Airtable in Kerux

In **Integrations > Connections**, click **Connect** on **Custom API** (under **Developers**): **How it signs in:** **Bearer token**, paste the token; **Base URL:** `https://api.airtable.com`. Click **Save**.

## 3. Update the record from the campaign

For example in the follow-up campaign the **When the contact replies** box sends contacts to (**Send to another campaign**), a **Webhook / HTTP** step with the Airtable connection:

```json theme={null}
{
  "method": "PATCH",
  "url": "/v0/YOUR_BASE_ID/YOUR_TABLE/{{contact.custom.airtable_id}}",
  "bodyType": "json",
  "body": { "fields": { "Status": "Replied" }, "typecast": true }
}
```

`PATCH` changes only the fields you send. `typecast` lets Airtable turn the text into a select option. Airtable answers with the record: `id`, `createdTime`, `fields`.

## Test with one contact

Move one record into the view and check the automation's run log shows `202`. Then click **Test** in the follow-up campaign's **Builder** to run **Test on one contact** and check the record.

## Common errors

> [accordion] 403 or INVALID\_PERMISSIONS
>
> The token lacks `data.records:write` or access to this base.

> [accordion] 422 from Airtable about a field
>
> The field name doesn't match the table, or a select option doesn't exist (add `typecast: true`).

> [accordion] 422 VALIDATION\_FAILED from Kerux
>
> The record had no LinkedIn URL. Filter the view on it.

Related: [Trigger URLs and forms](/help/developers/trigger-urls-and-forms.md), [Google Sheets](/help/integration-guides/google-sheets.md), [Notion](/help/integration-guides/notion.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.