Skip to content
NEWMeet Alaaddin, your AI genie with a voice. trig8n launches 1 January 2027. See what is new

Library / Email Automation

Email Automation

Analyze weekly KPI drops with Google Sheets, Gmail, and GPT-4o-mini

On a schedule, it handles email with OpenAI / ChatGPT using Gmail, Google Sheets.

What it does

# Weekly KPI anomaly detector with AI explanations Every business tracks weekly numbers, and most teams notice a sharp drop days after it happened. This reads your KPI sheet every Monday, compares this week with last week, and emails you only when something falls past your threshold, with an AI written explanation of the likely causes and what to do about it. ### How it works 1. A Monday schedule fires and one config node holds your sheet, alert email, drop threshold and a line about your business. 2. The KPI Log tab is read and the two most recent rows are compared. 3. A Code node works out the percentage change for every metric column and flags anything that dropped past your threshold, twenty percent by default. Metric columns are detected automatically, so adding a column needs no changes. 4. If nothing dropped, the run ends quietly and no email is sent. 5. If something did, GPT reads the drops alongside your business context and writes a plain language summary, the likely causes, and specific actions to take this week. 6. That analysis is built into one email and sent to you. ### Setup 1. Add your OpenAI API key and connect your Google Sheets and Gmail accounts. 2. Create a tab called KPI Log with a Week column followed by one column per metric, for example Leads, Revenue, Sessions, Conversions. 3. Each Monday, paste that week's numbers into a new row. Two rows are needed before the first comparison can run. 4. Open Set config and replace the sheet ID, alert email, your name and your business type. ### Customization Lower dropThreshold to catch smaller dips, or switch the schedule to daily and use a Date column instead of Week.

The steps

  1. Every Monday at 9am
  2. Set config
  3. Read the KPI log
  4. Compare the last two weeks
  5. Anything dropped?
  6. Explain the drops
  7. Chat model
  8. Output Parser - Analysis
  9. Build the alert email
  10. Send the alert
  11. All healthy, no email

Similar automations