This n8n workflow is designed to monitor and analyze the usage and associated costs of large language models (LLMs) within a workflow. It starts by retrieving a specific execution’s data, extracts all model names and usage details, standardizes model names, and verifies that models are correctly defined in cost and name dictionaries. The workflow calculates the token usage costs based on predefined prices per model, then summarizes the total, per-model, and per-node costs. It is particularly useful for organizations aiming to keep track of AI processing expenses in automated workflows, ensuring accurate cost management, billing, or optimization.
Automated LLM Usage & Cost Tracking in n8n
Node Count | 11 – 20 Nodes |
---|---|
Nodes Used | code, executeWorkflowTrigger, if, manualTrigger, merge, n8n, set, stickyNote, stopAndError |
Reviews
There are no reviews yet.