Automation library · Lead generation

RAG Chatbot with Signup Automation

Started by another system calling it, and works across Google Drive, Postgres and Supabase vectors. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 38 steps, 5 branches: large, and worth reading before you trust it with anything live.

LargeCalls a model: OpenAIRetrieval

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

The flow

Starts it 6Model 8Logic 15Service 9

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

  1. 1Postgres Chat MemoryMemory Postgres ChatModel
  2. 2Agent LLMLm Chat Open AiModel
  3. 3Embeddings OpenAIEmbeddings Open AiModel
  4. 4When chat message receivedWebhookStarts it
  5. 5GDrive: Watch Knowledge Base FolderGoogle Drive triggerStarts it
  6. 6OpenAI: Generate EmbeddingsEmbeddings Open AiModel
  7. 7oader: Format Document + MetadataDocument Default Data LoaderModel
  8. 8AI AgentAgentModel
  9. 9Supabase Vector StoreVector Store SupabaseModel
  10. 10Sanitize QueryCodeLogic
  11. 11DB: Check File Already IngestedPostgresService
  12. 12Vector DB: Upsert Embeddings (Supabase)Vector Store SupabaseModel
  13. 13Check Existing SignupPostgresService
  14. 14Input Valid?IfLogic
  15. 15IF: File Exists in Ingestion LogIfLogic
  16. 16IF: Embedding Pipeline SuccessIfLogic
  17. 17Signup Already Saved?IfLogic
  18. 18Build Error ResponseSetLogic
  19. 19Skip already ingested fileNo OpLogic
  20. 20Code: Classify Document TypeCodeLogic
  21. 21Code: Aggregate Chunk CountCodeLogic
  22. 22DB: Log Failed IngestionPostgresService
  23. 23Reply to User (Skip Signup Extraction)SetLogic
  24. 24Fetch Full HistoryPostgresService
  25. 25Respond, Invalid InputRespond To WebhookStarts it
  26. 26GDrive: Download FileGoogle DriveService
  27. 27DB: Log Successful IngestionPostgresService
  28. 28Respond, Already RegisteredRespond To WebhookStarts it
  29. 29Extract Signup DataCodeLogic
  30. 30Extract: PDF/Text ContentExtract From FileService
  31. 31Signup Complete?IfLogic
  32. 32Code: Clean + Chunk Text (400 chars strategy)CodeLogic
  33. 33Save Signup to SupabasePostgresService
  34. 34Save Partial + FlagPostgresService
  35. 35Reply to User (Complete)SetLogic
  36. 36Reply to User (Partial)SetLogic
  37. 37Respond, Signup CompleteRespond To WebhookStarts it
  38. 38Respond, Signup PartialRespond To WebhookStarts it

How it's built

Starts on
Another system calling it
Steps
38, with 5 branches
Size
Large: read it before trusting it with anything live
Connects to
Google Drive, Postgres, Supabase 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, Postgres and Supabase vectors accounts, and a key for OpenAI. You connect your own accounts after importing it; none are included.

What starts it?

It starts on another system calling 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 38 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 38 steps before you point it at anything that matters.