{"product_id":"n8n-quiz-generator-mistral-supabase-webhooks-workflow","title":"n8n Quiz Generator: Mistral + Supabase Webhooks Workflow","description":"\u003ch3\u003eGenerate and Serve a 10-Question Quiz with n8n, Mistral, and Supabase Webhooks\u003c\/h3\u003e\n\u003cp\u003eThis n8n workflow instantly generates a 10-question multiple-choice quiz using \u003cstrong\u003eMistral Cloud\u003c\/strong\u003e and saves it to \u003cstrong\u003eSupabase\u003c\/strong\u003e. It also exposes a second \u003cstrong\u003ewebhook\u003c\/strong\u003e to fetch a saved quiz by ID—ready for your frontend to display.\u003c\/p\u003e\n\n\u003ch3\u003eWhat this workflow does\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCreates quizzes via webhook:\u003c\/strong\u003e Sends a POST request to the \u003ccode\u003egenerate-quiz\u003c\/code\u003e webhook with \u003cem\u003etopic\u003c\/em\u003e, \u003cem\u003edifficulty\u003c\/em\u003e, and \u003cem\u003enumber of questions\u003c\/em\u003e.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eCalls Mistral for strict JSON output:\u003c\/strong\u003e Uses \u003ccode\u003emistral-large-latest\u003c\/code\u003e (Mistral Cloud) to generate quiz questions as \u003cstrong\u003estrict JSON\u003c\/strong\u003e based on the provided topic and difficulty.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eValidates generated content:\u003c\/strong\u003e Parses the returned JSON into individual question items and stops with an error response if no questions are produced.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eStores quiz metadata in Supabase:\u003c\/strong\u003e Normalizes difficulty into a stored label (\u003cem\u003eEasy\/Medium\/Hard\u003c\/em\u003e) and creates a quiz record in Supabase.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003ePersists full question details:\u003c\/strong\u003e Iterates over each generated question and inserts options, \u003cem\u003ecorrect_answer\u003c\/em\u003e, \u003cem\u003eexplanation\u003c\/em\u003e, and the associated \u003cem\u003equiz ID\u003c\/em\u003e into the Supabase \u003ccode\u003equestions\u003c\/code\u003e table.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eReturns the result:\u003c\/strong\u003e Responds with JSON confirming success and providing the created Supabase quiz ID.\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eFetches saved quizzes via webhook:\u003c\/strong\u003e The \u003ccode\u003eget-quiz\u003c\/code\u003e webhook accepts a quiz ID, retrieves the quiz and its questions from Supabase, and returns a single JSON payload for your application.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eUse cases\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003eSaaS operators building an “instant practice quiz” feature for any learning topic.\u003c\/li\u003e\n  \u003cli\u003eAutomation engineers wiring a quiz-generation backend with \u003cstrong\u003en8n webhooks\u003c\/strong\u003e and a Supabase-backed datastore.\u003c\/li\u003e\n  \u003cli\u003eFrontends that need a simple “generate now” + “fetch by ID” API pattern.\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003ch3\u003eTechnical details\u003c\/h3\u003e\n\u003cul\u003e\n  \u003cli\u003e\n\u003cstrong\u003en8n webhook endpoints:\u003c\/strong\u003e \u003ccode\u003egenerate-quiz\u003c\/code\u003e and \u003ccode\u003eget-quiz\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eMistral integration:\u003c\/strong\u003e Mistral Cloud chat model \u003ccode\u003emistral-large-latest\u003c\/code\u003e\n\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eSupabase storage:\u003c\/strong\u003e \u003ccode\u003equizzes\u003c\/code\u003e and \u003ccode\u003equestions\u003c\/code\u003e tables (with fields matching workflow inputs and question data)\u003c\/li\u003e\n  \u003cli\u003e\n\u003cstrong\u003eWorkflow nodes:\u003c\/strong\u003e if, set, code, merge, switch, webhook\u003c\/li\u003e\n\u003c\/ul\u003e\n\n\u003cp\u003e\u003cstrong\u003eSetup note:\u003c\/strong\u003e Add your Mistral Cloud and Supabase credentials, and ensure the required Supabase tables\/fields exist before deploying.\u003c\/p\u003e","brand":"N8N Commerce","offers":[{"title":"Default Title","offer_id":45850498367667,"sku":"N8N-18303","price":18.99,"currency_code":"GBP","in_stock":true}],"thumbnail_url":"\/\/cdn.shopify.com\/s\/files\/1\/0749\/6279\/6723\/files\/VLkzQ7yXMhUS75jg9PAQH_38IChQW7.png?v=1786870977","url":"https:\/\/buyflowscripts.com\/products\/n8n-quiz-generator-mistral-supabase-webhooks-workflow","provider":"N8N Commerce","version":"1.0","type":"link"}