Automation library · Alerts and monitoring

Automated business KPI insights with OpenAI and MSSQL

Started by a clock, and works across Email, Google Sheets and WhatsApp. It hands the judgement calls to OpenAI. 24 steps, 4 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

24 stepsLarge: read it before trusting it with anything live
4Branches: places the flow splits
0Loops or waits
3Services it connects to

The flow

Starts it 1Model 3Logic 10Service 10

The steps in the order they run, from what starts it.

  1. 1Schedule TriggerSchedule triggerStarts it
  2. 2OpenAI Chat ModelLm Chat Open AiModel
  3. 3CalculatorTool CalculatorModel
  4. 4Yesterday's RevenueMicrosoft SqlService
  5. 5Yesterday's Registered UsersMicrosoft SqlService
  6. 6Yesterday's ReportGoogle AnalyticsService
  7. 7Yesterday's Marketing ExpensesGoogle SheetsService
  8. 8AI AgentAgentModel
  9. 9Check dataIfLogic
  10. 10IfIfLogic
  11. 11Condition for google reportIfLogic
  12. 12Condition for marketing reportsIfLogic
  13. 13MergeMergeLogic
  14. 14Get only Total Revenue AmountSummarizeService
  15. 15Send Error EmailEmail SendService
  16. 16Get only Total UsersSummarizeService
  17. 17Get Only Total UsersSetLogic
  18. 18Get only Total Spend AmountSummarizeService
  19. 19Send messageWhats AppService
  20. 20Send Final EmailEmail SendService
  21. 21Merge all resultMergeLogic
  22. 22Normalize the dataCodeLogic
  23. 23KPI CalculatorCodeLogic
  24. 24Business Decision LogicCodeLogic

How it's built

Starts on
A clock
Steps
24, with 4 branches
Size
Large: read it before trusting it with anything live
Connects to
Email, Google Sheets, WhatsApp
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Email, Google Sheets and WhatsApp accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

Yes. It calls OpenAI. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 24 steps it is large: read it before trusting it with anything live.

How do I import it?

Copy the workflow, open a new workflow in n8n and paste. The steps appear on the canvas, ready for your own accounts.

Before you run it

Nothing here has been tested by us. It is somebody's working automation, read and described from its own steps. Treat the connections it wants as a list of accounts it will touch, and read the 24 steps before you point it at anything that matters.