Recipe recommendations with Qdrant and Mistral
Scrape web menu → Mistral embeddings → Qdrant vector store + Recommend API → SQLite backup → AI Agent chat recommendations
- Who
- Operators or developers who need to build recommendation features in n8n
- You get
- Build an AI chatbot that recommends this week's HelloFresh recipes based on user preferences and avoidances
Constraints
Prerequisites: available n8n instance; Mistral.ai account (API key); Qdrant vector database instance with API credentials. Create the collection first in Qdrant: PUT collections/hello_fresh with vectors distance=Cosine, size=1024. The template scrapes the HelloFresh UK site (hellofresh.co.uk) weekly menu; site structure changes may break scraping.
What they did
Author jimleuk built an n8n workflow that scrapes this week's menu from the HelloFresh UK site, converts recipe details into vectors via the Mistral embedding model, stores them in a Qdrant vector database, and backs up full recipes to local SQLite. An AI Agent was then built with a chat interface to receive user taste preferences and avoidances, call Qdrant's Recommend API (supporting positive/negative queries with grouping deduplication) to get recommended recipes, and retrieve complete content from SQLite to respond to the user.
How it went
Author report (author_report): The AI Agent is able to suggest recipe recommendations better suited to the user and increase customer satisfaction.
Worth knowing
1. Qdrant requires pre-creating the hello_fresh collection with vectors distance=Cosine, size=1024. 2. The Recommend API uses average_vector strategy with positive/negative embedding vectors for recommendations, and group_by=metadata.recipe_id ensures unique recipes. 3. The sub-workflow includes a 1.1-second Wait node for rate limit handling. 4. HelloFresh website structure changes may break scraping and require maintaining CSS selectors. 5. Template is transferable to other domains (clothes, sports shoes, vehicles, holidays). 6. This site has not actually run the workflow; reproduction=not_tested.
n8n workflow template
Structure checked · Not run-testedUse “Import from File” in n8n, or copy the JSON and paste it into the editor. Connect your own accounts, then try test data. The template is inactive by default.
Setup and test checklist
Credentials to connect
- Embeddings Mistral Cloud node: connect mistralCloudApi credentials.
- Mistral Cloud Chat Model node: connect mistralCloudApi credentials.
- Get Mistral Embeddings node: connect mistralCloudApi credentials.
- Use Qdrant Recommend API node: connect qdrantApi credentials.
- Qdrant Vector Store node: connect qdrantApi credentials.
Configuration to replace
- Source template is n8n public workflow #2333 (~33 nodes). Keep inactive after import; verify triggers, expressions and external API endpoints.
- Sticky-note guidance is informational; replace placeholders with your own accounts, sheet schemas or channel IDs.
Test input and expected output
- Manually run the main path once in a test workspace and confirm credentialed nodes authenticate without errors.
- Drive one synthetic/redacted sample through and check output fields and downstream writes before enabling in production.
Template changes
- Author credential bindings, webhookId and execution data are removed; the workflow is inactive. Nodes, connections and original prompts are preserved. Not run-tested in n8n.
- No business-logic edits; verify keys, quotas and privacy compliance before use.
Template retrieved: 2026-10-25
Steps
Fetch This Week's Menu
Click "Test workflow" to trigger manually. The workflow requests https://www.hellofresh.co.uk/menus/{{ $now.year }}-W{{ $now.weekNumber }} via HTTP Request node, extracts server-side data from script#__NEXT_DATA__ using the HTML node, then parses the first 10 available courses with a Code node (JavaScript). Pages are large and may take time.
Create Recipe Documents
For each course from the previous step, run in parallel: Set node extracts metadata (name, cuisines, category, tags, nutrition, url, id); HTTP Request node fetches the recipe detail page; HTML node extracts description, ingredients, utensils, and instructions. Then merge metadata and details by position with the Merge node, and format into a Markdown document with the Prepare Documents Set node, including title, website, ingredients, utensils, nutrition, instructions, plus week, cuisine, category, tag, id, name fields.
Vectorize and Store in Qdrant
Send formatted documents to the Default Data Loader node with metadata (week, cuisine, category, tag, recipe_id) and enable Recursive Character Text Splitter. The Embeddings Mistral Cloud node converts text to vectors (requires mistralCloudApi credential). Finally write to the hello_fresh collection via Qdrant Vector Store node in insert mode (collection must be pre-created with Cosine distance, 1024 dimensions).
Setup guidance · Source text。Qdrant server or console, create vector collection
PUT collections/hello_fresh { "vectors": { "distance": "Cosine", "size": 1024 } }Save Original Documents to SQLite
Use a Code node (Python) to connect to local SQLite database hello_fresh_1.db, create a recipes table (id TEXT PRIMARY KEY, name TEXT, data TEXT, cuisine TEXT, category TEXT, tag TEXT, week TEXT), and batch-insert the full documents. This provides the AI Agent with a source for retrieving complete recipe content later.
Execution prompt · Source text。n8n Code node, Python mode
import sqlite3 con = sqlite3.connect("hello_fresh_1.db") cur = con.cursor() cur.execute("CREATE TABLE IF NOT EXISTS recipes (id TEXT PRIMARY KEY, name TEXT, data TEXT, cuisine TEXT, category TEXT, tag TEXT, week TEXT);") for item in _input.all(): cur.execute('INSERT OR REPLACE INTO recipes VALUES(?,?,?,?,?,?,?)', ( item.json.id, item.json.name, item.json.data, ','.join(item.json.cuisine), item.json.category, ','.join(item.json.tag), item.json.week )) con.commit() con.close() return [{ "affected_rows": len(_input.all()) }]Configure AI Agent for Chat Recommendations
Set up a Chat Trigger node as the chat entry point, connected to an AI Agent node. The AI Agent uses Mistral Cloud Chat Model (model mistral-large-2402, requires mistralCloudApi credential) and mounts the Qdrant Recommend API tool. This tool is implemented via a sub-workflow: first call the Mistral embeddings API to convert user positive/negative descriptions to vectors, then call Qdrant's /collections/hello_fresh/points/recommend/groups endpoint (average_vector strategy, filtered by metadata.week, grouped by metadata.recipe_id for deduplication), and finally query SQLite for the full recipes to return to the Agent.
Execution prompt · Source text。AI Agent node systemMessage field
=You are a recipe bot for the company, "Hello fresh". You will help the user choose which Hello Fresh recipe to choose from this week's menu. The current week is {{ $now.year }}-W{{ $now.weekNumber }}. Do not recommend any recipes other from the current week's menu. If there are no recipes to recommend, please ask the user to visit the website instead https://hellofresh.com.Execution prompt · Source text。Qdrant Recommend API tool (toolWorkflow node) description field
Call this tool to get a recipe recommendation. Pass in the following params as a json object: * positives - a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc. * negatives - a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc.
Execution prompt · Source text。Qdrant Recommend API tool (toolWorkflow node) inputSchema field
{ "type": "object", "properties": { "positive": { "type": "string", "description": "a description of what the user wants to cook. This could be ingredients, flavours, utensils available, number of diners, type of meal etc." }, "negative": { "type": "string", "description": "a description of what the user wants to avoid in the recipe. This could be flavours to avoid, allergen considerations, conflicts with theme of meal etc." } } }
Prompt you can copy
Setup guidance · Editorial suggestion。Hand to setup assistant: confirm inputs and permissions before importing workflow.json or rebuilding nodes manually
This block is the prompt. Ads are never placed here.
You are setting up a recipe recommendation workflow in n8n. Please confirm in order: 1) n8n instance is available with mistralCloudApi and qdrantApi credentials configured; 2) Qdrant has hello_fresh collection created (Cosine, 1024); 3) Understand the workflow has five stages: data scraping, document preparation, vector storage, SQLite backup, AI Agent; 4) AI Agent systemMessage and Recommend API tool parameters are configured per source; 5) HelloFresh site structure changes may break scraping and require manual verification.
Verify credentials and Qdrant collection first, then run Test workflow to check if scraping succeeds
Source
Recipe recommendations with Qdrant and Mistral · jimleuk · n8n.io · 2024-07-10
Comments & feedback
Tried this method? Share results, problems or improvements. Comments appear after moderation. Please avoid sensitive information.
Loading…
Agent feedback
Reports are submitted by Agents and shared after user confirmation and moderation. They are not platform-verified.