Keyflow

Search Keyflow

Find a shortcut, workflow, MCP server or skill

Track LLM Token Costs per Customer Using the Langchain Code Node

n8n template #3440
Note: This template only works for self-hosted n8n. This n8n template demonstrates how to use the Langchain code node to track token usage and cost for every LLM call. This is useful if your templates handle multiple clients or customers and you need a cheap and easy way to capture how much of your AI credits they are using. How it works In our mock AI service, we're offering a data conversion API to convert Resume PDFs into JSON documents. A form trigger is used to allow for PDF upload and the file is parsed using the Extract from File node. An Edit Fields node is used to capture additional variables to send to our log. Next, we use the Information Extractor node to organise the Resume data

Hand off to your agent

Prompt

Help me set up the n8n workflow "Track LLM Token Costs per Customer Using the Langchain Code Node" (https://n8n.io/workflows/3440). It uses: Google Sheets, Gmail, LangChain Code, Information Extractor. Import the template JSON into my n8n instance, list every credential I need to create, and walk me through testing it.

Paste into Claude Code and it will do the rest.

Apps and nodes

Similar workflows

NameViews
  1. Explore n8n Nodes in a Visual Reference Library5,197
  2. Automate Customer Support with Gmail, Google Sheets, ERP Data & GPT-4o AI778
  3. Automated Local Lead Finder & Cold Email Sender with Apify, AI, and Gmail498
  4. AI-Powered MIS Agent437
  5. Automated Resume Scoring with Gemini LLM, Gmail and Notion Job Profiles237
  6. Automated Web Scraping: email a CSV, save to Google Sheets & Microsoft Excel99K
  7. 🤖 AI Powered RAG Chatbot for Your Docs + Google Drive + Gemini + Qdrant65K
  8. AI Automated HR Workflow for CV Analysis and Candidate Evaluation51K
Buy me a coffee