Detect cloud cost spikes with Google Sheets, Slack, Gmail, and Jira
Quick Overview This workflow runs daily to pull cloud spend from a billing API, compare it to a Google Sheets rolling baseline, and alert on cost spikes by creating a Jira incident, posting to Slack, emailing Finance via Gmail, and logging the run back to Google Sheets.
How it works Runs every day at 08:00 on a schedule. Fetches the latest daily cloud cost from a cloud billing API and loads historical daily costs from a Google Sheets “Baseline” sheet. Calculates a trailing-average baseline, computes the percentage change for today, and marks the result as valid only when enough non-zero history exists. Stops processing when the data is invalid or the increase is below the configured spike threshold. Classifies the spike severity (Watch/High/Critical) based on the percentage increase. Creates a Jira issue with the spike details, then posts an alert to a Slack channel and emails a text summary to Finance via Gmail. Appends the run details (date, service, severity, costs, and percent change) to the Google Sheets baseline sheet for future comparisons.
Setup Add an HTTP Header Auth credential for your cloud billing API and replace the example Authorization header value in the HTTP request. Connect Google Sheets OAuth credentials and set the Google Sheet document ID and ensure a “Baseline” sheet exists with a historical daily cost column (and is used for logging). Review and adjust the spike threshold (currently 25%) and the minimum baseline requirements (at least 3 non-zero rows) in the code step. Connect Jira credentials and set your Jira project ID and issue type ID for incident creation. Connect Slack credentials and set the target channel ID, then connect Gmail credentials and update the Finance recipient email address. Adjust the schedule time (currently 08:00) to match when your daily billing data is available.
Related Templates
AI Email Classifier & Auto-Delete for Gmail (SPAM/OFFER Cleaner)
This workflow is designed for freelancers, solopreneurs, and business owners who receive a high volume of irrelevant mes...
Generate Food Recipes from Gmail & Form Requests with Ollama & Llama 3.2
This n8n template demonstrates how to create an intelligent food recipe assistant that accepts requests via Gmail and we...
Automatic News Summarization & Email Digest with GPT-4, NewsAPI and Gmail
📰 AI News Digest Agent: Auto News Summarizer & Email Newsletter Create an intelligent news curation system that automat...
🔒 Please log in to import templates to n8n and favorite templates
Workflow Visualization
Loading...
Preparing workflow renderer
Comments (0)
Login to post comments