Skip to content

Productivity

Google Sheets, Notion, Airtable, and Stripe integrations.

10 modules

ModuleDescription
Googleスプレッドシート読み込みGoogleスプレッドシートからデータを読み込む
Googleスプレッドシート書き込みGoogleスプレッドシートにデータを書き込む
Notionページ作成Notionデータベースに新しいページを作成する
Notionデータベースクエリフィルターとソートを使用してNotionデータベースからページをクエリする
Stripe 支払い作成Stripeで支払いインテントを作成
Stripe 顧客取得Stripeから顧客情報を取得
Stripe 請求一覧Stripeから最近の請求を一覧表示
Airtable レコード作成Airtableテーブルに新しいレコードを作成
Airtable レコード読み取りAirtableテーブルからレコードを読み取り
Airtable レコード更新Airtableテーブルの既存レコードを更新

Modules

Googleスプレッドシート読み込み

api.google_sheets.read

Googleスプレッドシートからデータを読み込む

Parameters:

NameTypeRequiredDefaultDescription
credentialsobjectNo-Googleサービスアカウントの認証情報JSON(デフォルト: env.GOOGLE_CREDENTIALS_JSON)
spreadsheet_idstringYes-GoogleスプレッドシートID(URLから取得)
rangestringYes-読み込むA1表記の範囲
include_headerbooleanNoTrue最初の行をカラムヘッダーとして解析する

Output:

FieldTypeDescription
valuesarray値の配列
dataarray行の配列(各行は値の配列)
row_countnumber行数

Example: Read with headers

yaml
spreadsheet_id: 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
range: Sheet1!A1:D100
include_header: true

Googleスプレッドシート書き込み

api.google_sheets.write

Googleスプレッドシートにデータを書き込む

Parameters:

NameTypeRequiredDefaultDescription
credentialsobjectNo-Googleサービスアカウントの認証情報JSON(デフォルト: env.GOOGLE_CREDENTIALS_JSON)
spreadsheet_idstringYes-GoogleスプレッドシートID(URLから取得)
rangestringYes-書き込むA1表記の範囲
valuesarrayYes-書き込む値の2次元配列
value_input_optionstringNoUSER_ENTERED入力値の解釈方法

Output:

FieldTypeDescription
updated_rangestring更新された範囲
updated_rowsnumber更新された行数
updated_columnsnumber更新されたカラム数
updated_cellsnumber更新されたセル数

Example: Write data with headers

yaml
spreadsheet_id: 1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms
range: Sheet1!A1
values: [["Name", "Email", "Status"], ["John Doe", "john@example.com", "Active"], ["Jane Smith", "jane@example.com", "Active"]]

Notionページ作成

api.notion.create_page

Notionデータベースに新しいページを作成する

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Notion統合トークン(デフォルト: env.NOTION_API_KEY)
database_idstringYes-NotionデータベースID(32文字の16進文字列)
propertiesobjectYes-ページプロパティ(タイトル、テキスト、選択など)
contentarrayNo-ページコンテンツ(Notionブロック)

Output:

FieldTypeDescription
page_idstring作成されたページID
urlstringページURL
created_timestring作成日時

Example: Create task page

yaml
database_id: your_database_id
properties: {"Name": {"title": [{"text": {"content": "New Task"}}]}, "Status": {"select": {"name": "In Progress"}}, "Priority": {"select": {"name": "High"}}}

Notionデータベースクエリ

api.notion.query_database

フィルターとソートを使用してNotionデータベースからページをクエリする

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Notion統合トークン(デフォルト: env.NOTION_API_KEY)
database_idstringYes-NotionデータベースID
filterobjectNo-クエリのフィルター条件
sortsarrayNo-結果のソート順
page_sizenumberNo100返す結果の数

Output:

FieldTypeDescription
resultsarrayページオブジェクトの配列
countnumber結果数
has_moreboolean追加結果があるかどうか

