Block 1 - When chat message received
- Type / Role
- @n8n/n8n-nodes-langchain.chatTrigger - chatTrigger
- Config choices
- Version 1.1
This workflow is provided as-is. Please review and test before using in production.
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation I/O to Google Sheets for simple observability and billing. Perfect for Develo...
@n8n/n8n-nodes-langchain.chattrigger, @n8n/n8n-nodes-langchain.agent, n8n-nodes-base.googlesheetstool, n8n-nodes-base.stickynote, n8n-nodes-base.set, @n8n/n8n-nodes-langchain.code, n8n-nodes-base.if, n8n-nodes-base.googlesheets
This workflow is cataloged by N8N Workflows and links back to its original n8n.io source page by Hunyao.
Original n8n.io sourceWhat it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation I/O to Google Sheets for simple observability and billing.
Perfect for Developers adding usage monitoring to AI agents. Teams needing cost transparency in prototypes.
How it works
How to use SELF-HOSTED N8N ONLY - the Langchain Code node is only available in the self-hosted version of n8n. It is not available in n8n cloud.
Requirements Self-hosted version of n8n
If you have any questions in running the workflow, see the attached video: https://youtu.be/JSulRS128MA
This catalog entry is organized from the workflow JSON. The node-level section below shows the executable blocks available for review before importing the template.
| Workflow | Track OpenAI token usage and AI agent metrics with Google Sheets dashboard |
|---|---|
| Complexity | intermediate |
| Nodes | 9 |
| Categories | Engineering, Multimodal AI |
| Author | Hunyao |
| Published | 11 Aug 2025 |
Use the JSON export at /data/workflows/7231/7231.json as the source template for this automation.
Open n8n, import the downloaded JSON, and review each node before activating the workflow.
Replace placeholder credentials, API keys, webhook URLs, account IDs, and environment-specific values with your own settings.
Run the workflow manually or in a staging workspace, inspect node output, and confirm downstream systems receive the expected data.
Enable the workflow only after testing, then monitor executions, errors, and rate limits during the first production runs.
Review imported nodes carefully before activation. This catalog entry is intended to help you inspect the workflow structure, understand required services, and find related templates faster.
Node names, credentials, schedules, webhook paths, and external service limits may need adjustment for your workspace.
What it does Captures token usage and cost from your AI Agent/LLM. Logs model, tokens, cost, tool use, and conversation I/O to Google Sheets for simple observability and billing. Perfect for Develo...
Review the workflow JSON, configure any required credentials in n8n, and test the automation in a safe workspace before using it in production.
Yes. Use the block-by-block analysis and the downloadable JSON to inspect each node, then adjust credentials, prompts, schedules, filters, or destinations for your Engineering, Multimodal AI use case.