Automation library · Customer support

Run a customer support RAG chatbot with OpenAI

Started by someone opening a chat with it, and works across Google Drive, Telegram and in-memory vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 21 steps, 2 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

21 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 3Model 8Logic 8Service 2

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

  1. 1When a Customer Asks a QuestionChat triggerStarts it
  2. 2Embed the QuestionEmbeddings Open AiModel
  3. 3Answering ModelLm Chat Open AiModel
  4. 4When a Document Is AddedGoogle Drive triggerStarts it
  5. 5When a Document Is UpdatedGoogle Drive triggerStarts it
  6. 6Split It Into PassagesText Splitter Recursive Character Text SplitterModel
  7. 7Embed the DocumentsEmbeddings Open AiModel
  8. 8Search the DocumentationVector Store In MemoryModel
  9. 9Answer With Citations OnlyChain LlmModel
  10. 10Download the DocumentGoogle DriveService
  11. 11Read the Document ContentsDocument Default Data LoaderModel
  12. 12Index the DocumentVector Store In MemoryModel
  13. 13Score the Matches and Build the SourcesCodeLogic
  14. 14Verify Every Claim Is CitedCodeLogic
  15. 15Do the Docs Cover the Question?IfLogic
  16. 16Is the Answer Grounded?IfLogic
  17. 17Mark It as Not CoveredSetLogic
  18. 18Send the Cited AnswerSetLogic
  19. 19Mark It as UngroundedSetLogic
  20. 20Alert a HumanTelegramService
  21. 21Tell the Customer a Human Will Follow UpSetLogic

How it's built

Starts on
Someone opening a chat with it
Steps
21, with 2 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Telegram, in-memory vectors
Model
OpenAI
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, Telegram and in-memory vectors accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on someone opening a chat with it.

Does it use AI?

Yes. It calls OpenAI. 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 21 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 21 steps before you point it at anything that matters.