Recomendador de películas de IA en WhatsApp
Este es unSupport Chatbot, Multimodal AIflujo de automatización del dominio deautomatización que contiene 20 nodos.Utiliza principalmente nodos como If, Set, Code, Webhook, HttpRequest. Recomendador de películas IA en WhatsApp
- •Punto final de HTTP Webhook (n8n generará automáticamente)
- •Pueden requerirse credenciales de autenticación para la API de destino
Nodos utilizados (20)
Categoría
{
"id": "VtM8HCd8u8XVdY76",
"meta": {
"instanceId": "dd69efaf8212c74ad206700d104739d3329588a6f3f8381a46a481f34c9cc281"
},
"name": "AI Movie Recommender on WhatsApp",
"tags": [],
"nodes": [
{
"id": "7b3c972a-bed3-45d3-bd94-1fd6d4f2f0c2",
"name": "Modelo Ollama",
"type": "@n8n/n8n-nodes-langchain.lmChatOllama",
"position": [
100,
1220
],
"parameters": {
"model": "llama3.2-16000:latest",
"options": {}
},
"credentials": {
"ollamaApi": {
"id": "7td3WzXCW2wNhraP",
"name": "Ollama - test"
}
},
"typeVersion": 1
},
{
"id": "01b7e2c5-b991-4092-8391-53647b710ada",
"name": "Analizar Mensaje WhatsApp",
"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\" → \"genre:horror\"\n- \"Where can I watch Jumanji?\" → \"where:Jumanji\"\n- \"Recommend me action films\" → \"genre:action\"\n- \"What's available on Netflix?\" → \"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": "Verificar Tipo de Solicitud",
"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": "Verificar Origen de la Solicitud",
"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": "Extraer Título de Película",
"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": "Extraer Género",
"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": "Buscar Película Específica",
"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": "Buscar Películas por Género",
"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": "Obtener Disponibilidad en Streaming",
"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": "Formatear Recomendaciones por Género",
"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 = `🎬 *${genre.toUpperCase()} Movie Recommendations:*\\n\\n`;\n\nmovies.forEach((movie, index) => {\n const rating = movie.vote_average ? `⭐ ${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 += `💡 *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": "Formatear Respuesta de Streaming",
"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: \"❌ Sorry, I couldn't find that movie. Please check the spelling and try again.\",\n type: 'error'\n }\n }];\n}\n\nlet message = `🎬 *${movie.title}*`;\nif (movie.release_date) {\n message += ` (${movie.release_date.split('-')[0]})`;\n}\nmessage += `\\n⭐ ${movie.vote_average}/10\\n\\n`;\n\nif (movie.overview) {\n message += `📖 *Plot:*\\n${movie.overview}\\n\\n`;\n}\n\n// Check if streaming data is available\nif (streamingData.sources && streamingData.sources.length > 0) {\n message += `📺 *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 += `• ${platform} ${type}\\n`;\n });\n} else {\n message += `📺 *Streaming Info:*\\n• Check Netflix, Prime Video, Disney+, or other platforms\\n• 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": "Preparar Mensaje WhatsApp",
"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": "Descripción General",
"type": "n8n-nodes-base.stickyNote",
"position": [
-100,
0
],
"parameters": {
"color": 5,
"width": 600,
"height": 360,
"content": "## Movie Recommendation WhatsApp Bot\n\n🎬 **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✅ Perfect for movie lovers and entertainment bots\n✅ Handles both discovery and availability queries"
},
"typeVersion": 1
},
{
"id": "cc2a939c-d5e9-480d-b41d-a07d2046232a",
"name": "Guía de Configuración",
"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": "Procesamiento de Mensajes",
"type": "n8n-nodes-base.stickyNote",
"position": [
-260,
760
],
"parameters": {
"color": 4,
"width": 500,
"height": 600,
"content": "## Message Processing\n\nWhatsApp webhook receives messages → AI analyzes intent → Routes to appropriate handler"
},
"typeVersion": 1
},
{
"id": "6517c012-f59d-4c14-bd51-1d0261490ef3",
"name": "Enrutamiento de Solicitudes",
"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": "Integración API",
"type": "n8n-nodes-base.stickyNote",
"position": [
820,
620
],
"parameters": {
"color": 6,
"width": 560,
"height": 600,
"content": "## API Integration\n\nTMDb for movie search → Watchmode for streaming → Format response → Send via WhatsApp"
},
"typeVersion": 1
},
{
"id": "6e53dc12-4048-4cca-a8e1-1ec76e557ebc",
"name": "Formateo de Respuesta",
"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": "Enviar Respuesta WhatsApp",
"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": "Disparador WhatsApp Webhook",
"type": "n8n-nodes-base.webhook",
"position": [
-200,
1000
],
"webhookId": "daa6c91b-b1f7-430d-8ff1-c6afc19cdd40",
"parameters": {
"path": "daa6c91b-b1f7-430d-8ff1-c6afc19cdd40",
"options": {},
"httpMethod": "POST"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "2715ef60-87da-45ad-a9dd-46adb914aaa7",
"connections": {
"7b3c972a-bed3-45d3-bd94-1fd6d4f2f0c2": {
"ai_languageModel": [
[
{
"node": "01b7e2c5-b991-4092-8391-53647b710ada",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"0283347d-f2dd-4695-b536-9ba16c997bfb": {
"main": [
[
{
"node": "1b6d90a5-16dc-4826-88e5-05ee09b0d152",
"type": "main",
"index": 0
}
]
]
},
"e6af8044-a298-4020-8e66-1fcd798a2934": {
"main": [
[
{
"node": "578c6858-2b24-45a4-9f7b-3dd4999a5548",
"type": "main",
"index": 0
}
],
[
{
"node": "46191d6d-568a-463d-9cab-dbc4907ffcde",
"type": "main",
"index": 0
}
]
]
},
"46191d6d-568a-463d-9cab-dbc4907ffcde": {
"main": [
[
{
"node": "578c6858-2b24-45a4-9f7b-3dd4999a5548",
"type": "main",
"index": 0
}
],
[
{
"node": "0283347d-f2dd-4695-b536-9ba16c997bfb",
"type": "main",
"index": 0
}
]
]
},
"578c6858-2b24-45a4-9f7b-3dd4999a5548": {
"main": [
[
{
"node": "e5831fc6-0b89-4944-83d6-c7bf5dfabd9f",
"type": "main",
"index": 0
}
]
]
},
"e5831fc6-0b89-4944-83d6-c7bf5dfabd9f": {
"main": [
[
{
"node": "6142cc81-1377-4282-99eb-03d472dd2d5a",
"type": "main",
"index": 0
}
]
]
},
"1b6d90a5-16dc-4826-88e5-05ee09b0d152": {
"main": [
[
{
"node": "444665c4-e78c-4601-9802-75de6260d6d9",
"type": "main",
"index": 0
}
]
]
},
"01b7e2c5-b991-4092-8391-53647b710ada": {
"main": [
[
{
"node": "e6af8044-a298-4020-8e66-1fcd798a2934",
"type": "main",
"index": 0
}
]
]
},
"ce66592d-4f92-48c0-8d27-0ae1fc170a46": {
"main": [
[
{
"node": "faec17ce-cb22-448c-81bd-b310487529ec",
"type": "main",
"index": 0
}
]
]
},
"e8ff4c7a-9ec1-47c8-897b-dbd5045e15a1": {
"main": [
[
{
"node": "01b7e2c5-b991-4092-8391-53647b710ada",
"type": "main",
"index": 0
}
]
]
},
"34e44718-176b-4809-94e0-9d554c5c9df0": {
"main": [
[
{
"node": "faec17ce-cb22-448c-81bd-b310487529ec",
"type": "main",
"index": 0
}
]
]
},
"6142cc81-1377-4282-99eb-03d472dd2d5a": {
"main": [
[
{
"node": "34e44718-176b-4809-94e0-9d554c5c9df0",
"type": "main",
"index": 0
}
]
]
},
"444665c4-e78c-4601-9802-75de6260d6d9": {
"main": [
[
{
"node": "ce66592d-4f92-48c0-8d27-0ae1fc170a46",
"type": "main",
"index": 0
}
]
]
}
}
}¿Cómo usar este flujo de trabajo?
Copie el código de configuración JSON de arriba, cree un nuevo flujo de trabajo en su instancia de n8n y seleccione "Importar desde JSON", pegue la configuración y luego modifique la configuración de credenciales según sea necesario.
¿En qué escenarios es adecuado este flujo de trabajo?
Avanzado - Chatbot de soporte, IA Multimodal
¿Es de pago?
Este flujo de trabajo es completamente gratuito, puede importarlo y usarlo directamente. Sin embargo, tenga en cuenta que los servicios de terceros utilizados en el flujo de trabajo (como la API de OpenAI) pueden requerir un pago por su cuenta.
Flujos de trabajo relacionados recomendados
Oneclick AI Squad
@oneclick-aiThe AI Squad Initiative is a pioneering effort to build, automate and scale AI-powered workflows using n8n.io. Our mission is to help individuals and businesses integrate AI agents seamlessly into their daily operations from automating tasks and enhancing productivity to creating innovative, intelligent solutions. We design modular, reusable AI workflow templates that empower creators, developers and teams to supercharge their automation with minimal effort and maximum impact.
Compartir este flujo de trabajo