Skip to main content
skill CX Codex GP ChatGPT official · OpenAI

airtable-filters — Codex skill: what it does, how to install

Instructs the agent on structuring JSON filters for Airtable MCP tools. Useful for querying and narrowing down records by field values.

Install into Codex · Skills CLI (Vercel) All methods and platforms ↓
npx skills add openai/plugins --skill airtable-filters -a codex
Open on GitHub

What airtable-filters does

The skill explains how to build the filters parameter accepted by Airtable MCP tools. When the user asks to find or narrow down records, the agent uses this specification to structure its query. Top-level conditions combine with AND by default unless an explicit OR operator is set.

Filtering requires checking the table schema first. The first operand in every condition must be an explicit field ID rather than a column name. Select fields also require choice IDs like selABCDEFGHIJKLM instead of plain text options. Dates require date objects with an explicit timeZone.

The guide directs the agent to send a single composed filter rather than splitting criteria across multiple API calls. It covers nested logic, such as placing OR inside AND or matching collaborator group members using matchGroupsByMembership.

What it helps with

  • build structured MCP filter objects for Airtable records
  • query Airtable fields using IDs and specialized operators
  • combine nested AND and OR logic in a single call

Example prompts for the agent

  • Find all records in the Projects table where Status is Approved or priority exceeds 4
  • Show Airtable entries containing image attachments and updated this month
  • Filter customers with an active subscription and a non-empty phone number

How to install airtable-filters

1Skills CLI (Vercel)

npx skills add openai/plugins --skill airtable-filters -a codex

2Manually: put the files in place

.agents/skills/airtable-filters/SKILL.md

For all projects use ~/.agents/skills/

Step by step, with commands for each platform: Codex skills: how to install, where they live, how to call them

Questions about airtable-filters

How to install airtable-filters in Codex?

Run npx skills add openai/plugins --skill airtable-filters -a codex. The skill will be placed in .agents/skills/airtable-filters/SKILL.md.

What does airtable-filters do?

It teaches the agent the schema and operator rules for building the filters argument in Airtable MCP tools.

Why does the skill require checking the table schema before filtering?

The Airtable MCP schema expects internal field IDs and choice IDs rather than display names. The agent must inspect the table structure to retrieve those identifiers before constructing the query.

Source text

SKILL.md · MIT
---
name: airtable-filters
description: Use this skill when the user wants to find, filter, or narrow down Airtable records by field values, even when they don't explicitly say "filter."
license: MIT
metadata:
  version: '1.0.0'
  author: airtable
---

# Airtable MCP Filters

MCP tools that list or display records from tables or interface pages accept an optional `filters` parameter, using the same schema.

When querying records from an interface page, these filters are combined with the page's built-in filters using AND.

## Schema shape

When no top-level `operator` is specified, conditions are combined with AND. The first element in a condition's `operands` array is always a **field ID** — look up the table's schema to find field IDs before filtering.

## Field type categories

-   **Text-like**: singleLineText, multilineText, email, url, phoneNumber, richText, barcode
-   **Numeric**: number, percent, currency, rating, duration, autoNumber, count
-   **Date**: date, dateTime, createdTime, lastModifiedTime
-   **Single select**: singleSelect
-   **Multiple selects**: multipleSelects
-   **Single collaborator**: singleCollaborator
-   **Multiple collaborators**: multipleCollaborators
-   **Linked records**: multipleRecordLinks
-   **Attachment**: multipleAttachments
-   **Checkbox**: checkbox

Computed fields (formula, rollup, lookup) support whichever operators match their result type.

## Comparison operators

| Operator                | Second operand                     | Field categories                                                                                                                   |
| ----------------------- | ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| `=`                     | string, number, boolean, choice ID | text-like, numeric, date, checkbox, single select, multiple selects, single collaborator, multiple collaborators, linked records   |
| `!=`                    | string, number, choice ID          | text-like, numeric, date, single select, single collaborator                                                                       |
| `<`, `>`, `<=`, `>=`    | number or date value object        | numeric, date                                                                                                                      |
| `contains`              | string                             | text-like, linked records                                                                                                          |
| `doesNotContain`        | string                             | text-like, linked records                                                                                                          |
| `doesNotContain`        | array of IDs                       | multiple selects, multiple collaborators                                                                                           |
| `isEmpty`, `isNotEmpty` | _(none)_                           | text-like, numeric, date, single select, multiple selects, single collaborator, multiple collaborators, linked records, attachment |
| `hasAnyOf`, `hasAllOf`  | array of IDs                       | multiple selects, multiple collaborators, linked records                                                                           |
| `isAnyOf`               | array of IDs                       | single select, single collaborator                                                                                                 |
| `isNoneOf`              | array of IDs                       | single select, single collaborator, linked records                                                                                 |
| `isWithin`              | date range object                  | date                                                                                                                               |
| `filename`, `fileType`  | string or `"image"`/`"text"`       | attachment                                                                                                                         |

