スキル一覧に戻る
Evanston09

airtable-js

by Evanston09

Discord bot integrating with Ready, Set, App!'s Airtable

0🍴 0📅 2026年1月20日
GitHubで見るManusで実行

SKILL.md


name: airtable-js description: Read and query records from Airtable bases using the Airtable.js library. Use when working with Airtable data, including fetching records, filtering with formulas, sorting, pagination, and accessing field values. Triggers when users need to retrieve or query Airtable data, integrate Airtable into applications, or work with Airtable's API.

Airtable.js

Overview

Work with Airtable bases to read, query, and process records using the official Airtable.js library. This skill provides patterns for common operations like filtering, sorting, pagination, and handling different field types.

Quick Start

Basic record retrieval:

const Airtable = require('airtable');

Airtable.configure({
    apiKey: process.env.AIRTABLE_API_KEY
});

const base = Airtable.base(process.env.AIRTABLE_BASE_ID);

// Fetch all records
const records = await base('TableName').select().all();
records.forEach(record => {
    console.log(record.id, record.fields);
});

Common Operations

Read all records from a table

const records = await base('Projects').select().all();

Filter records with formula

const activeRecords = await base('Tasks').select({
    filterByFormula: "{Status} = 'Active'"
}).all();

Sort and limit results

const recentTasks = await base('Tasks').select({
    sort: [{field: "Created", direction: "desc"}],
    maxRecords: 10
}).all();

Get specific fields only

const records = await base('Contacts').select({
    fields: ['Name', 'Email', 'Phone']
}).all();

Pagination with large datasets

base('LargeTable').select({
    pageSize: 100
}).eachPage(
    function page(records, fetchNextPage) {
        records.forEach(record => {
            console.log(record.get('Name'));
        });
        fetchNextPage();
    },
    function done(err) {
        if (err) console.error(err);
    }
);

Accessing Field Values

const record = await base('Projects').find('recXXXXXXXXXXXXXX');

// Two ways to access fields
const name = record.get('Project Name');
const status = record.fields['Status'];

// Get record ID
const id = record.id;

// Get all fields
const allFields = record.fields;

Scripts

read_records.js

Command-line utility for reading Airtable records with filtering and sorting options.

# Basic usage
node scripts/read_records.js "TableName"

# With filters
node scripts/read_records.js "Tasks" --filter "{Status} = 'Active'"

# Sort and limit
node scripts/read_records.js "Projects" --sort "Created:desc" --max 10

# JSON output
node scripts/read_records.js "Contacts" --json

# Specific fields
node scripts/read_records.js "People" --fields "Name,Email,Phone"

Set environment variables AIRTABLE_API_KEY and AIRTABLE_BASE_ID, or pass via --api-key and --base options.

References

airtable_guide.md

Comprehensive reference covering:

  • Authentication and setup
  • All read operations with examples
  • Filtering formulas and patterns
  • Field type handling
  • Error handling and rate limiting
  • Working with linked records

Read this reference when implementing complex queries, working with specific field types, or troubleshooting issues.

スコア

総合スコア

50/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です