# RAG Chatbot with Signup Automation: n8n workflow template

> Started by another system calling it, and works across Google Drive, Postgres and Supabase vectors.

Source: https://millionrounds.com/workflow/rag-chatbot-with-signup-automation (Millionrounds; every figure on the page links to its filing or article)

[Automation library](https://millionrounds.com/workflows) · [Lead generation](https://millionrounds.com/workflows?category=Lead+generation#library)

# 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.

Large Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Frag-chatbot-with-signup-automation)

**38 steps** Large: read it before trusting it with anything live

**5** Branches: places the flow splits

**0** Loops or waits

**3** Services it connects to

## The flow

Starts it 6 Model 8 Logic 15 Service 9

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

- 1 **Postgres Chat Memory** Memory Postgres Chat *Model*
- 2 **Agent LLM** Lm Chat Open Ai *Model*
- 3 **Embeddings OpenAI** Embeddings Open Ai *Model*
- 4 **When chat message received** Webhook *Starts it*
- 5 **GDrive: Watch Knowledge Base Folder** Google Drive trigger *Starts it*
- 6 **OpenAI: Generate Embeddings** Embeddings Open Ai *Model*
- 7 **oader: Format Document + Metadata** Document Default Data Loader *Model*
- 8 **AI Agent** Agent *Model*
- 9 **Supabase Vector Store** Vector Store Supabase *Model*
- 10 **Sanitize Query** Code *Logic*
- 11 **DB: Check File Already Ingested** Postgres *Service*
- 12 **Vector DB: Upsert Embeddings (Supabase)** Vector Store Supabase *Model*
- 13 **Check Existing Signup** Postgres *Service*
- 14 **Input Valid?** If *Logic*
- 15 **IF: File Exists in Ingestion Log** If *Logic*
- 16 **IF: Embedding Pipeline Success** If *Logic*
- 17 **Signup Already Saved?** If *Logic*
- 18 **Build Error Response** Set *Logic*
- 19 **Skip already ingested file** No Op *Logic*
- 20 **Code: Classify Document Type** Code *Logic*
- 21 **Code: Aggregate Chunk Count** Code *Logic*
- 22 **DB: Log Failed Ingestion** Postgres *Service*
- 23 **Reply to User (Skip Signup Extraction)** Set *Logic*
- 24 **Fetch Full History** Postgres *Service*
- 25 **Respond, Invalid Input** Respond To Webhook *Starts it*
- 26 **GDrive: Download File** Google Drive *Service*
- 27 **DB: Log Successful Ingestion** Postgres *Service*
- 28 **Respond, Already Registered** Respond To Webhook *Starts it*
- 29 **Extract Signup Data** Code *Logic*
- 30 **Extract: PDF/Text Content** Extract From File *Service*
- 31 **Signup Complete?** If *Logic*
- 32 **Code: Clean + Chunk Text (400 chars strategy)** Code *Logic*
- 33 **Save Signup to Supabase** Postgres *Service*
- 34 **Save Partial + Flag** Postgres *Service*
- 35 **Reply to User (Complete)** Set *Logic*
- 36 **Reply to User (Partial)** Set *Logic*
- 37 **Respond, Signup Complete** Respond To Webhook *Starts it*
- 38 **Respond, Signup Partial** Respond To Webhook *Starts 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.

## Run it in n8n

- **Create your n8n account** Free to start. n8n is where the workflow runs. [Create an n8n account ↗](https://millionrounds.com/n8n)
- **Download the workflow** Free with a Millionrounds account. [Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Frag-chatbot-with-signup-automation)
- **Paste it into n8n** Open a new workflow in n8n and paste. Then connect your own accounts.

Stored with the author's traces removed: canvas notes, instance identifiers, saved credential names and any live document they had left behind.

## Connects to

Each opens the other workflows that use it.

[Google Drive](https://millionrounds.com/workflows?service=Google+Drive#library)[Postgres](https://millionrounds.com/workflows?service=Postgres#library)[Supabase vectors](https://millionrounds.com/workflows?service=Supabase+vectors#library)

## Workflows like it

Also lead generation, with the same services where possible, closest in size first.

- [**Score and route real estate leads with OpenAI and MLS** 35 steps · calls a model · Email, Postgres](https://millionrounds.com/workflow/score-and-route-real-estate-leads-with-openai-and-mls)
- [**Send CRM lead outreach emails with Notion and Gmail** 32 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/send-crm-lead-outreach-emails-with-notion-and-gmail)
- [**Enrich FAQ sections on your website pages at scale with OpenAI** 29 steps · calls a model · Google Drive, Google Sheets](https://millionrounds.com/workflow/enrich-faq-sections-on-your-website-pages-at-scale-with-open)
- [**Multi-Channel Lead Enrichment & Scoring Pipeline with Clearbit** 29 steps · Asana, Email](https://millionrounds.com/workflow/multi-channel-lead-enrichment-and-scoring-pipeline-with-clea)
- [**AI website scraper & company intelligence with Mistral** 28 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/ai-website-scraper-and-company-intelligence-with-mistral)
- [**Enrich seller data with Bright Data and Google Search** 28 steps · Postgres](https://millionrounds.com/workflow/enrich-seller-data-with-bright-data-and-google-search)
