Detect cloud cost anomalies with AWS Cost Explorer, GCP Billing and GPT-4o-mini
Ready for 3.0What this workflow does
This AI workflow has 29 nodes and runs on a schedule (cron 0 9 * * *) (plus 1 other trigger). Along the way it connects Google Sheets, Slack and OpenAI. It also calls ce.us-east-1.amazonaws.com over HTTP.
How it runs
Trigger: On a schedule (cron 0 9 * * *) (plus 1 other trigger).
- Set Cost Agent Config (Code): runs custom JavaScript code
- Look Up Anomaly in Log (Google Sheets): uses Google Sheets
- Read Anomaly Log Sheet (Google Sheets): uses Google Sheets
- Validate Action Token (Code): runs custom JavaScript code
- AWS Enabled? (If): checks a condition and branches into true / false
- Token Valid? (If): checks a condition and branches into true / false
- Get AWS Cost by Service & Region (HTTP Request): calls ce.us-east-1.amazonaws.com (POST)
- GCP Enabled? (If): checks a condition and branches into true / false
- Record Decision in Log (Google Sheets): update
- Show Invalid Link Page (Respond to Webhook): sends the response back to the webhook caller
…plus 17 more steps. See the full node list below.
Services it uses
HTTP calls to: ce.us-east-1.amazonaws.com
Before you upgrade to n8n 3.0
Nothing in this workflow is removed in n8n 3.0, so it should import and run after the upgrade.
Nodes used (10)
- Schedule Trigger
n8n-nodes-base.scheduleTrigger - Code
n8n-nodes-base.code - Google Sheets
n8n-nodes-base.googleSheets - If
n8n-nodes-base.if - HTTP Request
n8n-nodes-base.httpRequest - Loop Over Items (Split in Batches)
n8n-nodes-base.splitInBatches - Slack
n8n-nodes-base.slack - OpenAI
@n8n/n8n-nodes-langchain.openAi - Webhook
n8n-nodes-base.webhook - Respond to Webhook
n8n-nodes-base.respondToWebhook
From the author
Quick overview This workflow runs daily to detect AWS and optional GCP cost spikes, enriches AWS anomalies with CloudTrail context and an OpenAI explanation, posts actionable alerts and a run summary to Slack, and logs anomalies plus approve/ignore decisions…