Example: Query all pages

yaml
database_id: your_database_id

Example: Query with filter

yaml
database_id: your_database_id
filter: {"property": "Status", "select": {"equals": "In Progress"}}
sorts: [{"property": "Created", "direction": "descending"}]

Stripe 支払い作成

payment.stripe.create_payment

Stripeで支払いインテントを作成

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)
amountnumberYes-Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)
currencystringNousd金額(セント単位、例: $10.00の場合は1000)
descriptionstringNo-3文字の通貨コード(例: usd, eur)
customerstringNo-支払いの説明

Output:

FieldTypeDescription
idstringStripe顧客ID(任意)
amountnumberStripe顧客ID(任意)
currencystring一意の識別子
statusstring支払い金額
client_secretstring通貨コード

Example: Create $50 payment

yaml
amount: 5000
currency: usd
description: Product purchase

Example: Create payment for customer

yaml
amount: 2999
currency: usd
customer: cus_XXXXXXXXXXXXXXX
description: Subscription payment

Stripe 顧客取得

payment.stripe.get_customer

Stripeから顧客情報を取得

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)
customer_idstringYes-Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)

Output:

FieldTypeDescription
idstringUnique identifier
emailstringEmail address
namestringName of the item
creatednumberCreation timestamp
balancenumberAccount balance

Example: Get customer info

yaml
customer_id: cus_XXXXXXXXXXXXXXX

Stripe 請求一覧

payment.stripe.list_charges

Stripeから最近の請求を一覧表示

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)
limitnumberNo10Stripeシークレットキー(または環境変数 STRIPE_API_KEY を使用)
customerstringNo-顧客IDでフィルタ(任意)

Output:

FieldTypeDescription
chargesarrayThe charges
countnumberNumber of items
has_morebooleanThe has more

Example: List recent charges

yaml
limit: 20

Example: List customer charges

yaml
customer: cus_XXXXXXXXXXXXXXX
limit: 50

Airtable レコード作成

productivity.airtable.create

Airtableテーブルに新しいレコードを作成

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
base_idstringYes-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
table_namestringYes-AirtableベースID
fieldsjsonYes-テーブル名

Output:

FieldTypeDescription
idstringUnique identifier
createdTimestringRecord creation timestamp
fieldsjsonThe fields

Example: Create customer record

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Customers
fields: {"Name": "John Doe", "Email": "john@example.com", "Status": "Active"}

Example: Create task

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Tasks
fields: {"Title": "Review PR", "Assignee": "Alice", "Priority": "High"}

Airtable レコード読み取り

productivity.airtable.read

Airtableテーブルからレコードを読み取り

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
base_idstringYes-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
table_namestringYes-AirtableベースID
viewstringNo-テーブル名
max_recordsnumberNo100使用するビュー名(任意)

Output:

FieldTypeDescription
recordsarray返すレコードの最大数
countnumberレコード

Example: Read all customers

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Customers
max_records: 100

Example: Read from specific view

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Tasks
view: Active Tasks
max_records: 50

Airtable レコード更新

productivity.airtable.update

Airtableテーブルの既存レコードを更新

Parameters:

NameTypeRequiredDefaultDescription
api_keystringNo-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
base_idstringYes-Airtable APIキー(または環境変数 AIRTABLE_API_KEY を使用)
table_namestringYes-AirtableベースID
record_idstringYes-テーブル名
fieldsjsonYes-更新するレコードのID

Output:

FieldTypeDescription
idstringUnique identifier
fieldsjsonThe fields

Example: Update customer status

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Customers
record_id: recXXXXXXXXXXXXXX
fields: {"Status": "Inactive"}

Example: Update task

yaml
base_id: appXXXXXXXXXXXXXX
table_name: Tasks
record_id: recYYYYYYYYYYYYYY
fields: {"Status": "Completed", "Completed Date": "2024-01-15"}

Released under the Apache 2.0 License.