Automation library · Chat assistants

AI warehouse inventory cycle count bot with OpenAI

Started by an incoming Telegram message, and works across Google Sheets and Telegram. It hands the judgement calls to OpenAI. 28 steps, 6 branches, 1 loop or waits: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAI

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

The flow

Starts it 1Model 4Logic 13Service 10

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

  1. 1Telegram TriggerTelegram triggerStarts it
  2. 2Model: Information ExtractionLm Chat Open AiModel
  3. 3Structured Output ParserOutput Parser StructuredModel
  4. 4WaitWaitLogic
  5. 5Is Audio?IfLogic
  6. 6Get Location, QtyAgentModel
  7. 7CommandIfLogic
  8. 8Collect AudioTelegramService
  9. 9Get Locations to CheckGoogle SheetsService
  10. 10Transcription ErrorIfLogic
  11. 11Command SelectionSwitchLogic
  12. 12Wrong CommandTelegramService
  13. 13Transcribe Operator CommandOpen AiModel
  14. 14Extract Location IDsAggregateLogic
  15. 15Ask to repeatTelegramService
  16. 16Merge Transcript With Location ListMergeLogic
  17. 17Help MessageTelegramService
  18. 18Collect Remaining LocationsGoogle SheetsService
  19. 19Is Location in Scope?IfLogic
  20. 20Combine with Location RecordsMergeLogic
  21. 21Remaining LocationsAggregateLogic
  22. 22Update Inventory QuantityGoogle SheetsService
  23. 23Error Message: Wrong LocationTelegramService
  24. 24Last Location ?IfLogic
  25. 25Number of LocationsSetLogic
  26. 26Send Instruction: Last LocationTelegramService
  27. 27First LocationLimitLogic
  28. 28Send Instruction: Next LocationTelegramService

How it's built

Starts on
An incoming Telegram message
Steps
28, with 6 branches, 1 loop or waits
Size
Large: read it before trusting it with anything live
Connects to
Google Sheets, Telegram
Model
OpenAI

Questions

What does it need to run?

An n8n account, plus your own 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 an incoming Telegram message.

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 28 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 28 steps before you point it at anything that matters.