{"product_id":"openrouter-llm-cost-digest-n8n-to-google-sheets-gmail","title":"OpenRouter LLM Cost Digest: n8n to Google Sheets + Gmail","description":"\u003ch3\u003eOpenRouter LLM Cost Digest for n8n: OTLP → Google Sheets + Daily Gmail Spend Report\u003c\/h3\u003e\n\u003cp\u003eTurn OpenRouter Observability (Broadcast) telemetry into instant cost visibility: this n8n workflow captures every LLM call from OTLP spans, logs model\/token\/cost\/latency to Google Sheets, then emails you a daily 24-hour spend digest via Gmail—complete with the most expensive calls.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives OpenRouter Observability (Broadcast) OTLP spans\u003c\/strong\u003e via a webhook endpoint.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eExtracts and normalizes each span\u003c\/strong\u003e into a single LLM call record, capturing timestamp, model, provider, token usage, cost, latency, finish reason, API key name, and user.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eImmediately acknowledges the webhook\u003c\/strong\u003e with a JSON response: \u003ccode\u003e{ok:true}\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAppends every call to Google Sheets\u003c\/strong\u003e in the \u003ccode\u003eCalls\u003c\/code\u003e tab as a new row.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSends a daily digest\u003c\/strong\u003e by running every morning, reading the full call log from the same Sheets tab.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAggregates the last 24 hours\u003c\/strong\u003e to compute totals and breakdowns by model, then generates an HTML email highlighting the most expensive calls.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eEmails the report through Gmail\u003c\/strong\u003e to your configured recipient (optionally including a configurable number of “top expensive calls”).\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSaaS cost monitoring:\u003c\/strong\u003e track OpenRouter LLM spend by model and identify outlier requests.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eAutomation engineers:\u003c\/strong\u003e maintain a transparent audit trail of LLM calls for debugging and optimization.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFinOps-lite teams:\u003c\/strong\u003e get a simple daily 24-hour cost digest without building custom reporting pipelines.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eIntegrations\/nodes:\u003c\/strong\u003e \u003ccode\u003ewebhook\u003c\/code\u003e, \u003ccode\u003ecode\u003c\/code\u003e, \u003ccode\u003egoogle sheets\u003c\/code\u003e, \u003ccode\u003egmail\u003c\/code\u003e, plus \u003ccode\u003eset\u003c\/code\u003e and \u003ccode\u003esticky note\u003c\/code\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eData flow:\u003c\/strong\u003e OTLP JSON spans (OpenRouter Broadcast) → parse\/normalize → append rows to Google Sheets (\u003ccode\u003eCalls\u003c\/code\u003e tab) → aggregate last 24 hours → HTML email via Gmail.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eSetup (high level)\u003c\/h3\u003e\n\u003cp\u003eCreate a Google Sheet with the expected \u003ccode\u003eCalls\u003c\/code\u003e tab headers, connect Google Sheets OAuth, connect Gmail OAuth and set the recipient, activate the workflow, then copy your production webhook URL into OpenRouter Observability (Broadcast).\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":46172948168883,"sku":"N8N-20578","price":69.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/66Wr18uErFOIN8Wtf5chK_0uo17vUM.png?v=1791364583","url":"https:\/\/buyflowscripts.com\/products\/openrouter-llm-cost-digest-n8n-to-google-sheets-gmail","provider":"N8N Commerce","version":"1.0","type":"link"}