Automation library · E-commerce

Automate demand forecasting & inventory ordering with MySQL

Started by a clock, and works across MySQL and Slack. 24 steps, 2 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

Large

24 stepsLarge: read it before trusting it with anything live
2Branches: places the flow splits
1Loop or waits
2Services it connects to

The flow

Starts it 1Logic 10Service 13

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

  1. 1Run Daily at 03:00Schedule triggerStarts it
  2. 2Fetch POS DataHttp RequestService
  3. 3Fetch Historical SalesMy SqlService
  4. 4Fetch Weather ForecastHttp RequestService
  5. 5Fetch SNS TrendsHttp RequestService
  6. 6Fetch Inventory MasterHttp RequestService
  7. 7Merge Data 1MergeLogic
  8. 8Merge Data 2MergeLogic
  9. 9Format Prediction DatasetCodeLogic
  10. 10Call AI Prediction APIHttp RequestService
  11. 11Calculate Stock ShortageCodeLogic
  12. 12Finalize Order QtyCodeLogic
  13. 13Check Order NecessityIfLogic
  14. 14Split by ProductSplit In BatchesLogic
  15. 15Get Quote Supplier AHttp RequestService
  16. 16Get Quote Supplier BHttp RequestService
  17. 17Get Quote Supplier CHttp RequestService
  18. 18Merge QuotesMergeLogic
  19. 19Select Best SupplierCodeLogic
  20. 20Execute Auto OrderHttp RequestService
  21. 21Update Inventory SystemHttp RequestService
  22. 22Save Order LogMy SqlService
  23. 23Check AnomaliesIfLogic
  24. 24Slack Anomaly AlertSlackService

How it's built

Starts on
A clock
Steps
24, with 2 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
MySQL, Slack
Model
None. This is plumbing, not judgement

Questions

What does it need to run?

An n8n account, plus your own MySQL and Slack accounts. You connect your own accounts after importing it; none are included.

What starts it?

It starts on a clock.

Does it use AI?

No. Every step is fixed logic or a call to a service, so it does the same thing every time.

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.