# CV parsing from PDF to JSON with token cost tracking and monthly invoicing via Gmail
This automation workflow converts candidate CVs in PDF format into structured JSON while accurately logging token usage costs per request. Designed for AI service providers and SaaS startups that need transparent, usage-based billing for their clients.
## Who it´s for
- AI service providers needing accurate client billing based on token usage
- Companies automating candidate resume processing
- SaaS startups using LLMs and requiring per-client cost tracking
- n8n developers implementing usage-based billing for AI features
## What the automation does
- Accepts a PDF CV via a web form submission
- Uses OpenAI (e.g., GPT-4o-mini) to extract data and convert it into structured JSON
- Tracks input/output token volumes and cost via a custom LangChain code node
- Logs metadata (client_id, date, model, cost) into Google Sheets
- Aggregates usage data monthly via cron schedule
- Generates and sends an invoice to the client via Gmail
## What´s included
- Ready-to-use n8n workflow
- Trigger logic: form submission and cron scheduling
- Integrations with Google Sheets, Gmail, OpenAI, and web form
- Basic text instructions for setup and adaptation
## Requirements for setup
- n8n instance with workflow execution access
- OpenAI API key
- Google account with permissions for Google Sheets and Gmail APIs
- Web form that sends PDFs via webhook
## Benefits and outcomes
- Automated CV parsing into structured JSON
- Transparent tracking of LLM token costs per request
- Reduced manual effort in client billing
- Scalable foundation for monetizing AI-powered document processing
- Seamless integration with existing systems via Google Sheets as a data source
## Important: template only
Important: you are purchasing a ready-made automation workflow template only. Rollout into your infrastructure, connecting specific accounts and services, 1:1 setup help, custom adjustments for non-standard stacks and any consulting support are provided as a separate paid service at an individual rate. To discuss custom work or 1:1 help, contact via chat
No feedback yet