Description
Overview
This movie recommendation automation workflow leverages retrieval-augmented generation (RAG) techniques to deliver personalized suggestions through a vector similarity search. Using a semantic search orchestration pipeline, it integrates user preferences and exclusions to generate relevant movie recommendations from a vector database.
The workflow is triggered by a chat message webhook and employs OpenAI embeddings combined with Qdrant vector storage to match user input with movie metadata sourced from a GitHub-hosted CSV file.
Key Benefits
- Delivers personalized movie recommendations based on semantic similarity using a vector search orchestration pipeline.
- Processes user preferences and negative filters for refined recommendation results in one integrated automation workflow.
- Automatically ingests and indexes large movie datasets from GitHub into a vector store for scalable querying.
- Maintains conversational context using buffer memory for coherent multi-turn dialogues in the chatbot interface.
Product Overview
This movie recommendation automation workflow begins with a manual trigger node to initiate data ingestion and indexing. It downloads the “Top_1000_IMDB_movies.csv” file from a GitHub repository, extracting movie names, release years, and descriptions. Each movie description is loaded as a document with metadata using a default data loader, then tokenized by a text splitter node. OpenAI’s “text-embedding-3-small” model generates vector embeddings for each movie description, which are inserted into the Qdrant vector store under the “imdb” collection. This setup enables efficient semantic similarity search for later queries.
For runtime, the workflow listens for chat messages through a webhook trigger. It receives user input containing positive and negative movie preference examples. These inputs are embedded via OpenAI’s embeddings endpoint, producing vectors representing desired and undesired movie features. The workflow queries Qdrant’s recommendation API using these embeddings with an “average_vector” strategy to retrieve the top three recommended movies ranked by similarity to the positive example and dissimilarity to the negative example.
Metadata for the recommended movies is fetched in bulk from Qdrant, then filtered and aggregated to create a structured response. An AI agent, configured with a system message, generates natural language output presenting the top three recommendations without exposing raw scores. The conversational chatbot uses window buffer memory to preserve context. This workflow operates synchronously, returning recommendations within a single chat interaction cycle. Error handling relies on n8n’s default retry mechanisms. Authentication with OpenAI and Qdrant is managed through API keys configured in credentials.
Features and Outcomes
Core Automation
This no-code integration pipeline accepts user preference inputs and negative filters as textual examples, embedding them into vector representations for similarity analysis. The workflow deterministically selects the top three movie recommendations based on vector distance using Qdrant’s recommend API.
- Single-pass evaluation of user query embeddings against indexed movie vectors.
- Deterministic filtering by combining positive and negative embedding vectors.
- Automated extraction and aggregation of metadata for final recommendation output.
Integrations and Intake
The workflow integrates GitHub for movie data retrieval, OpenAI for embedding generation and chat completion, and Qdrant for vector storage and similarity search. Authentication uses API keys for OpenAI and Qdrant services. The intake consists of a manual trigger for data loading and a webhook trigger for chat queries.
- GitHub API: downloads CSV file containing movie metadata.
- OpenAI API: generates embeddings and chat completions using authenticated HTTP requests.
- Qdrant Vector Store API: inserts movie vectors and queries recommendations via authenticated POST requests.
Outputs and Consumption
The output consists of a structured natural language chat response listing the top three recommended movies. This synchronous response includes movie names, release years, and descriptions filtered from Qdrant results. The AI agent formats these recommendations based on retrieved metadata.
- Response format: natural language text for chatbot consumption.
- Data fields: movie name, release year, description, recommendation order.
- Returned synchronously within a single chat message interaction.
Workflow — End-to-End Execution
Step 1: Trigger
The workflow starts either manually via a trigger node to ingest movie data or automatically via a webhook trigger when a chat message is received. The webhook listens for incoming chat requests containing user preference examples for recommendation queries.
Step 2: Processing
Initial processing includes downloading and extracting CSV data from GitHub, loading movie descriptions with metadata, and splitting text into tokens if necessary. User input is parsed into positive and negative example strings. Basic presence checks ensure required fields are included before embedding generation.
Step 3: Analysis
The workflow uses OpenAI embeddings to convert user examples into vector representations. These vectors are passed to Qdrant’s recommendation API using an average vector strategy that combines positive and negative embeddings. The API returns the top three matching movie points based on similarity scores.
Step 4: Delivery
Recommended movie metadata is retrieved from Qdrant by point IDs and filtered for relevant fields. The AI agent then generates a natural language response presenting the top three movie recommendations in a conversational format. The response is returned synchronously via the webhook to the chat interface.
Use Cases
Scenario 1
A user wants personalized movie suggestions excluding horror genres. The workflow uses positive example embeddings for preferred genres and negative embeddings for undesired content, querying the vector store to return three suitable movies. This deterministic process returns structured recommendations in one interaction.
Scenario 2
Content curators need to filter large movie datasets for thematic similarity. By ingesting movie metadata from GitHub and indexing with vector embeddings, the orchestration pipeline enables semantic querying against user-defined themes, efficiently returning top matches without manual review.
Scenario 3
Customer support chatbots require contextual movie recommendations during live conversations. Maintaining buffer memory allows the AI agent to preserve dialogue context, ensuring follow-up queries receive coherent, relevant movie suggestions based on prior user preferences.
How to use
To deploy this movie recommendation automation workflow, import it into the n8n environment. Configure credentials for GitHub, OpenAI, and Qdrant with valid API keys. Initiate the workflow manually to ingest and index movie data from the CSV file. Activate the webhook trigger to listen for chat messages containing user preference examples.
When live, send chat requests including positive and negative example texts. The workflow generates embeddings, queries the vector database, and returns top recommendations within the same chat session. Expected results include a natural language list of three recommended movies with relevant metadata. Monitor logs for errors and ensure API credentials remain valid for uninterrupted operation.
Comparison — Manual Process vs. Automation Workflow
| Attribute | Manual/Alternative | This Workflow |
|---|---|---|
| Steps required | Multiple manual data retrieval, embedding, and search steps. | One integrated pipeline combining ingestion, embedding, and querying. |
| Consistency | Subject to human error and inconsistent criteria application. | Deterministic embedding-based similarity ensures consistent recommendations. |
| Scalability | Limited by manual processing and dataset size handling. | Scales automatically with vector store indexing and API calls. |
| Maintenance | Requires frequent manual updates and data curation. | Automated data refresh and indexing reduce ongoing maintenance. |
Technical Specifications
| Environment | n8n automation platform |
|---|---|
| Tools / APIs | GitHub API, OpenAI Embeddings and Chat API, Qdrant Vector Store API |
| Execution Model | Synchronous request-response for chat queries; manual trigger for data ingestion |
| Input Formats | CSV file from GitHub; JSON chat query with positive and negative examples |
| Output Formats | Natural language text response with movie recommendations |
| Data Handling | Transient in-memory processing; vector data persisted in Qdrant collection |
| Known Constraints | Relies on availability of external APIs (OpenAI, Qdrant, GitHub) |
| Credentials | API keys for OpenAI, Qdrant, and GitHub configured in n8n |
Implementation Requirements
- Valid API credentials for OpenAI embeddings and chat services.
- Qdrant vector database access with appropriate API key and collection setup.
- GitHub repository access to download the movie CSV file.
Configuration & Validation
- Verify API credentials for OpenAI, Qdrant, and GitHub are correctly configured in n8n credentials.
- Test manual trigger to ensure movie data is downloaded and indexed without errors.
- Send test chat messages to webhook trigger with valid positive and negative example fields and validate response correctness.
Data Provenance
- Trigger node: “When chat message received” webhook initiates the query process.
- Data source: GitHub node retrieves the “Top_1000_IMDB_movies.csv” file.
- Embedding generation: OpenAI embedding nodes generate vector representations for movie descriptions and user queries.
- Vector storage and search: Qdrant Vector Store node indexes data and executes recommendation queries.
- AI response generation: “AI Agent” node formats recommendations using OpenAI chat completions.
FAQ
How is the movie recommendation automation workflow triggered?
The workflow is triggered by a webhook that receives chat messages containing user preference examples. Additionally, a manual trigger node initiates data ingestion from GitHub.
Which tools or models does the orchestration pipeline use?
It uses OpenAI’s “text-embedding-3-small” model for creating vector embeddings and OpenAI chat models for natural language response generation, combined with the Qdrant vector store for similarity search.
What does the response look like for client consumption?
The response is a natural language list of the top three recommended movies, including movie names, release years, and descriptions, returned synchronously via the chat interface.
Is any data persisted by the workflow?
Movie embeddings and metadata are persisted in the Qdrant vector store collection; other data is processed transiently during workflow execution without long-term storage.
How are errors handled in this integration flow?
Error handling uses n8n’s default retry and backoff mechanisms. There are no custom error management nodes configured in this workflow.
Conclusion
This movie recommendation automation workflow provides a reliable method to generate personalized suggestions using semantic similarity search with vector embeddings. By integrating GitHub data ingestion, OpenAI embedding generation, and Qdrant vector search, it deterministically returns relevant movies based on user preferences and exclusions. The workflow depends on external API availability and valid credential configuration for seamless operation. Its structured design supports scalable, consistent recommendations without manual intervention, suitable for chatbot or content curation applications requiring contextual, real-time movie suggestions.








Reviews
There are no reviews yet.