Categorize Airtable invoices with OpenAI and TOON token optimization — n8n 工作流
概览
> ⚠️ Notice:
> This workflow uses the CustomJS JSON to TOON node from CustomJS, which requires a self-hosted n8n instance and a CustomJS API key.
This workflow demonstrates how to automatically categorize invoices from Airtable using OpenAI, while significantly reducing token usage by converting structured data into TOON (Token-Optimized Object Notation) before sending it to the LLM.
Instead of passing large, nested JSON payloads (clients, invoices, invoice items) directly to OpenAI,
使用的节点
AirtableOpenAI
工作流预览
OpenAI Enhancement
J
JSON to TOON
⚡
W
When clicking ‘Execute w…
Get Ready Invoices
Get Clients
Get Invoice Items
A
Aggregate
L
Loop Over Items
Update record
M
Map Fields
G
GroupClientAndInvoice
T
TOON to JSON
12 nodes12 edges
工作原理
- 1
触发器
工作流由 触发器 触发器启动。
- 2
处理
数据流经 12 个节点, connecting @custom-js/n8n-nodes-pdf-toolkit.jsontotoon, @custom-js/n8n-nodes-pdf-toolkit.toontojson, aggregate。
- 3
输出
工作流完成自动化并将结果发送到配置的目标。
节点详情 (12)
AI#1
Airtable
airtable
OP#2
OpenAI
n8n-nodes-langchain.openAi
如何导入此工作流
- 1点击右侧 下载 JSON 按钮保存工作流文件。
- 2打开你的 n8n 实例,依次点击 工作流 → 新建 → 从文件导入。
- 3选择下载的
categorize-airtable-invoices-with-openai-and-toon-token-optimization文件并点击导入。 - 4为每个服务节点配置 凭证(API 密钥、OAuth 等)。
- 5点击 测试工作流 验证一切正常,然后激活它。
或直接在 n8n → 从 JSON 导入 中粘贴:
{ "name": "Categorize Airtable invoices with OpenAI and TOON token optimization", "nodes": [...], ...}
集成
@custom-js/n8n-nodes-pdf-toolkit.jsontotoon@custom-js/n8n-nodes-pdf-toolkit.toontojsonaggregateairtablemanualtriggeropenaisetsplitinbatches
创建者
CustomJS
@customjs
标签
@custom-js/n8n-nodes-pdf-toolkit.jsontotoon@custom-js/n8n-nodes-pdf-toolkit.toontojsonaggregateairtablemanualtriggeropenaisetsplitinbatches