Categorize Airtable invoices with OpenAI and TOON token optimization — n8n Workflow
Overview
> ⚠️ 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,
Nodes used
Workflow Preview
How it Works
- 1
Trigger
The workflow starts with a trigger trigger.
- 2
Process
Data flows through 12 nodes, connecting @custom-js/n8n-nodes-pdf-toolkit.jsontotoon, @custom-js/n8n-nodes-pdf-toolkit.toontojson, aggregate.
- 3
Output
The workflow completes its automation and delivers the result to the configured destination.
Node Details (12)
Airtable
airtable
OpenAI
n8n-nodes-langchain.openAi
How to Import This Workflow
- 1Click Download JSON button on the right to save the workflow file.
- 2Open your n8n instance. Go to Workflows → New → Import from file.
- 3Select the downloaded
categorize-airtable-invoices-with-openai-and-toon-token-optimizationfile and click Import. - 4Set up credentials for each service node (API keys, OAuth, etc.).
- 5Click Test Workflow to verify everything works, then activate it.
Or paste directly in n8n → Import from JSON:
Integrations
Created by
CustomJS
@customjs
Tags
New to n8n?
n8n is a free, open-source workflow automation tool. Self-host it or use the cloud version.
Get n8n Free →