Agent Telegram Airbnb - Modèle
Ceci est unSupport, AIworkflow d'automatisation du domainecontenant 15 nœuds.Utilise principalement des nœuds comme Set, Switch, Telegram, McpClientTool, Agent, combinant la technologie d'intelligence artificielle pour une automatisation intelligente. Agent Airbnb Telegram - recherche de logements IA avec prise en charge vocale
- •Token Bot Telegram
- •Clé API OpenAI
Nœuds utilisés (15)
Catégorie
{
"id": "9ElwM3xJyiw4my1L",
"meta": {
"instanceId": "558d88703fb65b2d0e44613bc35916258b0f0bf983c5d4730c00c424b77ca36a",
"templateCredsSetupCompleted": true
},
"name": "Airbnb Telegram Agent - Template",
"tags": [],
"nodes": [
{
"id": "380df1f8-7d7a-4c50-abd3-cf31b09084e1",
"name": "Simple Mémoire",
"type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
"position": [
-540,
320
],
"parameters": {
"sessionKey": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"sessionIdType": "customKey"
},
"typeVersion": 1.3
},
{
"id": "209d3ae6-19c5-455a-88fd-72ebd2ee0807",
"name": "Modèle de chat OpenAI",
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"position": [
-660,
320
],
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1",
"cachedResultName": "gpt-4.1"
},
"options": {}
},
"credentials": {
"openAiApi": {
"id": "niikB3HA4fT5WAqt",
"name": "OpenAi account"
}
},
"typeVersion": 1.2
},
{
"id": "c04d2f36-b275-45de-850e-35046a0e21f0",
"name": "Airbnb MCP Client - List Outils",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
-420,
320
],
"parameters": {},
"credentials": {
"mcpClientApi": {
"id": "miKKxgV86msS3iHq",
"name": "MCP Airtable"
}
},
"typeVersion": 1
},
{
"id": "6d71b756-431e-4970-a7bf-b5f7f190cc5f",
"name": "Airbnb MCP Client - Execute Outils",
"type": "n8n-nodes-mcp.mcpClientTool",
"position": [
-300,
320
],
"parameters": {
"toolName": "={{ $fromAI(\"tool\", \"Das ausgewählte Tool\") }}",
"operation": "executeTool",
"toolParameters": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Tool_Parameters', `Die Parameter für das Tool`, 'json') }}"
},
"credentials": {
"mcpClientApi": {
"id": "miKKxgV86msS3iHq",
"name": "MCP Airtable"
}
},
"typeVersion": 1
},
{
"id": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"name": "Airbnb Agent",
"type": "@n8n/n8n-nodes-langchain.agent",
"position": [
-568,
100
],
"parameters": {
"text": "={{ $json.text }}",
"options": {
"systemMessage": "=<system_prompt>\nYOU ARE A HIGHLY SPECIALIZED **AIRBNB EXPERT AGENT** INTEGRATED INTO **n8n**. YOUR TASK IS TO ANSWER AIRBNB ACCOMMODATION QUERIES PRECISELY BY USING THE **MCP (Modular Command Platform)** AND PRESENTING THE INFORMATION IN **MOBILE-FRIENDLY FORMAT FOR TELEGRAM**.\n\nCURRENT DATE AND TIME: {{ $now }}\n\n---\n\n###TOOL USAGE###\n\nYOU HAVE ACCESS TO TWO MCP TOOLS:\n\n- `Airbnb MCP Client - List Tools` → SHOWS ALL AVAILABLE MCP FUNCTIONS\n- `Airbnb MCP Client - Execute Tools` → EXECUTES THE SELECTED TOOL WITH PARAMETERS\n\n⚠️ **IMPORTANT**: ALWAYS RUN `LIST TOOLS` FIRST → THEN `EXECUTE TOOLS` WITH THE APPROPRIATE TOOL!\n\n---\n\n###CHAIN OF THOUGHTS – WORK STEPS###\n\n1. **UNDERSTAND**: ANALYZE THE QUERY (e.g., location, time period, price limit, special requirements)\n2. **BASICS**: CLARIFY WHETHER IT'S ABOUT A LIST, DETAILS, OR COMPARISON\n3. **BREAK DOWN**: PARSE RELEVANT PARAMETERS FROM THE QUERY\n4. **ANALYZE**: CALL `LIST TOOLS` TO GET ALL AVAILABLE OPTIONS\n5. **BUILD**: SELECT THE RIGHT TOOL AND USE `EXECUTE TOOLS` WITH PRECISE PARAMETERS\n6. **FORMAT**: FORMAT THE OUTPUT FOR **MOBILE/TELEGRAM** – NO TABLES!\n7. **FINAL OUTPUT**: FOR EACH ACCOMMODATION, USE THIS FORMAT:\n\n🏡 {Accommodation Name}\n🛏️ {Beds, Bedrooms}\n💶 {Price/Night} – Total: {Total Price}\n✨ {Special Feature, if available}\n🔗 [View]({URL to accommodation})\n\n📌 *IMPORTANT: THE URL MUST BE WITHIN THE BRACKETS, OTHERWISE THE LINK WON'T BE CLICKABLE ON TELEGRAM!*\n\n---\n\n###EXAMPLE OUTPUT FOR TELEGRAM###\n\nHere are accommodations in Allgäu for 2 people from May 28-30, 2025:\n\n🏡 Sandra's apartment in the countryside\n🛏️ 2 beds\n💶 €82/night – Total: €164\n✨ Guest favorite\n🔗 View\n\n🏡 Villa Kunterbunt in Allgäu\n🛏️ 2 single beds\n💶 €137/night – Total: €274\n✨ Guest favorite\n🔗 View\n\n🔎 More results & filters:\n→ All accommodations for 2 people in Allgäu (May 28-30, 2025)\n\n👉 Let me know if you want details about any accommodation like amenities, photos, or cancellation policies!\n</system_prompt>"
},
"promptType": "define"
},
"typeVersion": 1.9
},
{
"id": "3860e787-78a7-4211-a7c3-f4b3fcf4fb60",
"name": "Déclencheur Telegram",
"type": "n8n-nodes-base.telegramTrigger",
"position": [
-1540,
100
],
"webhookId": "6596b191-7b90-41ed-ad04-b84340d8d3d6",
"parameters": {
"updates": [
"message"
],
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "8FPdItv7hTnpO77J",
"name": "Airtable Agent Bot"
}
},
"typeVersion": 1.1
},
{
"id": "442e9229-5576-4193-a629-b7343eb62f1b",
"name": "Text or Voice",
"type": "n8n-nodes-base.switch",
"position": [
-1320,
100
],
"parameters": {
"rules": {
"values": [
{
"outputKey": "Text",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "7c629699-9dd6-4a75-9b76-d796875f9ac9",
"operator": {
"type": "string",
"operation": "notEmpty",
"singleValue": true
},
"leftValue": "={{ $json.message.text }}",
"rightValue": ""
}
]
},
"renameOutput": true
},
{
"outputKey": "Voice",
"conditions": {
"options": {
"version": 2,
"leftValue": "",
"caseSensitive": true,
"typeValidation": "strict"
},
"combinator": "and",
"conditions": [
{
"id": "0e56bc7f-c754-4f5e-9ddd-7124e1f5d998",
"operator": {
"type": "object",
"operation": "exists",
"singleValue": true
},
"leftValue": "={{ $json.message.voice }}",
"rightValue": ""
}
]
},
"renameOutput": true
}
]
},
"options": {}
},
"typeVersion": 3.2
},
{
"id": "6ecbc049-1c0d-4e93-886a-6a99f584dfd3",
"name": "Get Voice Message",
"type": "n8n-nodes-base.telegram",
"position": [
-1100,
200
],
"webhookId": "b77489ac-fd9d-4ed6-94eb-f646d292bfb2",
"parameters": {
"fileId": "={{ $json.message.voice.file_id }}",
"resource": "file"
},
"credentials": {
"telegramApi": {
"id": "8FPdItv7hTnpO77J",
"name": "Airtable Agent Bot"
}
},
"typeVersion": 1.2
},
{
"id": "c88de1a5-d775-467d-99ba-ee2bba985109",
"name": "Prepare Text Message for Agent IA",
"type": "n8n-nodes-base.set",
"position": [
-880,
0
],
"parameters": {
"options": {},
"assignments": {
"assignments": [
{
"id": "a5bcf087-7580-4904-88d3-ca29614fc923",
"name": "text",
"type": "string",
"value": "={{ $json.message.text }}"
}
]
}
},
"typeVersion": 3.4
},
{
"id": "ffb9dfef-5b76-446f-9b4f-cb6ea1766375",
"name": "Send Text Response",
"type": "n8n-nodes-base.telegram",
"position": [
-22,
0
],
"webhookId": "2b263d0d-6a0e-4319-8c5b-5916faba83a8",
"parameters": {
"text": "={{ $json.output }}",
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"additionalFields": {
"appendAttribution": false
}
},
"credentials": {
"telegramApi": {
"id": "8FPdItv7hTnpO77J",
"name": "Airtable Agent Bot"
}
},
"typeVersion": 1.2
},
{
"id": "afbe65f9-8576-4217-8eea-4413a8aa8657",
"name": "Send Voice Response",
"type": "n8n-nodes-base.telegram",
"position": [
496,
200
],
"webhookId": "17ddaf92-7e24-4ca9-a4e0-74aabea37e20",
"parameters": {
"chatId": "={{ $('Telegram Trigger').item.json.message.chat.id }}",
"operation": "sendAudio",
"binaryData": true,
"additionalFields": {}
},
"credentials": {
"telegramApi": {
"id": "8FPdItv7hTnpO77J",
"name": "Airtable Agent Bot"
}
},
"typeVersion": 1.2
},
{
"id": "e1171f41-47e0-4821-80fa-d1350c6b6d99",
"name": "Create Voice Response",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
276,
200
],
"parameters": {
"input": "={{ $json.text }}",
"options": {},
"resource": "audio"
},
"credentials": {
"openAiApi": {
"id": "niikB3HA4fT5WAqt",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "c31a642c-068f-4b63-ac89-4530377f8a52",
"name": "Résumer Response for Voice",
"type": "@n8n/n8n-nodes-langchain.chainLlm",
"position": [
-100,
200
],
"parameters": {
"text": "=Summarize the given input briefly and clearly for voice output. The text should be well-structured and understandable when listened to.\n\n## Input\nYou receive structured information about Airbnb accommodations containing emojis, links, formatting, and detailed descriptions.\n\n## Output Guidelines\n\n### Structure & Format\n- **Remove all emojis** and visual formatting\n- **No links** or URLs mentioned\n- Use **natural, spoken language**\n- Structure information **logically and chronologically**\n- Keep sentences **short and concise**\n\n### Content Priorities\n\n#### For Accommodation Lists:\n1. **Mention number of found accommodations**\n2. **Price range** (cheapest to most expensive option)\n3. **2-3 most interesting options** with name, price, and key feature\n4. Brief note about **additional available options**\n\n#### For Accommodation Details:\n1. **Name and basic data** (guest count, room type)\n2. **Price per night**\n3. **3-4 most important amenities**\n4. **Key house rules** (check-in/out, guest limit)\n5. **Location highlights** (distance to important points)\n\n#### For Cancellation Policies:\n1. **Type of cancellation policy** (flexible/moderate/strict)\n2. **Deadlines for free cancellation**\n3. **Refund rates** after cancellation deadlines\n4. **Important note** that final conditions are shown at booking\n\n### Language Style\n- Use **\"you\"** as address form\n- **Direct, friendly language**\n- **No technical terms** without explanation\n- **Spell out numbers** up to twenty\n- **Time references** in natural form (\"seven days before\" instead of \"7 days\")\n\n### Length\n- **Maximum 150 words** for lists\n- **Maximum 100 words** for single objects\n- **Maximum 80 words** for cancellation policies\n\n## Example Transformation\n\n**Input:** Long formatted list with 7 accommodations, emojis, links\n**Output:** \"I found seven accommodations in Scheveningen for May thirty-first. Prices range from seventy-three to two hundred nine euros per night. Particularly interesting are the affordable room near TU Delft for seventy-three euros, the cozy room near beach and center for ninety-one euros, and the studio apartment with Superhost status for two hundred nine euros. All accommodations offer various amenities and locations to choose from.\"\n\n## Technical Implementation in n8n\n\n### Node Configuration\n- **Node Type:** Basic LLM Chain\n- **Model:** GPT-4 or comparable\n- **Temperature:** 0.3 (for consistent, factual outputs)\n- **Max Tokens:** 200\n\n### Prompt Template\n```\nSummarize the following Airbnb information briefly and understandably for voice output. \n\nConsider:\n- No emojis, links, or formatting\n- Natural, spoken language\n- Maximum 150 words\n- Most important information first\n- Friendly, informative tone\n\nInput: {{ $json.output }}\n\nSummary:\n```\n\n### Input Mapping\n- Connect the output of the previous node with the `input` parameter\n- Use the `output` property of the JSON array as input\n\n### Output Processing\n- The summarized text can be passed directly to Text-to-Speech services\n- Or for further processing in downstream nodes",
"batching": {},
"promptType": "define"
},
"typeVersion": 1.7
},
{
"id": "598891da-ece9-4ef1-a3a7-bcc11ab31d19",
"name": "Transcribe Voice Message",
"type": "@n8n/n8n-nodes-langchain.openAi",
"position": [
-880,
200
],
"parameters": {
"options": {},
"resource": "audio",
"operation": "transcribe"
},
"credentials": {
"openAiApi": {
"id": "niikB3HA4fT5WAqt",
"name": "OpenAi account"
}
},
"typeVersion": 1.8
},
{
"id": "5b9a2516-4b8e-42c2-869d-1f8d85d279ba",
"name": "Note adhésive",
"type": "n8n-nodes-base.stickyNote",
"position": [
-2620,
-480
],
"parameters": {
"width": 1040,
"height": 1280,
"content": "# Welcome to my Airbnb Telegram Agent Workflow!\n\n## This workflow has the following sequence:\n\n1. **Telegram Trigger** - Receives incoming messages (text or voice) from Telegram users\n2. **Text or Voice Switch** - Routes the workflow based on message type (text vs. voice)\n3. **Voice Processing Path** (if voice message):\n - Get Voice Message - Downloads the voice file from Telegram\n - Transcribe Voice Message - Converts speech to text using OpenAI Whisper\n4. **Text Processing Path** - Prepares text messages for the AI agent\n5. **Airbnb Agent (Core Logic)** - LangChain agent that:\n - Uses conversation memory to maintain context\n - Lists available MCP tools for Airbnb data access\n - Executes appropriate tools with parsed parameters\n - Formats results for mobile/Telegram display\n6. **Response Generation**:\n - Send Text Response - Sends formatted text back to Telegram\n - Summarize Response for Voice - Creates voice-friendly summary\n - Create Voice Response - Converts summary to speech using OpenAI TTS\n - Send Voice Response - Sends audio message back to Telegram\n\n## The following accesses are required for the workflow:\n\n- **Telegram Bot API**: [Documentation](https://docs.n8n.io/integrations/builtin/credentials/telegram/) \n - Create a bot via @BotFather on Telegram\n - Get bot token and configure webhook\n- **OpenAI API**: [Documentation](https://docs.n8n.io/integrations/builtin/credentials/openai/)\n - Used for speech transcription (Whisper)\n - Used for chat completion (GPT-4)\n - Used for text-to-speech generation\n- **MCP Community Client Node**: [Documentation](https://github.com/nerding-io/n8n-nodes-mcp)\n - Custom integration for Airbnb data\n - Requires MCP server setup with Airbnb/Airtable connection\n - Provides tools for accommodation search and details\n\n## Key Features:\n\n- **Multimodal Support**: Handles both text and voice messages\n- **Conversation Memory**: Maintains context across multiple messages\n- **Mobile-Optimized Output**: Formats results specifically for Telegram mobile viewing\n- **Tool Integration**: Uses MCP platform to access real Airbnb data\n- **Voice Capabilities**: Full speech-to-text and text-to-speech support\n\n## Configuration Notes:\n\n- Uses GPT-4.1 model for enhanced reasoning capabilities\n- Includes comprehensive system prompts for Airbnb-specific responses\n- Voice responses are automatically summarized for better audio experience\n\nYou can contact me via LinkedIn, if you have any questions: https://www.linkedin.com/in/friedemann-schuetz"
},
"typeVersion": 1
}
],
"active": false,
"pinData": {
"Airbnb Agent": [
{
"json": {
"output": "Hier sind Unterkünfte in Scheveningen für 1 Person vom 31. Mai (Samstag) bis 1. Juni 2025 (Sonntag):\n\n🏡 Comfort double room | Hotel Corel\n🛏️ 1 Doppelbett\n💶 €156/Nacht – Total: €156\n🔗 [View](https://www.airbnb.com/rooms/810809021737050160)\n\n🏡 Cozy room near the city center and the beach!\n🛏️ Einzelzimmer\n💶 €91/Nacht – Total: €91\n🔗 [View](https://www.airbnb.com/rooms/1148459085653934403)\n\n🏡 Go see Peace Palace – an easy 15-min walk\n🛏️ 2 Einzelbetten\n💶 €164/Nacht – Total: €164\n🔗 [View](https://www.airbnb.com/rooms/1257252023824017600)\n\n🏡 Peaceful room, King size bed, Big Balcony, Centre\n🛏️ King-Size-Bett\n💶 €123/Nacht – Total: €123\n🔗 [View](https://www.airbnb.com/rooms/3874587)\n\n🏡 Studio Apartment at Cove Centrum\n🛏️ 1 Doppelbett\n💶 €209/Nacht – Total: €209\n✨ Superhost\n🔗 [View](https://www.airbnb.com/rooms/559146820973459936)\n\n🏡 The Hague City Center Studio Appartement Brand New\n🛏️ 2 Betten\n💶 €146/Nacht – Total: €146\n✨ Guest favorite\n🔗 [View](https://www.airbnb.com/rooms/34312629)\n\n🔎 Mehr Ergebnisse & weitere Filter:\n→ [Alle Unterkünfte für 1 Person in Scheveningen (31.05.–01.06.2025)](https://www.airbnb.com/s/Scheveningen/homes?checkin=2025-05-31&checkout=2025-06-01&adults=1&children=0&infants=0&pets=0)\n\n👉 Sag Bescheid, wenn du Infos zu Ausstattung, Fotos oder Stornierung brauchst!"
}
}
]
},
"settings": {
"executionOrder": "v1"
},
"versionId": "b2664114-a335-4dbb-a47b-0feebed5807d",
"connections": {
"3103776d-b39e-431e-a72d-cbaf5dc70ef7": {
"main": [
[
{
"node": "ffb9dfef-5b76-446f-9b4f-cb6ea1766375",
"type": "main",
"index": 0
},
{
"node": "Summarize Response for Voice",
"type": "main",
"index": 0
}
]
]
},
"Simple Memory": {
"ai_memory": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "ai_memory",
"index": 0
}
]
]
},
"442e9229-5576-4193-a629-b7343eb62f1b": {
"main": [
[
{
"node": "Prepare Text Message for AI Agent",
"type": "main",
"index": 0
}
],
[
{
"node": "6ecbc049-1c0d-4e93-886a-6a99f584dfd3",
"type": "main",
"index": 0
}
]
]
},
"Telegram Trigger": {
"main": [
[
{
"node": "442e9229-5576-4193-a629-b7343eb62f1b",
"type": "main",
"index": 0
}
]
]
},
"6ecbc049-1c0d-4e93-886a-6a99f584dfd3": {
"main": [
[
{
"node": "598891da-ece9-4ef1-a3a7-bcc11ab31d19",
"type": "main",
"index": 0
}
]
]
},
"OpenAI Chat Model": {
"ai_languageModel": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Summarize Response for Voice",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"e1171f41-47e0-4821-80fa-d1350c6b6d99": {
"main": [
[
{
"node": "afbe65f9-8576-4217-8eea-4413a8aa8657",
"type": "main",
"index": 0
}
]
]
},
"598891da-ece9-4ef1-a3a7-bcc11ab31d19": {
"main": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "main",
"index": 0
}
]
]
},
"Summarize Response for Voice": {
"main": [
[
{
"node": "e1171f41-47e0-4821-80fa-d1350c6b6d99",
"type": "main",
"index": 0
}
]
]
},
"Airbnb MCP Client - List Tools": {
"ai_tool": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "ai_tool",
"index": 0
}
]
]
},
"Airbnb MCP Client - Execute Tools": {
"ai_tool": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "ai_tool",
"index": 0
}
]
]
},
"Prepare Text Message for AI Agent": {
"main": [
[
{
"node": "3103776d-b39e-431e-a72d-cbaf5dc70ef7",
"type": "main",
"index": 0
}
]
]
}
}
}Comment utiliser ce workflow ?
Copiez le code de configuration JSON ci-dessus, créez un nouveau workflow dans votre instance n8n et sélectionnez "Importer depuis le JSON", collez la configuration et modifiez les paramètres d'authentification selon vos besoins.
Dans quelles scénarios ce workflow est-il adapté ?
Intermédiaire - Support, Intelligence Artificielle
Est-ce payant ?
Ce workflow est entièrement gratuit et peut être utilisé directement. Veuillez noter que les services tiers utilisés dans le workflow (comme l'API OpenAI) peuvent nécessiter un paiement de votre part.
Workflows recommandés
Friedemann Schuetz
@freddy-schuetzPartager ce workflow