workflows.fit
Back to n8n workflows
n8n templateFreeBy CustomJS

Categorize Airtable invoices with OpenAI and TOON token optimization

> ⚠️ Notice: > This workflow uses the CustomJS JSON to TOON node from [CustomJS](https://www.customjs.space/integration/n8n/json-toon-converter), which requires a self-hosted n8n instance and a CustomJS API key....

Data & StorageAILangchainCore NodesOpen Ai@custom-js/n8n-nodes-pdf-toolkit.json To ToonManual TriggerSticky Note
Loading interactive preview...

Template notes

> ⚠️ Notice: > This workflow uses the CustomJS JSON to TOON node from [CustomJS](https://www.customjs.space/integration/n8n/json-toon-converter), which requires a self-hosted n8n instance and a CustomJS API key.

--- ![Categorizing Invoices With TOON.png](fileId:4012)

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, the workflow converts the data into TOON, lets the AI focus purely on semantic classification, and then converts the result back into clean JSON that can safely be written back to Airtable.

The result is a reliable, cost-efficient, and production-ready invoice categorization pipeline.

---

Why This Workflow?

Categorizing invoices based on free-text invoice items is a perfect AI use case — but sending raw JSON to LLMs is: