AI Usage Tracker (Community Contributed)
detail.loadingPreview
Tracks AI model token usage and associated costs to a Google Sheet.
🚀Ready to Deploy This Workflow?
About This Workflow
Overview
This workflow demonstrates how to track AI model token usage and calculate associated costs. It utilizes a form trigger to accept file uploads (e.g., CVs), logs relevant workflow and client information, and then uses a custom LLM subnode to interact with an AI model. The token usage, input/output costs, and total costs are then logged to a Google Sheet for billing or monitoring purposes.
Key Features
- Tracks token consumption for AI models.
- Calculates input, output, and total costs based on token usage and predefined rates.
- Logs usage data to a Google Sheet for record-keeping.
- Integrates with n8n forms for client-facing service offerings.
- Provides a flexible structure for customizing AI models and logging parameters.
How To Use
- Set up Google Sheet: Create a Google Sheet with columns for
date,workflow_id,execution_id,client_id,client_name,input_tokens,output_tokens,total_tokens,input_cost,output_cost, andtotal_cost. - Configure Google Sheets Node: Update the
Client Usage Lognode with your Google Sheet's document ID and sheet name. - Configure Custom LLM Subnode: In the
Custom LLM Subnode, set your OpenAI API key, choose the desired model, and input theinput_token_costandoutput_token_costper million tokens. - Configure Logging Attributes: In the
Logging Attributesnode, set theclient_id. You can also extend this to captureclient_nameif needed. - Configure Form Trigger: Customize the
On form submissionnode'sformTitle,formFields, andformDescriptionto match your service offering. - Connect Nodes: Ensure the nodes are connected in the correct order:
Form Trigger->Logging Attributes->Custom LLM Subnode->Client Usage Log.
Apps Used
Workflow JSON
{
"id": "cd3e1cf2-53dd-45cc-a554-d7cc6570a0f1",
"name": "AI Usage Tracker (Community Contributed)",
"nodes": 0,
"category": "AI & Machine Learning",
"status": "active",
"version": "1.0.0"
}Note: This is a sample preview. The full workflow JSON contains node configurations, credentials placeholders, and execution logic.
Get This Workflow
ID: cd3e1cf2-53dd...
About the Author
Free n8n Workflows Official
System Admin
The official repository for verified enterprise-grade workflows.
Statistics
Verification Info
Related Workflows
Discover more workflows you might like
AI-Powered Company Research and Enrichment for Google Sheets
Leverage AI with OpenAI and LangChain to automatically research companies, extract key data like domain, market, and pricing, and update Google Sheets. This workflow uses the 'OpenAI Chat Model', 'get_website_content' tool, and 'SerpAPI - Search Google' to enrich your data.
Automated Customer Feedback Sentiment Analysis with OpenAI and Google Sheets
This n8n workflow automatically analyzes customer feedback for sentiment using OpenAI and stores the results in Google Sheets. It's triggered by a form submission, making feedback processing seamless.
Create an AI-Powered Telegram Bot with Langchain and DALL-E 3
Build a sophisticated Telegram bot using n8n, integrating Langchain for AI conversation and DALL-E 3 for image generation. This workflow allows for dynamic chat interactions and creative image creation directly through Telegram.
Build a Conversational AI Agent with LangChain, Tools, and Memory in n8n
This workflow demonstrates how to create an intelligent AI agent using LangChain in n8n. It leverages an OpenAI model, buffer memory for conversation history, and external tools like Wikipedia and SerpAPI for enhanced responses. The 'On new manual Chat Message' node initiates the agent's interaction.
Telegram AI Chatbot with Long-Term Memory and Note Storage
Build a sophisticated Telegram chatbot powered by AI, capable of maintaining long-term memory and storing notes using Google Docs. This workflow leverages Langchain and n8n nodes to create an intelligent conversational agent.
Automated Car Insurance Quote Generator with AI and Vector Store
This n8n workflow generates car insurance quotes using an AI agent. It leverages LangChain nodes like Webhook, Text Splitter, Embeddings, and Vector Store (Pinecone) to process and retrieve relevant information, then logs the results to a Google Sheet.