n8n and Grafana integrate in both directions: Grafana alert webhooks can trigger n8n workflows, and n8n workflows can push data to the databases Grafana reads from, or annotate Grafana dashboards to mark automation events.
Grafana fires an alert webhook → n8n MQTT or Webhook Trigger receives it → n8n applies routing logic (escalate, log, notify) → n8n writes results back to PostgreSQL/InfluxDB → Grafana dashboard reflects the update.
n8n can also annotate Grafana directly via the Grafana HTTP API node, marking workflow execution events (e.g., "batch job completed", "anomaly detected") as timeline annotations visible on dashboards.