π¬ Generate quizzes and run multiplayer quiz contests with Mistral and Supabase
β‘ 7 views Β· π¬ Content Creation & Video
Description
Quick overview
This workflow powers MindArenaβs quiz features by generating and retrieving quizzes in Supabase, managing multiplayer contest rooms via a single webhook, and producing personalized quiz-performance feedback using Mistral Cloud.
How it works
- Receives a POST request to
/webhook/generate-quiz, sends the topic, difficulty, and question count to Mistral Cloud to generate multiple-choice questions, and stores the quiz and questions in Supabase before returning thequiz_id. - Receives a request to
/webhook/get-quiz, fetches the quiz and its questions from Supabase byquiz_id, and returns a combined JSON payload to the client. - Receives a POST request to
/webhook/ai-feedback, sends the submitted quiz performance data to Mistral Cloud via an AI Agent to generate structured tutoring feedback. - Parses the AI output into
overall_performance,strengths,areas_to_improve, andpractical_suggestion, falling back to default feedback when the AI returns invalid JSON. - Receives a POST request to
/webhook/arena-management, routes byaction, and uses Supabase to create rooms (including generating quiz questions), join rooms, start contests, fetch contest questions, submit scored results, and return a ranked leaderboard.
Setup
- Add a Supabase API credential and ensure your Supabase project has the required tables (at minimum:
quizzes,questions,rooms,room_players, andcontest_results). - Add a Mistral Cloud API credential for the Mistral chat model used for quiz generation and performance feedback.
- Deploy the workflow and configure your frontend to call the webhook endpoints (
/webhook/generate-quiz,/webhook/get-quiz,/webhook/ai-feedback, and/webhook/arena-management) with the expected JSON fields such asquiz_id,action, and room/answer payloads. - For the arena flow, generate a quiz first (or pass a valid
quiz_id) before callingstartContest, and ensurecreateRoomincludes validmax_players(2β10) andnumber_of_questions.
Additional info
Need Help or Customization?
Digital Biz Tech can help tailor this workflow to your business.
We offer free setup support, including credential configuration and deployment.
Contact: rajeet.nair@digitalbiz.tech Website: https://www.digitalbiz.tech LinkedIn: https://www.linkedin.com/company/digital-biz-tech/
Developer:JESWIN MADONA M LinkedIn: https://www.linkedin.com/in/jeswinmadona/
You can also DM us on LinkedIn for any help or customization.
π Nodes Used
Webhook, Supabase, AI Agent, Basic LLM Chain, Mistral Cloud Chat Model
π₯ Import
Download workflow.json and import into n8n:
Workflow menu β Import from File