This workflow corresponds to n8n.io template #7173 — we link there as the canonical source.
This workflow follows the Agent → HTTP Request recipe pattern — see all workflows that pair these two integrations.
The workflow JSON
Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →
{
"id": "VtM8HCd8u8XVdY76",
"name": "AI Movie Recommender on WhatsApp",
"tags": [],
"nodes": [
{
"id": "7b3c972a-bed3-45d3-bd94-1fd6d4f2f0c2",
"name": "Ollama Model",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
100,
1220
],
"parameters": {
"model": "llama3.2-16000:latest",
"options": {}
},
"credentials": {
"ollamaApi": {
"name": "<your credential>"
}
},
"typeVersion": 1
},
{
"id": "01b7e2c5-b991-4092-8391-53647b710ada",
"name": "Analyze WhatsApp Message",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
20,
1000
],
"parameters": {
"text": "={{ $json.body.message }}",
"options": {
"systemMessage": "You are a movie assistant that analyzes WhatsApp messages for movie requests.\n\nAnalyze the message and determine:\n1. If it's asking for a specific movie (return: \"specific:MovieName\")\n2. If it's asking for genre recommendations (return: \"genre:GenreName\")\n3. If it's asking where to watch something (return: \"where:MovieName\")\n\nExamples:\n- \"I want to watch horror movies\" \u2192 \"genre:horror\"\n- \"Where can I watch Jumanji?\" \u2192 \"where:Jumanji\"\n- \"Recommend me action films\" \u2192 \"genre:action\"\n- \"What's available on Netflix?\" \u2192 \"genre:popular\"\n\nReply with only the format above, nothing else.\n\nInput: {{ $json.body.message }}"
},
"promptType": "define"
},
"typeVersion": 2
},
{
"id": "e6af8044-a298-4020-8e66-1fcd798a2934",
"name": "Check Request Type",
"type": "n8n-nodes-base.if",
"position": [
400,
1000
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.output }}",
"value2": "specific:",
"operation": "contains"
}
]
}
},
"typeVersion": 1
},
{
"id": "46191d6d-568a-463d-9cab-dbc4907ffcde",
"name": "Check Where Request",
"type": "n8n-nodes-base.if",
"position": [
620,
1080
],
"parameters": {
"conditions": {
"string": [
{
"value1": "={{ $json.output }}",
"value2": "where:",
"operation": "contains"
}
]
}
},
"typeVersion": 1
},
{
"id": "578c6858-2b24-45a4-9f7b-3dd4999a5548",
"name": "Extract Movie Title",
"type": "n8n-nodes-base.set",
"position": [
840,
900
],
"parameters": {
"values": {
"string": [
{
"name": "movie_title",
"value": "={{ $json.output.split(':')[1] }}"
},
{
"name": "phone_number",
"value": "={{ $node[\"WhatsApp Webhook Trigger\"].json.body.from }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"id": "0283347d-f2dd-4695-b536-9ba16c997bfb",
"name": "Extract Genre",
"type": "n8n-nodes-base.set",
"position": [
840,
1120
],
"parameters": {
"values": {
"string": [
{
"name": "genre",
"value": "={{ $json.output.split(':')[1] }}"
},
{
"name": "phone_number",
"value": "={{ $node[\"WhatsApp Webhook Trigger\"].json.body.from }}"
}
]
},
"options": {},
"keepOnlySet": true
},
"typeVersion": 1
},
{
"id": "e5831fc6-0b89-4944-83d6-c7bf5dfabd9f",
"name": "Search Specific Movie",
"type": "n8n-nodes-base.httpRequest",
"position": [
1060,
900
],
"parameters": {
"url": "https://api.themoviedb.org/3/search/movie",
"options": {},
"authentication": "predefinedCredentialType",
"queryParametersUi": {
"parameter": [
{
"name": "api_key",
"value": "YOUR_TMDB_API_KEY"
},
{
"name": "query",
"value": "={{ $json.movie_title }}"
}
]
}
},
"typeVersion": 1
},
{
"id": "1b6d90a5-16dc-4826-88e5-05ee09b0d152",
"name": "Search Movies by Genre",
"type": "n8n-nodes-base.httpRequest",
"position": [
1060,
1120
],
"parameters": {
"url": "https://api.themoviedb.org/3/discover/movie",
"options": {},
"authentication": "predefinedCredentialType",
"queryParametersUi": {
"parameter": [
{
"name": "api_key",
"value": "YOUR_TMDB_API_KEY"
},
{
"name": "with_genres",
"value": "={{ $json.genre === 'horror' ? '27' : $json.genre === 'action' ? '28' : $json.genre === 'comedy' ? '35' : $json.genre === 'drama' ? '18' : $json.genre === 'romance' ? '10749' : $json.genre === 'thriller' ? '53' : $json.genre === 'sci-fi' || $json.genre === 'science fiction' ? '878' : '28' }}"
},
{
"name": "sort_by",
"value": "popularity.desc"
},
{
"name": "page",
"value": "1"
}
]
}
},
"typeVersion": 1
},
{
"id": "6142cc81-1377-4282-99eb-03d472dd2d5a",
"name": "Get Streaming Availability",
"type": "n8n-nodes-base.httpRequest",
"position": [
1280,
900
],
"parameters": {
"url": "https://api.watchmode.com/v1/title/{{ $json.results[0].id }}/details/",
"options": {},
"queryParametersUi": {
"parameter": [
{
"name": "apiKey",
"value": "YOUR_WATCHMODE_API_KEY"
},
{
"name": "append_to_response",
"value": "sources"
}
]
}
},
"typeVersion": 1
},
{
"id": "444665c4-e78c-4601-9802-75de6260d6d9",
"name": "Format Genre Recommendations",
"type": "n8n-nodes-base.code",
"position": [
1280,
1120
],
"parameters": {
"jsCode": "// Format movie recommendations from genre search\nconst movies = items[0].json.results.slice(0, 5); // Top 5 movies\nconst genre = $node[\"Extract Genre\"].json.genre;\nconst phoneNumber = items[0].json.phone_number;\n\nlet message = `\ud83c\udfac *${genre.toUpperCase()} Movie Recommendations:*\\n\\n`;\n\nmovies.forEach((movie, index) => {\n const rating = movie.vote_average ? `\u2b50 ${movie.vote_average}/10` : 'No rating';\n const year = movie.release_date ? `(${movie.release_date.split('-')[0]})` : '';\n \n message += `${index + 1}. *${movie.title}* ${year}\\n`;\n message += `${rating}\\n`;\n if (movie.overview && movie.overview.length > 100) {\n message += `${movie.overview.substring(0, 100)}...\\n\\n`;\n } else if (movie.overview) {\n message += `${movie.overview}\\n\\n`;\n } else {\n message += 'No description available\\n\\n';\n }\n});\n\nmessage += `\ud83d\udca1 *Want streaming info for any movie? Just ask \"Where can I watch [Movie Name]?\"*`;\n\nreturn [{\n json: {\n phone_number: phoneNumber,\n message: message,\n type: 'genre_recommendations'\n }\n}];"
},
"typeVersion": 2
},
{
"id": "34e44718-176b-4809-94e0-9d554c5c9df0",
"name": "Format Streaming Response",
"type": "n8n-nodes-base.code",
"position": [
1500,
900
],
"parameters": {
"jsCode": "// Format streaming availability response\nconst movie = $node[\"Search Specific Movie\"].json.results[0];\nconst streamingData = items[0].json;\nconst phoneNumber = $node[\"Extract Movie Title\"].json.phone_number;\n\nif (!movie) {\n return [{\n json: {\n phone_number: phoneNumber,\n message: \"\u274c Sorry, I couldn't find that movie. Please check the spelling and try again.\",\n type: 'error'\n }\n }];\n}\n\nlet message = `\ud83c\udfac *${movie.title}*`;\nif (movie.release_date) {\n message += ` (${movie.release_date.split('-')[0]})`;\n}\nmessage += `\\n\u2b50 ${movie.vote_average}/10\\n\\n`;\n\nif (movie.overview) {\n message += `\ud83d\udcd6 *Plot:*\\n${movie.overview}\\n\\n`;\n}\n\n// Check if streaming data is available\nif (streamingData.sources && streamingData.sources.length > 0) {\n message += `\ud83d\udcfa *Available on:*\\n`;\n streamingData.sources.slice(0, 8).forEach(source => {\n const platform = source.name || source.source_name || 'Unknown Platform';\n const type = source.type === 'sub' ? '(Subscription)' : \n source.type === 'rent' ? '(Rent)' : \n source.type === 'buy' ? '(Buy)' : '';\n message += `\u2022 ${platform} ${type}\\n`;\n });\n} else {\n message += `\ud83d\udcfa *Streaming Info:*\\n\u2022 Check Netflix, Prime Video, Disney+, or other platforms\\n\u2022 May be available for rent/purchase on digital platforms`;\n}\n\nreturn [{\n json: {\n phone_number: phoneNumber,\n message: message,\n type: 'streaming_info'\n }\n}];"
},
"typeVersion": 2
},
{
"id": "ce66592d-4f92-48c0-8d27-0ae1fc170a46",
"name": "Prepare WhatsApp Message",
"type": "n8n-nodes-base.code",
"position": [
1500,
1120
],
"parameters": {
"jsCode": "// Prepare WhatsApp message payload\nconst phoneNumber = items[0].json.phone_number;\nconst message = items[0].json.message;\n\nreturn [{\n json: {\n messaging_product: \"whatsapp\",\n to: phoneNumber,\n type: \"text\",\n text: {\n body: message\n }\n }\n}];"
},
"typeVersion": 2
},
{
"id": "d9973ca2-3b10-4fae-b083-3d2b52dc52a9",
"name": "Overview",
"type": "n8n-nodes-base.stickyNote",
"position": [
-100,
0
],
"parameters": {
"color": 5,
"width": 600,
"height": 360,
"content": "## Movie Recommendation WhatsApp Bot\n\n\ud83c\udfac **Features:**\n- Genre-based recommendations (\"I want horror movies\")\n- Specific movie streaming info (\"Where can I watch Jumanji?\")\n- WhatsApp integration with rich formatting\n- TMDb API for movie data\n- Watchmode API for streaming availability\n\n\u2705 Perfect for movie lovers and entertainment bots\n\u2705 Handles both discovery and availability queries"
},
"typeVersion": 1
},
{
"id": "cc2a939c-d5e9-480d-b41d-a07d2046232a",
"name": "Setup Guide",
"type": "n8n-nodes-base.stickyNote",
"position": [
640,
0
],
"parameters": {
"color": 7,
"width": 660,
"height": 360,
"content": "## Setup Instructions:\n\n**APIs Required:**\n1. **TMDb API** (Free) - Get from themoviedb.org\n2. **Watchmode API** (Free tier) - Get from watchmode.com\n3. **WhatsApp Business API** - Meta Developer account\n\n**Configuration:**\n1. Replace API keys in HTTP Request nodes\n2. Set up WhatsApp webhook URL\n3. Configure Ollama model endpoint\n4. Test with sample messages\n\n**Example Messages:**\n- \"I want to watch horror movies\"\n- \"Where can I watch Avengers?\"\n- \"Recommend me comedy films\""
},
"typeVersion": 1
},
{
"id": "10e4252a-09a1-4b5d-9177-d7763bf5e472",
"name": "Message Processing",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
760
],
"parameters": {
"color": 4,
"width": 500,
"height": 600,
"content": "## Message Processing\n\nWhatsApp webhook receives messages \u2192 AI analyzes intent \u2192 Routes to appropriate handler"
},
"typeVersion": 1
},
{
"id": "6517c012-f59d-4c14-bd51-1d0261490ef3",
"name": "Request Routing",
"type": "n8n-nodes-base.stickyNote",
"position": [
320,
640
],
"parameters": {
"color": 3,
"width": 480,
"height": 600,
"content": "## Request Routing\n\nDetermines if user wants:\n- Specific movie info\n- Genre recommendations \n- Streaming availability"
},
"typeVersion": 1
},
{
"id": "c2b73395-abae-4d42-9eeb-8a4946f8997d",
"name": "API Integration",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
620
],
"parameters": {
"color": 6,
"width": 560,
"height": 600,
"content": "## API Integration\n\nTMDb for movie search \u2192 Watchmode for streaming \u2192 Format response \u2192 Send via WhatsApp"
},
"typeVersion": 1
},
{
"id": "6e53dc12-4048-4cca-a8e1-1ec76e557ebc",
"name": "Response Formatting",
"type": "n8n-nodes-base.stickyNote",
"position": [
1480,
700
],
"parameters": {
"color": 2,
"width": 560,
"height": 600,
"content": "## Response Formatting\n\nCustom JavaScript formats movie data with emojis, ratings, and streaming platforms for WhatsApp"
},
"typeVersion": 1
},
{
"id": "faec17ce-cb22-448c-81bd-b310487529ec",
"name": "Send WhatsApp Response",
"type": "n8n-nodes-base.httpRequest",
"position": [
1720,
1000
],
"parameters": {
"url": "https://graph.facebook.com/v17.0/YOUR_PHONE_NUMBER_ID/messages",
"options": {},
"authentication": "predefinedCredentialType"
},
"typeVersion": 1
},
{
"id": "e8ff4c7a-9ec1-47c8-897b-dbd5045e15a1",
"name": "WhatsApp Webhook Trigger",
"type": "n8n-nodes-base.webhook",
"position": [
-200,
1000
],
"parameters": {
"path": "daa6c91b-b1f7-430d-8ff1-c6afc19cdd40",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
}
],
"active": false,
"settings": {
"executionOrder": "v1"
},
"versionId": "2715ef60-87da-45ad-a9dd-46adb914aaa7",
"connections": {
"Ollama Model": {
"ai_languageModel": [
[
{
"node": "Analyze WhatsApp Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Extract Genre": {
"main": [
[
{
"node": "Search Movies by Genre",
"type": "main",
"index": 0
}
]
]
},
"Check Request Type": {
"main": [
[
{
"node": "Extract Movie Title",
"type": "main",
"index": 0
}
],
[
{
"node": "Check Where Request",
"type": "main",
"index": 0
}
]
]
},
"Check Where Request": {
"main": [
[
{
"node": "Extract Movie Title",
"type": "main",
"index": 0
}
],
[
{
"node": "Extract Genre",
"type": "main",
"index": 0
}
]
]
},
"Extract Movie Title": {
"main": [
[
{
"node": "Search Specific Movie",
"type": "main",
"index": 0
}
]
]
},
"Search Specific Movie": {
"main": [
[
{
"node": "Get Streaming Availability",
"type": "main",
"index": 0
}
]
]
},
"Search Movies by Genre": {
"main": [
[
{
"node": "Format Genre Recommendations",
"type": "main",
"index": 0
}
]
]
},
"Analyze WhatsApp Message": {
"main": [
[
{
"node": "Check Request Type",
"type": "main",
"index": 0
}
]
]
},
"Prepare WhatsApp Message": {
"main": [
[
{
"node": "Send WhatsApp Response",
"type": "main",
"index": 0
}
]
]
},
"WhatsApp Webhook Trigger": {
"main": [
[
{
"node": "Analyze WhatsApp Message",
"type": "main",
"index": 0
}
]
]
},
"Format Streaming Response": {
"main": [
[
{
"node": "Send WhatsApp Response",
"type": "main",
"index": 0
}
]
]
},
"Get Streaming Availability": {
"main": [
[
{
"node": "Format Streaming Response",
"type": "main",
"index": 0
}
]
]
},
"Format Genre Recommendations": {
"main": [
[
{
"node": "Prepare WhatsApp Message",
"type": "main",
"index": 0
}
]
]
}
}
}
Credentials you'll need
Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.
ollamaApi
For the full experience including quality scoring and batch install features for each workflow upgrade to Pro
About this workflow
This automated n8n workflow enables an AI-powered movie recommendation system on WhatsApp. Users send messages like "I want to watch a horror movie" or "Where can I watch the Jumanji movie?" The workflow uses AI to interpret the request, searches relevant APIs (e.g., TMDb,…
Source: https://n8n.io/workflows/7173/ — original creator credit. Request a take-down →
Related workflows
Workflows that share integrations, category, or trigger type with this one. All free to copy and import.
This workflow implements a privacy-preserving AI document processing pipeline that detects, masks, and securely manages Personally Identifiable Information (PII) before any AI processing occurs.
This n8n workflow enables an AI-powered symptom checker where users input symptoms via a form or chat, analyzes them using an AI model, matches possible conditions, and suggests relevant doctors with
W_ADMIN_AGENT - Autonomous AI Admin Assistant. Uses httpRequest, agent, lmChatOllama, memoryBufferWindow. Webhook trigger; 11 nodes.
⏺ 🚀 How it works
L&D_AgentsAI_ATIVO. Uses httpRequest, agent, googleCalendarTool, toolSerpApi. Webhook trigger; 93 nodes.