Automation library · Customer support

Multi-department support bot with Pinecone and Telegram

Started by an incoming Telegram message, and works across Google Drive, Pinecone, Postgres and Telegram. It puts OpenRouter behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 46 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenRouterRetrieval

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

The flow

Starts it 4Model 21Logic 2Service 19

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

  1. 1Google Drive TriggerGoogle Drive triggerStarts it
  2. 2Embeddings Cohere3Embeddings CohereModel
  3. 3Character Text SplitterText Splitter Character Text SplitterModel
  4. 4Google Drive Trigger1Google Drive triggerStarts it
  5. 5Embeddings Cohere4Embeddings CohereModel
  6. 6Character Text Splitter1Text Splitter Character Text SplitterModel
  7. 7Google Drive Trigger2Google Drive triggerStarts it
  8. 8Embeddings Cohere5Embeddings CohereModel
  9. 9Character Text Splitter2Text Splitter Character Text SplitterModel
  10. 10Telegram TriggerTelegram triggerStarts it
  11. 11Embeddings Cohere6Embeddings CohereModel
  12. 12OpenRouter Chat Model3Lm Chat Open RouterModel
  13. 13Simple Memory3Memory Buffer WindowModel
  14. 14Embeddings Cohere7Embeddings CohereModel
  15. 15Embeddings Cohere8Embeddings CohereModel
  16. 16Execute a SQL queryPostgresService
  17. 17Download fileGoogle DriveService
  18. 18Pinecone Vector Store3Vector Store PineconeModel
  19. 19Default Data LoaderDocument Default Data LoaderModel
  20. 20Download file1Google DriveService
  21. 21Pinecone Vector Store4Vector Store PineconeModel
  22. 22Default Data Loader1Document Default Data LoaderModel
  23. 23Download file2Google DriveService
  24. 24Pinecone Vector Store5Vector Store PineconeModel
  25. 25Default Data Loader2Document Default Data LoaderModel
  26. 26Execute a SQL query1PostgresService
  27. 27Pinecone Vector Store6Vector Store PineconeModel
  28. 28AI Agent3AgentModel
  29. 29Pinecone Vector Store7Vector Store PineconeModel
  30. 30Pinecone Vector Store8Vector Store PineconeModel
  31. 31Select rows from a tablePostgresService
  32. 32Send a text message1TelegramService
  33. 33Switch1SwitchLogic
  34. 34Send a text messageTelegramService
  35. 35Send a text message4TelegramService
  36. 36Execute a SQL query2PostgresService
  37. 37SwitchSwitchLogic
  38. 38Execute a SQL query3PostgresService
  39. 39Send a text message2TelegramService
  40. 40return policyTelegramService
  41. 41talk technicalTelegramService
  42. 42billingTelegramService
  43. 43Send a text message3TelegramService
  44. 44return policy1PostgresService
  45. 45tech questionsPostgresService
  46. 46billing1PostgresService

How it's built

Starts on
An incoming Telegram message
Steps
46, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Pinecone, Postgres, Telegram
Model
OpenRouter
Retrieval
Answers are drawn from documents you supply, not from the model alone

Questions

What does it need to run?

An n8n account, plus your own Google Drive, Pinecone, Postgres and Telegram accounts, and a key for OpenRouter. 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 OpenRouter. Its answers draw on documents you give it, not on the model alone. Model calls are billed by the provider, not by n8n.

How long does it take to set up?

Take your time. At 46 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 46 steps before you point it at anything that matters.