{"product_id":"google-sheets-kpi-prometheus-exporter-for-grafana-via-n8n-webhook","title":"Google Sheets KPI Prometheus Exporter for Grafana via n8n Webhook","description":"\u003ch3\u003eTurn KPI rows in Google Sheets into live Prometheus metrics for Grafana—using an n8n Webhook exporter\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow exposes KPI values stored in a \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e document as a \u003cstrong\u003ePrometheus text exposition endpoint\u003c\/strong\u003e, so \u003cstrong\u003eGrafana\u003c\/strong\u003e can scrape and chart them. It adds caching, validation\/normalization, and built-in exporter health metrics—delivered securely via an authenticated webhook.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReceives Prometheus scrape requests\u003c\/strong\u003e through an \u003cstrong\u003en8n webhook\u003c\/strong\u003e protected with \u003cstrong\u003eheader authentication\u003c\/strong\u003e (e.g., \u003cem\u003eAuthorization: Bearer \u0026lt;token\u0026gt;\u003c\/em\u003e).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eUses in-workflow caching\u003c\/strong\u003e: if the cached Prometheus body is still within the configured \u003cem\u003ecache_ttl_seconds\u003c\/em\u003e, it immediately returns the cached response.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReads KPI rows from Google Sheets\u003c\/strong\u003e when the cache is stale, pulling from a configured spreadsheet and tab.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates and normalizes each metric row\u003c\/strong\u003e (metric name, type, numeric value, and labels). Malformed, duplicate, or over-limit series are dropped, and reasons are tracked as comments\/metadata.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eRenders Prometheus 0.0.4 text format\u003c\/strong\u003e, updates the cache, and appends \u003cstrong\u003eexporter self-metrics\u003c\/strong\u003e (including \u003cem\u003eup\u003c\/em\u003e status, cache hit\/age, and row\/series counts).\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns plain-text metrics\u003c\/strong\u003e to Prometheus, with optional behavior to serve stale cached data and\/or return a configurable HTTP status code if the sheet read fails.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators want \u003cstrong\u003eKPI dashboards in Grafana\u003c\/strong\u003e without building a custom metrics service.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers maintain KPIs in \u003cstrong\u003eGoogle Sheets\u003c\/strong\u003e, while Prometheus\/Grafana handles monitoring and visualization.\u003c\/li\u003e\n  \u003cli\u003eTeams need a lightweight \u003cstrong\u003ePrometheus exporter\u003c\/strong\u003e pattern backed by spreadsheet-managed data.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003en8n nodes: \u003cstrong\u003ewebhook\u003c\/strong\u003e, \u003cstrong\u003egoogle sheets\u003c\/strong\u003e, \u003cstrong\u003ecode\u003c\/strong\u003e, \u003cstrong\u003eif\u003c\/strong\u003e, \u003cstrong\u003eset\u003c\/strong\u003e, plus supporting \u003cstrong\u003esticky note\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eExpected Google Sheets columns: \u003cstrong\u003emetric_name\u003c\/strong\u003e, \u003cstrong\u003ehelp\u003c\/strong\u003e, \u003cstrong\u003etype\u003c\/strong\u003e, \u003cstrong\u003evalue\u003c\/strong\u003e, \u003cstrong\u003elabels\u003c\/strong\u003e.\u003c\/li\u003e\n  \u003cli\u003eExporter configuration includes: \u003cem\u003eGoogle Sheet ID\u003c\/em\u003e, \u003cem\u003etab name\u003c\/em\u003e, \u003cem\u003ecache_ttl_seconds\u003c\/em\u003e, \u003cem\u003emax_series\u003c\/em\u003e, \u003cem\u003eexporter_prefix\u003c\/em\u003e, and error behavior.\u003c\/li\u003e\n\u003c\/ul\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45738518839475,"sku":"N8N-17546","price":72.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/r3XmATpNES9F1L8Oe7WdC_uiV0N7E3.png?v=1785229720","url":"https:\/\/buyflowscripts.com\/products\/google-sheets-kpi-prometheus-exporter-for-grafana-via-n8n-webhook","provider":"N8N Commerce","version":"1.0","type":"link"}