# Create AI-powered WhatsApp quiz bot with OpenAI and Supabase: n8n workflow

> Started by another system calling it, and works across Supabase. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply...

Source: https://millionrounds.com/workflow/create-ai-powered-whatsapp-quiz-bot-with-openai-and-supabase (Millionrounds; every figure on the page links to its filing or article)

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

# Create AI-powered WhatsApp quiz bot with OpenAI and Supabase

Started by another system calling it, and works across Supabase. It puts OpenAI behind a retrieval step, so answers are drawn from documents you supply rather than from the model alone. 13 steps, 2 branches: a working afternoon to understand properly.

Medium Calls a model: OpenAI Retrieval

[Download free](https://millionrounds.com/login?next=%2Fapp%2Fworkflow%2Fcreate-ai-powered-whatsapp-quiz-bot-with-openai-and-supabase)

**13 steps** Medium: a working afternoon

**2** Branches: places the flow splits

**0** Loops or waits

**1** Service it connects to

## The flow

Starts it 1 Model 3 Logic 3 Service 6

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

- 1 **Simple Memory** Memory Buffer Window *Model*
- 2 **OpenAI Chat Model** Lm Chat Open Ai *Model*
- 3 **Whatsapp Trigger** Webhook *Starts it*
- 4 **AI Agent - Portuguese BR System Msg** Agent *Model*
- 5 **Supabase: Fetch User Data** Supabase *Service*
- 6 **Send Message to User (WhatsApp Message)** Http Request *Service*
- 7 **User exist?** If *Logic*
- 8 **Quiz Topic Defined?** If *Logic*
- 9 **Ask For Name** Http Request *Service*
- 10 **Merge** Merge *Logic*
- 11 **Ask For Study Topic (WhatsApp Message)** Http Request *Service*
- 12 **Supabase: Update User Name** Supabase *Service*
- 13 **Supabase: Update Study Topic** Supabase *Service*

## How it's built

- **Starts on:** Another system calling it
- **Steps:** 13, with 2 branches
- **Size:** Medium: a working afternoon
- **Connects to:** Supabase
- **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 Supabase account, 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?

Plan an afternoon. 13 steps is enough that you should read each one before running it.

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 13 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%2Fcreate-ai-powered-whatsapp-quiz-bot-with-openai-and-supabase)
- **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.

[Supabase](https://millionrounds.com/workflows?service=Supabase#library)

## Workflows like it

Also data collection, with the same services where possible, closest in size first.

- [**Build a knowledge base chatbot with Jotform and Together AI** 13 steps · calls a model · Supabase](https://millionrounds.com/workflow/build-a-knowledge-base-chatbot-with-jotform-and-together-ai)
- [**Categorize Revolut transactions with OpenAI and Supabase** 14 steps · calls a model · Google Drive, Supabase](https://millionrounds.com/workflow/categorize-revolut-transactions-with-openai-and-supabase)
- [**Generate AI-powered lease renewal offers with Ollama LLM** 14 steps · calls a model · Gmail, Google Drive](https://millionrounds.com/workflow/generate-ai-powered-lease-renewal-offers-with-ollama-llm)
- [**Generate and evaluate AI prompts with Gemini and OpenRouter** 14 steps · calls a model · Supabase](https://millionrounds.com/workflow/generate-and-evaluate-ai-prompts-with-gemini-and-openrouter)
- [**Create literary English/German to Chinese dictionary** 11 steps · calls a model · Supabase](https://millionrounds.com/workflow/create-literary-english-german-to-chinese-dictionary)
- [**Track and classify Facebook ad angles with Apify and OpenAI** 15 steps · calls a model · Apify, Supabase](https://millionrounds.com/workflow/track-and-classify-facebook-ad-angles-with-apify-and-openai)
