Reserva de Restaurante
Este es unAI Chatbot, Multimodal AIflujo de automatización del dominio deautomatización que contiene 21 nodos.Utiliza principalmente nodos como Set, Gmail, Switch, Telegram, GoogleCalendar. Sistema de reservas de restaurante basado en IA, integrado con Telegram, calendario y notificaciones por correo electrónico
- •Cuenta de Google y credenciales de API de Gmail
- •Bot Token de Telegram
- •Clave de API de OpenAI
Nodos utilizados (21)
Categoría
{
"id": "LWeI4t06OADfdYoz",
"meta": {
"instanceId": "ade7e20aad77e0a552d206f839739da695af286a3148c41c951c915d6af91ebc",
"templateCredsSetupCompleted": true
},
"name": "Restaurant Booking",
"tags": [],
"nodes": [
{
"id": "af714295-c04b-4b68-98db-a123452308d7",
"name": "Disparador de Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
1488,
-160
],
"webhookId": "5ef30342-f837-4e97-9b60-1ee3493279c3",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"typeVersion": 1.1
},
{
"id": "4ef8cf94-d2a1-47a8-aae0-a58e7fb78304",
"name": "Modelo de chat OpenAI",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1552,
80
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "o3-mini",
"cachedResultName": "o3-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "5e90e50a-a117-4b0a-9d3c-ac3cbba33e55",
"name": "Auto-fixing Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserAutofixing",
"position": [
1872,
80
],
"parameters": {
"options": {}
},
"typeVersion": 1
},
{
"id": "e75fd499-09eb-49a5-b870-0c721cd61c68",
"name": "Modelo de chat OpenAI1",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
1888,
208
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "7472d657-e3c3-44f9-a65e-fabe69e77569",
"name": "Structured Output Parser",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
2032,
208
],
"parameters": {
"schemaType": "manual",
"inputSchema": "{\n\t\"is_pass_next\": \"boolean\",\n\t\"message\": \"string\"\n}"
},
"typeVersion": 1.2
},
{
"id": "e318100d-2d21-434c-b302-5ef3af6946cf",
"name": "Interruptor",
"type": "n8n-nodes-base.switch",
"position": [
2192,
-144
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Booking",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "b27f50ed-f26d-4310-b049-f0b38ca069f6",
"operator": {
"type": "boolean",
"operation": "true",
"singleValue": true
},
"leftValue": "={{ $json.output.is_pass_next }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Feedback",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "ca6f2ea1-9dd1-4e77-9935-c3dbeb872ee4",
"operator": {
"type": "boolean",
"operation": "false",
"singleValue": true
},
"leftValue": "={{ $json.output.is_pass_next }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "d13d1d42-481c-4b01-8643-95da76472fa7",
"name": "Telegram",
"type": "n8n-nodes-base.telegram",
"position": [
2432,
-48
],
"webhookId": "2fa48c6e-1086-43b3-b35c-89d17e69cf7b",
"parameters": {
"text": "={{ $('Information Gathering Agent').item.json.output.message }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"typeVersion": 1.2
},
{
"id": "26488b92-2e3e-45a9-aaf1-31b4d40693ed",
"name": "Edit Fields",
"type": "n8n-nodes-base.set",
"position": [
2640,
-160
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "34357e62-87db-4d9c-a4ac-b8008c944821",
"name": "user_data",
"type": "string",
"value": "={{$('Switch').item.json.output.message}}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "c49a6ac1-c489-40cb-900e-231bc8e99b31",
"name": "Calendario de Google",
"type": "n8n-nodes-base.googleCalendar",
"position": [
3312,
-208
],
"parameters": {
"end": "={{ $json.output.calendar_event.end_time }}",
"start": "={{ $json.output.calendar_event.start_time }}",
"calendar": {
"__rl": true,
"mode": "list",
"value": "techcupid28@gmail.com",
"cachedResultName": "techcupid28@gmail.com"
},
"additionalFields": {
"color": "7",
"summary": "={{ $json.output.email.description }}",
"attendees": [
"={{ $json.output.email.to }}"
]
},
"useDefaultReminders": false
},
"typeVersion": 1.3
},
{
"id": "ce3691c5-80ea-41df-a7e8-ee636ec130c3",
"name": "Booking Agente",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
2880,
-160
],
"parameters": {
"text": "=You are the Booking Agent for Gourmet Dining – A Fine Culinary Experience.\nYour job is to take finalized booking details from the Restaurant Agent, and:\n\nGenerate a Google Calendar event object with proper start and end time.\n\nGenerate a confirmation email, including:\n\nRecipient email address\n\nEmail subject line\n\nA professional and beautifully formatted HTML body\n\nInput from Restaurant Agent: {{ $('Edit Fields').item.json['user_data'] }}\n\n✅ Your OUTPUT must be in this structure:\n\n{\n \"calendar_event\": {\n \"start_time\": \"2025-05-10T14:00:00\",\n \"end_time\": \"2025-05-10T17:00:00\",\n \"name\": \"Sarah Johnson\"\n },\n \"email\": {\n \"to\": \"sarah@example.com\",\n \"subject\": \"Your Gourmet Dining Reservation Confirmation 🍽️\",\n \"html_body\": \"<html>... (full email HTML below) ...</html>\", \n \"description\": \"Booking with Sarah\"\n },\n}\n\nEXAMPLE: \n<html>\n <body style=\"font-family: Arial, sans-serif; color: #333;\">\n <h2 style=\"color: #B22222;\">🍷 Gourmet Dining – Reservation Confirmed</h2>\n <p>Dear Sarah Johnson,</p>\n <p>We are delighted to confirm your dinner reservation with us!</p>\n <table style=\"margin-top: 15px; border-collapse: collapse;\">\n <tr>\n <td><strong>Date:</strong></td>\n <td>May 10, 2025</td>\n </tr>\n <tr>\n <td><strong>Time:</strong></td>\n <td>7:00 PM – 9:00 PM</td>\n </tr>\n <tr>\n <td><strong>Guests:</strong></td>\n <td>4</td>\n </tr>\n <tr>\n <td><strong>Dining Preference:</strong></td>\n <td>Outdoor Terrace</td>\n </tr>\n <tr>\n <td><strong>Location:</strong></td>\n <td>45 Culinary Avenue, Foodie City</td>\n </tr>\n </table>\n <p style=\"margin-top: 15px;\">📝 <strong>Special Notes:</strong> Anniversary dinner – vegetarian-friendly menu requested.</p>\n <p>We look forward to hosting you for an unforgettable dining experience. ✨</p>\n <p style=\"margin-top: 25px;\">Warm regards,<br/>The Gourmet Dining Team</p>\n <hr style=\"margin-top: 30px;\">\n <p style=\"font-size: 12px;\">Questions? Contact us at <a href='mailto:reservations@gourmetdining.com'>reservations@gourmetdining.com</a> or call (555) 123-4567</p>\n </body>\n</html>\n\n\n\n🧠 Behavior Notes:\nUse standard duration for dining reservations:\n\nDefault = 2 hours (unless specified by the user).\n\nConvert duration into end_time accordingly.\n\nFormat time in ISO 8601 (RFC3339) for calendar integration.\n\nTime zone is assumed to be the Restaurant's local time : {{ $now }}",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "96759672-4f19-4840-9939-a7af5d329530",
"name": "Modelo de chat OpenAI2",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
2848,
48
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini",
"cachedResultName": "gpt-4.1-mini"
},
"options": {}
},
"typeVersion": 1.2
},
{
"id": "3518b693-8176-4c5c-b5fa-90a283569369",
"name": "Structured Output Parser1",
"type": "@n8n/n8n-nodes-langchain.outputParserStructured",
"position": [
3040,
32
],
"parameters": {
"jsonSchemaExample": "{\n \"calendar_event\": {\n \"start_time\": \"2025-05-10T14:00:00\",\n \"end_time\": \"2025-05-10T17:00:00\",\n \"name\": \"Sarah Johnson\"\n },\n \"email\": {\n \"to\": \"sarah@example.com\",\n \"subject\": \"Your Relaxing SPA Booking Confirmation – Rejuvenate & Revive Package\",\n \"html_body\": \"<html>... (full email HTML below) ...</html>\",\n \"description\": \"Booking with Sarah\"\n }\n}\n"
},
"typeVersion": 1.2
},
{
"id": "5def71b8-821f-47cb-86f9-0bf5bab3e07c",
"name": "Telegram3",
"type": "n8n-nodes-base.telegram",
"position": [
3504,
0
],
"webhookId": "9b5b50fc-47bb-467a-abc1-094c9c738c4f",
"parameters": {
"text": "=🍽️ Your table has been successfully booked! 🎉\n\n📅 Please check your email for the confirmation — it includes your reservation details like date, time, and number of guests.\n\n🥂 We’ve also saved your details in our system, so everything will be ready when you arrive.\n\nWe can’t wait to welcome you to our Restaurant — where great food meets warm hospitality. 🌟\nFeel free to reach out if you have any questions. See you soon! 😊",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"typeVersion": 1.2
},
{
"id": "6749c5b6-d78d-485d-9da5-92d1c5abb38e",
"name": "Telegram1",
"type": "n8n-nodes-base.telegram",
"position": [
2432,
-224
],
"webhookId": "4ff6a4a5-25f6-4f1d-8e71-e79ee6883a0d",
"parameters": {
"text": "Thank you for your confirmation! We have noted down your information. You will be getting confirmation mail soon. ",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"typeVersion": 1.2
},
{
"id": "b9c4cf6c-daf2-4fa8-ada9-3211082e52f7",
"name": "Simple Memoria",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
1712,
80
],
"parameters": {
"sessionKey": "={{ $json.message.chat.id }}",
"sessionIdType": "customKey",
"contextWindowLength": 15
},
"typeVersion": 1.3
},
{
"id": "3dea953b-bd2e-4d16-9a06-2e04f5ae9813",
"name": "Send a message",
"type": "n8n-nodes-base.gmail",
"position": [
3312,
-16
],
"webhookId": "c1388946-d239-4325-abde-1a9ae909797b",
"parameters": {
"sendTo": "={{ $json.output.email.to }}",
"message": "={{ $json.output.email.html_body }}",
"options": {},
"subject": "={{ $json.output.email.subject }}"
},
"typeVersion": 2.1
},
{
"id": "c6e7eb84-ad73-4bf7-a5a9-ab176992d3ad",
"name": "Nota adhesiva",
"type": "n8n-nodes-base.stickyNote",
"position": [
0,
-560
],
"parameters": {
"width": 1180,
"height": 1120,
"content": "## Overview\n\n- This workflow is an **AI-powered Booking Assistant** that automates restaurant and event reservations through **Telegram**. It interacts with the user in natural conversation, collects booking details (guest count, preferences, date/time, and special requests), finalizes the draft, and confirms the reservation by storing it in **Google Calendar** and sending an **email confirmation** — fully automated end-to-end.\n\n---\n\n## How It Works\n\n### 1. User Interaction\n- The workflow starts with a Telegram welcome message. \n- The AI agent asks step-by-step questions: \n - Number of guests \n - Seating preference (indoor/outdoor/private room) \n - Special occasion requests (birthday, date, etc.) \n - Preferred date & time \n- Once details are gathered, it generates a draft booking summary.\n\n### 2. Confirmation & Personal Details\n- The user reviews the draft and confirms. \n- The assistant then asks for personal details (name, email, phone number).\n\n### 3. Booking & Notifications\n- After confirmation, the details are sent to **Google Calendar** to create an event. \n- A **confirmation email** is sent to the user with all booking information. \n- A final Telegram message confirms that the reservation is successfully completed.\n\n---\n\n## How to Use\n- Triggered directly from **Telegram Bot**. \n- Simply start chatting with the bot to begin the reservation process. \n- The assistant will guide the user step by step until the booking is finalized. \n- Once completed, the user receives both an **email confirmation** and a **Telegram confirmation** message.\n\n---\n\n## Requirements\nTo use this workflow, you’ll need: \n- **n8n account** (self-hosted or cloud) \n- **Telegram Bot Token** (for chat interaction) \n- **OpenAI or OpenRouter API Key** (for AI-driven conversation) \n- **Google Calendar API access** (to create bookings) \n- **Gmail / SMTP credentials** (to send confirmation emails) \n"
},
"typeVersion": 1
},
{
"id": "97603895-e634-4357-b625-aa29c6e4de60",
"name": "Information Gathering Agente",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
1680,
-160
],
"parameters": {
"text": "=🍽 Restaurant Table Booking Prompt (Converted)\n\nYou are the Restaurant Reservation Agent for Gourmet Dining – A Fine Culinary Experience.\n\nYour role is to assist users in booking a table, starting with gathering their information, confirming the reservation, and ensuring it's added to the calendar and an email is sent.\n\nUser Input : {{ $json.message.text }}\n\n🎭 Tone and Behavior:\n\nWarm, polite, and professional — like a fine-dining concierge.\n\nFriendly but efficient.\n\nAlways move the conversation step by step, and never skip ahead unless you’re sure.\n\nNever generate menu suggestions or table options randomly — rely on user preferences and confirmations.\n\n🧾 FLOW STRUCTURE:\n\n1. FIRST INTERACTION (Warm Greeting)\nAlways start with a polite opening and ask how you can help.\n\n{\n \"is_pass_next\": false,\n \"message\": \"Welcome to Gourmet Dining 🍷✨ A Fine Culinary Experience. How may I assist you today? Are you looking to reserve a table?\"\n}\n\n\n2. RESERVATION DETAILS (Step by Step Questions)\nAsk one question at a time in sequence:\n\nDining Preference (Indoor / Outdoor / Private Room)\n\nNumber of Guests\n\nSpecial Requests (birthday setup, dietary needs, anniversary, etc.)\n\nPreferred Date & Time\n\nExample response if still collecting info:\n\n{\n \"is_pass_next\": false,\n \"message\": \"Great choice! How many guests will be joining you?\"\n}\n\n\n3. PRE-CONFIRMATION: Reservation Draft\nOnce enough details are gathered, propose a draft for review.\n\n{\n \"is_pass_next\": false,\n \"message\": \"Here’s your table reservation draft 🍽️:\\n\\n🗓 Date: [Insert Date & Time]\\n👥 Guests: [Number of Guests]\\n🏷 Dining Preference: [Indoor/Outdoor/Private Room]\\n🎉 Special Notes: [If any]\\n📍 Location: 45 Culinary Avenue, Foodie City\\n\\nShall we finalize this?\"\n}\n\n\n4. GATHER PERSONAL DETAILS (After Confirmation)\nOnly after the user confirms the reservation draft, ask for full name, email, and phone number.\n\n{\n \"is_pass_next\": false,\n \"message\": \"Perfect! To complete your reservation, may I have your full name, email, and an optional contact number?\"\n}\n\n\n5. FINAL CONFIRMATION & PASS TO SYSTEM\nOnce user provides details, finalize booking and pass it to system:\n\n{\n \"is_pass_next\": true,\n \"message\": {\n \"customer_name\": \"[Name]\",\n \"email\": \"[Email]\",\n \"phone\": \"[Phone Number]\",\n \"reservation_date\": \"[YYYY-MM-DD]\",\n \"reservation_time\": \"[Time]\",\n \"guests\": \"[Number of Guests]\",\n \"dining_preference\": \"[Indoor/Outdoor/Private Room]\",\n \"special_notes\": \"[Any notes from user]\"\n }\n}\n\nTime zone is assumed to be the Restaurant's local time : {{ $now }}\n\n",
"options": {},
"promptType": "define",
"hasOutputParser": true
},
"typeVersion": 1.8
},
{
"id": "20c02205-e3cf-4022-9c3b-c24896109811",
"name": "Nota adhesiva1",
"type": "n8n-nodes-base.stickyNote",
"position": [
1408,
-416
],
"parameters": {
"color": 7,
"width": 740,
"height": 820,
"content": "### Telegram Trigger & AI Agent Flow\n\n- **Telegram Trigger** → Listens for new messages from the user on Telegram. \n- **AI Agent** → Processes the user’s message, understands intent (e.g., booking, feedback, etc.), and replies in a conversational way. \n- **Memory & Parsers** → Help the AI remember context and structure the responses so the flow remains smooth. \n"
},
"typeVersion": 1
},
{
"id": "091a027d-804d-4870-8589-714c145e7954",
"name": "Nota adhesiva2",
"type": "n8n-nodes-base.stickyNote",
"position": [
2160,
-496
],
"parameters": {
"color": 7,
"width": 620,
"height": 820,
"content": "### Switch, Telegram & Edit Fields\n\n- **Switch Node** → Decides the flow based on user input. \n - If the user is making a **Booking**, the process continues toward reservation steps. \n - If the user is giving **Feedback**, it routes the conversation separately. \n\n- **Telegram Nodes** → Send appropriate responses back to the user on Telegram depending on the chosen path. \n\n- **Edit Fields** → Prepares and formats the booking details (guest count, preferences, date/time, etc.) before passing them to the next step in the workflow. \n"
},
"typeVersion": 1
},
{
"id": "fd4ea3ed-a423-47ac-ae37-34ef61711e7b",
"name": "Nota adhesiva3",
"type": "n8n-nodes-base.stickyNote",
"position": [
2800,
-496
],
"parameters": {
"color": 7,
"width": 920,
"height": 820,
"content": "### Booking Agent, Google Calendar, Gmail & Telegram\n\n- **Booking Agent** → Collects all finalized booking details from the user, organizes them, and prepares a structured summary. It also creates a formatted HTML template for the confirmation email and ensures the booking payload is properly structured. \n\n- **Google Calendar** → Automatically creates a reservation event with the provided details (guest count, preferences, date/time, special requests). \n\n- **Send a Message (Gmail)** → Sends a professional confirmation email to the user with all booking details included. \n\n- **Telegram (Final Confirmation)** → Notifies the user on Telegram that their reservation has been successfully booked, completing the process end-to-end. \n"
},
"typeVersion": 1
}
],
"active": true,
"pinData": {},
"settings": {
"executionOrder": "v1"
},
"versionId": "0f830e29-e8d4-4461-a03e-f9f474eb6bad",
"connections": {
"Switch": {
"main": [
[
{
"node": "6749c5b6-d78d-485d-9da5-92d1c5abb38e",
"type": "main",
"index": 0
}
],
[
{
"node": "d13d1d42-481c-4b01-8643-95da76472fa7",
"type": "main",
"index": 0
}
]
]
},
"6749c5b6-d78d-485d-9da5-92d1c5abb38e": {
"main": [
[
{
"node": "26488b92-2e3e-45a9-aaf1-31b4d40693ed",
"type": "main",
"index": 0
}
]
]
},
"26488b92-2e3e-45a9-aaf1-31b4d40693ed": {
"main": [
[
{
"node": "Booking Agent",
"type": "main",
"index": 0
}
]
]
},
"Booking Agent": {
"main": [
[
{
"node": "Google Calendar",
"type": "main",
"index": 0
},
{
"node": "3dea953b-bd2e-4d16-9a06-2e04f5ae9813",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "Information Gathering Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"3dea953b-bd2e-4d16-9a06-2e04f5ae9813": {
"main": [
[
{
"node": "5def71b8-821f-47cb-86f9-0bf5bab3e07c",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "Information Gathering Agent",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "Information Gathering Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model1": {
"ai_languageModel": [
[
{
"node": "5e90e50a-a117-4b0a-9d3c-ac3cbba33e55",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"OpenAI Chat Model2": {
"ai_languageModel": [
[
{
"node": "Booking Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"7472d657-e3c3-44f9-a65e-fabe69e77569": {
"ai_outputParser": [
[
{
"node": "5e90e50a-a117-4b0a-9d3c-ac3cbba33e55",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"5e90e50a-a117-4b0a-9d3c-ac3cbba33e55": {
"ai_outputParser": [
[
{
"node": "Information Gathering Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"3518b693-8176-4c5c-b5fa-90a283569369": {
"ai_outputParser": [
[
{
"node": "Booking Agent",
"type": "ai_outputParser",
"index": 0
}
]
]
},
"Information Gathering Agent": {
"main": [
[
{
"node": "Switch",
"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 IA, 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
Aziz B
@azizb28Compartir este flujo de trabajo