Automation library · E-commerce

Validate wholesale order emails against a Google Sheets price

Started by a clock, and works across Gmail, Google Sheets and Telegram. It hands the judgement calls to OpenAI. 27 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

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

The flow

Starts it 2Model 4Logic 9Service 12

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

  1. 1When Wholesale Order Email ArrivesGmail triggerStarts it
  2. 2Order Extraction ModelLm Chat Open AiModel
  3. 3Weekly Order Desk DigestSchedule triggerStarts it
  4. 4Digest ModelLm Chat Open AiModel
  5. 5Normalize Order EmailSetLogic
  6. 6AI Extract Order LinesAgentModel
  7. 7Read Orders This WeekGoogle SheetsService
  8. 8AI Write Digest SummaryAgentModel
  9. 9Has Order DetailsIfLogic
  10. 10Parse Extracted OrderCodeLogic
  11. 11Summarise Order WeekCodeLogic
  12. 12Format Digest EmailCodeLogic
  13. 13Log Unparsable Order EmailGoogle SheetsService
  14. 14Fetch Price ListGoogle SheetsService
  15. 15Email Weekly DigestGmailService
  16. 16Alert Desk About Unparsable EmailTelegramService
  17. 17Match Lines To Price ListCodeLogic
  18. 18Alert Digest On TelegramTelegramService
  19. 19If Price Or Pack IssueIfLogic
  20. 20Build Revision RequestSetLogic
  21. 21Build Order ConfirmationSetLogic
  22. 22Email Customer For RevisionGmailService
  23. 23Log Order To Fulfilment QueueGoogle SheetsService
  24. 24Alert Order Desk On Telegram1TelegramService
  25. 25Email Order ConfirmationGmailService
  26. 26Alert Order Desk On TelegramTelegramService
  27. 27Mark Order Email As ReadGmailService

How it's built

Starts on
A clock
Steps
27, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Gmail, Google Sheets, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own Gmail, Google Sheets and Telegram 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 27 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 27 steps before you point it at anything that matters.