Approve and log rack power overage charges with Google Sheets, Gmail and OpenAI
Needs changesWhat this workflow does
This AI workflow has 19 nodes and runs when an HTTP POST request hits its webhook URL. Along the way it connects Google Sheets, OpenAI Chat Model, Gmail and Telegram.
How it runs
Trigger: When an HTTP POST request hits its webhook URL.
- Normalize Alert Payload (Edit Fields (Set)): sets 4 fields: customerId, rackId, measuredKw…
- Fetch Customer Contract Power Allocation (Google Sheets): lookup
- Compute Overage Amount & Billing Tier (Code): runs custom JavaScript code
- Check Overage Threshold (If): checks a condition and branches into true / false
- Draft Overage Invoice Adjustment (AI Agent): runs an AI agent, with model: Overage Drafting Model
- Log Grace Period Pass (Edit Fields (Set)): sets 2 fields: billingOutcome, finalAmount
- Request Ops Manager Approval (Gmail): send and wait for a reply
- Branch on Approval (Switch): routes items into 3 branches
- Commit Overage Charge (HTTP Request): calls an HTTP API (POST)
- Apply Manager Override Amount (Code): runs custom JavaScript code
…plus 7 more steps. See the full node list below.
Services it uses
Other Google Sheets + Gmail templates (2,102) · Other OpenAI + Google Sheets templates (2,011) · Other OpenAI + Gmail templates (1,623)
Before you upgrade to n8n 3.0
1 thing in this workflow is removed in n8n 3.0. Fix it before you upgrade:
- AI Agent v1 (old agent modes) in Draft Overage Invoice Adjustment (v1.7): replace with Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent.
Rather not rewrite it? Many of these flows can be rebuilt in Make (free plan).
Published 2026 — 6% of 2026 templates need changes for 3.0. See how template age affects 3.0 readiness →
| Removed in 3.0 | Replace with |
|---|---|
| AI Agent v1 (old agent modes) Draft Overage Invoice Adjustment (v1.7) | Latest AI Agent node (Tools Agent). For SQL Agent, use a Postgres or MySQL tool with a recent AI Agent. |
Nodes used (13)
- Webhook
n8n-nodes-base.webhook - Edit Fields (Set)
n8n-nodes-base.set - Google Sheets
n8n-nodes-base.googleSheets - Code
n8n-nodes-base.code - If
n8n-nodes-base.if - AI Agent
@n8n/n8n-nodes-langchain.agent - OpenAI Chat Model
@n8n/n8n-nodes-langchain.lmChatOpenAi - Gmail
n8n-nodes-base.gmail - Switch
n8n-nodes-base.switch - Data table
n8n-nodes-base.dataTable - HTTP Request
n8n-nodes-base.httpRequest - Merge
n8n-nodes-base.merge - Telegram
n8n-nodes-base.telegram
From the author
Quick overview This workflow receives DCIM rack power alerts via webhook, looks up contracted kW allocations in Google Sheets, calculates tiered overage charges, drafts an explanation with OpenAI, and routes the charge through Gmail approval before committing…