Airtable
List bases and schemas, list/find/get records (safely escaped formulas), create, update and upsert records (deletes are node only)
Beta v0.1.0 Node.js 10 actions
About
A Graphrt plugin for the official Airtable Web API. It lists bases and their schemas, lists, finds and reads records, and creates, updates, upserts and deletes records. Every operation is a workflow node, all except delete_records are also agent tools.
What it can do
- Bases: list the bases a token can access, read a base's tables, fields and views
- Reading: list_records (view, filter_by_formula, sort, fields, page size, max records), get_record
- find_records: match records on {"Field": value} without writing a formula, values are escaped so they can never change the formula (exact, case-insensitive or contains)
- Writing: create, update (PATCH) and upsert (merge on 1-3 fields) up to 10 records per call
- delete_records: workflow node only, so an agent can never delete records
- api_request: any other endpoint (GET only when called by an agent)
Actions
Each action is a step you can add to a workflow. Agents can also use most of them as tools.
- List bases
airtable-api.list_bases - Get base schema
airtable-api.get_base_schema - List records
airtable-api.list_records - Find records
airtable-api.find_records - Get record
airtable-api.get_record - Create records
airtable-api.create_records - Update records
airtable-api.update_records - Upsert records
airtable-api.upsert_records - Delete records
airtable-api.delete_records - Airtable API request
airtable-api.api_request
Settings
Graphrt starts plugins with a clean environment. Only these values reach the plugin, and secrets stay out of logs.
-
AIRTABLE_TOKENRequiredPersonal access token (pat...) -
AIRTABLE_BASE_IDOptionalDefault base (app...) when an operation has no base_id. When set, agent tools are limited to this base (see below) -
AIRTABLE_TOOL_ALLOWED_BASESOptionalExtra bases agent tools may use when AIRTABLE_BASE_ID is set, comma-separated (appA...,appB...), * allows any base -
AIRTABLE_API_TOOL_TOKEN_SOURCE
How to use it
In Graphrt Desktop
- Open Plugins and search for Airtable.
- Click Install and approve it.
- Follow the setup steps on the plugin's page, then paste the settings it needs.
- Describe a job that needs it, and the builder adds the steps.
With the CLI
terminal
$ graphrt plugin install airtable-api workflow.yaml
- id: existing
type: airtable-api.find_records
table: Leads
where: { Email: "{{#start.email#}}" }
match: case_insensitive
limit: 1
- id: save
type: airtable-api.upsert_records
table: Leads
fields_to_merge_on: [Email]
records: '[{"fields": {"Email": "{{#start.email#}}", "Name": "{{#start.name#}}", "Stage": "New"}}]'
typecast: true