Automation library · Chat assistants

Basic RAG system with Claude and OpenAI

Started by an incoming Telegram message, and works across Google Drive, Supabase, Supabase vectors, Telegram and one other. It puts Claude and OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 29 steps: large, and worth reading before you trust it with anything live.

LargeCalls a model: Claude, OpenAIRetrieval

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

The flow

Starts it 6Model 13Service 10

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

  1. 1When chat message receivedChat triggerStarts it
  2. 2Embeddings OpenAI1Embeddings Open AiModel
  3. 3Default Data Loader1Document Default Data LoaderModel
  4. 4Embeddings OpenAI2Embeddings Open AiModel
  5. 5Default Data Loader2Document Default Data LoaderModel
  6. 6Embeddings OpenAI3Embeddings Open AiModel
  7. 7OpenAI Chat ModelLm Chat Open AiModel
  8. 8Twilio TriggerTwilio triggerStarts it
  9. 9Anthropic Chat ModelLm Chat AnthropicModel
  10. 10Telegram TriggerTelegram triggerStarts it
  11. 11GD1Google Drive triggerStarts it
  12. 12GD2Google Drive triggerStarts it
  13. 13GD3Google Drive triggerStarts it
  14. 14Local RAG AgentAgentModel
  15. 15Supabase Vector Store1Vector Store SupabaseModel
  16. 16Supabase Vector Store3Vector Store SupabaseModel
  17. 17Supabase Vector StoreVector Store SupabaseModel
  18. 18Text RAG AgentAgentModel
  19. 19Telegram RAG AgentAgentModel
  20. 20Download fileGoogle DriveService
  21. 21Get many rowsSupabaseService
  22. 22Delete a rowSupabaseService
  23. 23Get many rows1SupabaseService
  24. 24Update a rowSupabaseService
  25. 25Send an SMS/MMS/WhatsApp messageTwilioService
  26. 26Send a text messageTelegramService
  27. 27Delete a row3SupabaseService
  28. 28Update a row1SupabaseService
  29. 29Download file1Google DriveService

How it's built

Starts on
An incoming Telegram message
Steps
29
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Supabase, Supabase vectors, Telegram, Twilio
Model
Claude, 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, Supabase, Supabase vectors, Telegram and Twilio accounts, and a key for Claude and 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 Claude and 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 29 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 29 steps before you point it at anything that matters.