> For the complete documentation index, see [llms.txt](https://learn.mechanic.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://learn.mechanic.dev/core/actions/integrations/airtable.md).

# Airtable

The Airtable action allows you to create and update tables and records in your Airtable bases.

It provides an authenticated client for HTTP calls to the [Airtable API](https://airtable.com/developers/web/api). The various Airtable API methods supported by this integration all share the same top-level structure in the action options.

## Options

<table><thead><tr><th width="182.33333333333334">Option</th><th width="88">Type</th><th>Description</th></tr></thead><tbody><tr><td>account</td><td>string</td><td>Required: the Airtable account to use. Must match one of the Airtable accounts linked in the Mechanic authentication settings.</td></tr><tr><td>method</td><td>string</td><td>Required: the HTTP verb as required by the Airtbale API for the specific method (e.g. "GET", "POST")</td></tr><tr><td>url_path</td><td>string</td><td>Required: the Airtbale API endpoint (e.g. "/v0/meta/bases/AIRTABLE_BASE_ID/tables")</td></tr><tr><td>headers</td><td>hash</td><td>Required: "Content-Type": "application/json"</td></tr><tr><td>body</td><td>hash</td><td>Required: the object that contains a JSON representation of the properties and content of the table, record, or fields being modified</td></tr></tbody></table>

### Supported API Permissions

This integration supports these Airtable API scopes.

* Read/Write Records
* Read/Write Comments
* Read/Write Base Schema

## Authentication

This action requires connecting an Airtable account with the appropriate permissions. To connect an account:

1. Go to **Settings → Authentication**
2. Select **Airtable** in the provider list
3. Follow the Airtable account connection flow

## Examples

### Create a New Table

```liquid
{% action "airtable" %}
  {
    "account": "AIRTABLE_ACCOUNT_NAME",
    "method": "POST",
    "url_path": "/v0/meta/bases/AIRTABLE_BASE_ID/tables",
    "headers": {
      "Content-Type": "application/json"
    },
    "body": {
      "name": "Example Checklist",

      "fields": [
        {
          "name": "TODO",
          "type": "singleLineText"
        },
        {
          "name": "Complete",
          "type": "checkbox",
          "options": {
            "color": "greenBright",
            "icon": "check"
          }
        }
      ]
    }
  }
{% endaction %}
```

### Add Records to a Table

```liquid
{% action "airtable" %}
  {
    "account": "AIRTABLE_ACCOUNT_NAME",
    "method": "POST",
    "url_path": "/v0/meta/bases/AIRTABLE_BASE_ID/AIRTABLE_TABLE_ID",
    "headers": {
      "Content-Type": "application/json"
    },
    "body": {
      "records": [
        {
          "fields": {
            "TODO": "Review Mechanic",
            "Complete": false
          }
        }
      ]
    }
  }
{% endaction %}
```

## Action Response

The body of the action response will vary based on which Airtable API method was called. Generally, the response is an object with the following structure (most fields removed for brevity). Running an Airtable action task and reviewing the response is often the best way to see what will be returned in the body.

```json
{
  "type": "airtable",
  "run": {
    "ok": true,
    "result": {
      "status": 200,
      "body": {
        ...
      }
    }
  }
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://learn.mechanic.dev/core/actions/integrations/airtable.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