When matching a field against multiple values, prefer dedicated operators (`isAnyOf`, `isNoneOf`, `hasAnyOf`, `hasAllOf`) over combining multiple `=` conditions with `or`/`and`, when those operators are available for the field type.

## Field-type rules

### Select fields

For select fields, operand values must be **choice IDs** (e.g., `"selABCDEFGHIJKLM"`), not display names. Look up the table's schema to find choice IDs before filtering.

### Collaborator fields

When filtering by a collaborator group ID, use `operatorOptions` to match individual members of the group instead of the literal group ID. See the tool's `operatorOptions` parameter for details.

Example operand: `{"operator": "hasAnyOf", "operands": ["fldCRi9oz2vRLcIWr", "ugpDUVUnftA7H9bG8"], "operatorOptions": {"matchGroupsByMembership": true}}`

### Attachment fields

Use `fileType` to filter attachments by type (e.g., `"image"`, `"text"`) rather than `isNotEmpty` when the user specifies a file type.

### Date fields

Date comparisons (`=`, `!=`, `<`, `>`, `<=`, `>=`) use a date value object instead of a raw date string, and `isWithin` uses a date range object. The tool schema defines the available modes for each. Always include `timeZone`.

## Composing conditions

A filter's top-level operands array can contain two or more conditions, which are combined with the top-level operator (AND by default). For simple multi-condition filters, this flat structure is sufficient.

When the logic requires mixing AND and OR, nest a filter object as one of the operands. Each nested filter has its own operator and operands.

**OR inside AND** — useful when one condition is fixed and another allows multiple alternatives:

> "Scripted videos that are either in Writing or Pre-Production"
> → Bucket = Scripted AND (Status = Writing OR Status = Pre-Production)

**AND inside OR** — useful when you want records matching either a simple condition or a combination:

> "Approved videos, or videos assigned to Bailey that are in Cut 2"
> → Status = Approved OR (Editor = Bailey AND Status = Cut 2 Ready)

When combining many conditions on different fields, prefer a flat AND rather than unnecessary nesting. Only nest when the logic genuinely requires mixed AND/OR at different levels.

Prefer composing all conditions into a single `filters` object rather than splitting them across multiple calls. A single call with a composed filter is more efficient and returns the correct result set directly.

## Examples

Filter where a text field equals "orange" OR a number field is greater than 5:

```json
{
    "operator": "or",
    "operands": [
        {"operator": "=", "operands": ["fld8WsrpLHHevsnW8", "orange"]},
        {"operator": ">", "operands": ["fldulcCPDVz87Bmnw", 5]}
    ]
}
```

Filter for records where a date field is within the past week:

```json
{
    "operands": [
        {
            "operator": "isWithin",
            "operands": ["fldABC12345678x", {"mode": "pastWeek", "timeZone": "America/New_York"}]
        }
    ]
}
```

© airtable · MIT · openai/plugins

Similar skills

All skills for Data and databases →

From the same set596

The whole set →
boltz-protein-screen Ranks existing proteins, peptides, antibodies and nanobodies against a target through the Boltz API. Not for designing new proteins or screening small molecules. CX Codex GP ChatGPT ★ 7,604repo stars boltz-protein-design Designs de novo protein, peptide, and antibody binders for target structures via Boltz. Useful for candidate generation campaigns without manual scaffold crafting. CX Codex GP ChatGPT ★ 7,604repo stars boltz-check-status Check existing Boltz jobs, inspect their progress, and resume result downloads. This skill is for recovering prior runs, not submitting new ones. CX Codex GP ChatGPT ★ 7,604repo stars airtable-overview This skill gives the agent context on how Airtable is structured: bases, tables, fields, records, views, automations and interfaces. Useful before writing code against a base. CX Codex GP ChatGPT ★ 7,604repo stars airtable-cli This skill lets Codex inspect and change Airtable data through airtable-mcp. Use it for bases, tables, fields, records, searches, and filters. CX Codex GP ChatGPT ★ 7,604repo stars adobe-edit-quick-cut Generates three short video sizzle reel variations from raw footage using Adobe Quick Cut. Useful for trimming clips into highlights before detailed editing. CX Codex GP ChatGPT ★ 7,604repo stars adobe-design-from-template Find an Adobe Express template, edit its text, images, or background, then download the design as a PDF. Useful for posters, social posts, and business cards. CX Codex GP ChatGPT ★ 7,604repo stars adobe-create-social-variations Turns one image or video into platform-ready social media assets: crops, expands the canvas, exports at the right ratios. Useful when a single source has to cover several networks. CX Codex GP ChatGPT ★ 7,604repo stars

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor