Skip to content

HTTP request node not working as intended #17588

Description

@Affan-Iqbal-DA

Describe the problem/error/question

Just yesterday, my automation was working, I updated it to a newer version and regret followed. The output which was previously TEXT had turned to HTML despite changing NOTHING.
I have a 2 part workflow, main and sub, the sub is returning the correct output, the HTTP request node receives the CORRECT OUTPUT (TEXT) and then outputs HTML instead of the TEXT as it previously did.

What is the error message (if any)?

No error message.

Please share your workflow/screenshots/recording

This is the main workflow:

{
"nodes": [
{
"parameters": {
"httpMethod": "POST",
"path": "whatsapp-router",
"responseMode": "responseNode",
"options": {}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-160,
-16
],
"id": "55d60efa-863a-4a16-ba11-60dedfaba8a6",
"name": "Webhook",
"webhookId": "e738ec4f-6756-4ea9-a1db-20fcb130fecc"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "f24ae8c9-bc79-4033-8d57-9c2bbe1bebfb",
"name": "phoneNumber",
"value": "={{ $json.body.entry[0].changes[0].value.metadata.display_phone_number }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
192,
0
],
"id": "c2096796-510f-4a9e-9692-c909545dd6bd",
"name": "Edit Fields"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "88374aca-8afe-4b12-a6d3-8c4fd163fdc5",
"leftValue": "={{ $json.query['hub.mode'] }}",
"rightValue": "subscribe",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "9d5e491a-117d-47c6-8e32-f440efeb9d27",
"leftValue": "={{ $json.query['hub.verify_token'] }}",
"rightValue": "airbnb_connect_2025",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
16,
-16
],
"id": "9729dca2-4237-4924-9102-38bcdc908628",
"name": "Webhook Verification"
},
{
"parameters": {
"rules": {
"values": [
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"leftValue": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.metadata.phone_number_id }}",
"rightValue": "683692174833036",
"operator": {
"type": "string",
"operation": "equals"
},
"id": "7366ec5b-c092-45b7-9c3b-e68f53f9d26c"
}
],
"combinator": "and"
}
},
{
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "2035e2d0-406d-4b9f-bf9b-a8002264c60f",
"leftValue": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.metadata.phone_number_id }}",
"rightValue": "716815364845653",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "and"
}
}
]
},
"options": {}
},
"type": "n8n-nodes-base.switch",
"typeVersion": 3.2,
"position": [
784,
0
],
"id": "cbc33c81-54b0-456c-82c5-302d514ee9fa",
"name": "Switch"
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.query['hub.challenge'] }}",
"options": {
"responseHeaders": {
"entries": [
{
"name": "Content-Type",
"value": "text/plain"
}
]
}
}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.3,
"position": [
336,
-224
],
"id": "0c9e09bd-aba9-4b52-9f94-3c1c8678237e",
"name": "Respond to Webhook"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "c7b69d3c-f53e-4bb4-a1d8-c5961355488a",
"leftValue": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
"rightValue": "",
"operator": {
"type": "string",
"operation": "exists",
"singleValue": true
}
}
],
"combinator": "and"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
544,
0
],
"id": "7b6521d8-dce9-4ce6-a4c6-f31533dab717",
"name": "Message Exists?"
},
{
"parameters": {},
"type": "n8n-nodes-base.noOp",
"typeVersion": 1,
"position": [
784,
208
],
"id": "786304da-cd87-451f-9f89-235ab559ebeb",
"name": "No Operation, do nothing"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "86ec07fd-3e8d-4158-be0f-02acc0099131",
"name": "sessionId",
"value": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}+{{ $('Webhook').item.json.body.entry[0].changes[0].value.metadata.phone_number_id }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
368,
0
],
"id": "4ceaded6-56bb-4788-b312-78e1f2bba3fe",
"name": "Get Session Id"
},
{
"parameters": {
"operation": "send",
"phoneNumberId": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.metadata.phone_number_id }}",
"recipientPhoneNumber": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}",
"textBody": "={{ $json.data }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
1296,
128
],
"id": "3b0c5fc8-eb72-417e-9a1e-e940f83da490",
"name": "Send Message To Autofy1",
"webhookId": "35d6ad35-24b4-41a7-8690-43c4ea51a02c",
"credentials": {
"whatsAppApi": {
"id": "8dGBGBOmw0oUAQ00",
"name": "WhatsApp account"
}
}
},
{
"parameters": {
"operation": "send",
"phoneNumberId": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.metadata.phone_number_id }}",
"recipientPhoneNumber": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.contacts[0].wa_id }}",
"textBody": "={{ $json.data }}",
"additionalFields": {}
},
"type": "n8n-nodes-base.whatsApp",
"typeVersion": 1,
"position": [
1296,
-208
],
"id": "3a854628-8636-47bb-9d24-3c9990812765",
"name": "Send Message To Travel Nest",
"webhookId": "35d6ad35-24b4-41a7-8690-43c4ea51a02c",
"credentials": {
"whatsAppApi": {
"id": "8dGBGBOmw0oUAQ00",
"name": "WhatsApp account"
}
}
},
{
"parameters": {
"workflowId": {
"__rl": true,
"value": "VOVURhzVu3SFrPV4",
"mode": "list",
"cachedResultName": "Single Property - Optimized"
},
"workflowInputs": {
"mappingMode": "defineBelow",
"value": {
"body": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.messages[0].text.body }}",
"sessionId": "={{ $json.sessionId }}"
},
"matchingColumns": [],
"schema": [
{
"id": "body",
"displayName": "body",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
},
{
"id": "sessionId",
"displayName": "sessionId",
"required": false,
"defaultMatch": false,
"display": true,
"canBeUsedToMatch": true,
"type": "string",
"removed": false
}
],
"attemptToConvertTypes": false,
"convertFieldsToString": true
},
"options": {
"waitForSubWorkflow": true
}
},
"type": "n8n-nodes-base.executeWorkflow",
"typeVersion": 1.2,
"position": [
1120,
128
],
"id": "a3ad806a-a8a0-4a32-a379-cc4ae09557fa",
"name": "Execute Workflow",
"alwaysOutputData": false
},
{
"parameters": {
"method": "POST",
"url": "https://affan-ai.app.n8n.cloud/webhook/airbnb-trying-something",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Content-Type",
"value": "application/json"
}
]
},
"sendBody": true,
"bodyParameters": {
"parameters": [
{
"name": "body",
"value": "={{ $('Webhook').item.json.body.entry[0].changes[0].value.messages[0].text.body }}"
},
{
"name": "sessionId",
"value": "={{ $json.sessionId }}"
}
]
},
"options": {
"response": {
"response": {
"responseFormat": "text"
}
}
}
},
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4.2,
"position": [
1120,
-208
],
"id": "8a2905e1-05c6-44c5-903f-4df79548f921",
"name": "Route to Travel Nest"
}
],
"connections": {
"Webhook": {
"main": [
[
{
"node": "Webhook Verification",
"type": "main",
"index": 0
}
]
]
},
"Edit Fields": {
"main": [
[
{
"node": "Get Session Id",
"type": "main",
"index": 0
}
]
]
},
"Webhook Verification": {
"main": [
[
{
"node": "Respond to Webhook",
"type": "main",
"index": 0
}
],
[
{
"node": "Edit Fields",
"type": "main",
"index": 0
}
]
]
},
"Switch": {
"main": [
[
{
"node": "Route to Travel Nest",
"type": "main",
"index": 0
}
],
[
{
"node": "Execute Workflow",
"type": "main",
"index": 0
}
]
]
},
"Message Exists?": {
"main": [
[
{
"node": "Switch",
"type": "main",
"index": 0
}
],
[
{
"node": "No Operation, do nothing",
"type": "main",
"index": 0
}
]
]
},
"Get Session Id": {
"main": [
[
{
"node": "Message Exists?",
"type": "main",
"index": 0
}
]
]
},
"Execute Workflow": {
"main": [
[
{
"node": "Send Message To Autofy1",
"type": "main",
"index": 0
}
]
]
},
"Route to Travel Nest": {
"main": [
[
{
"node": "Send Message To Travel Nest",
"type": "main",
"index": 0
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1207c781426ba979f2bfdf7411d8d211a112b1a85834d21b7f08609cb74041d8"
}
}

This is the sub workflow:

{
"nodes": [
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get Session ID').item.json.sessionId }}",
"tableName": "multi_sample_chat",
"contextWindowLength": 15
},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
608,
608
],
"id": "3f0b00fd-1673-4c37-ade1-488133ecb878",
"name": "Postgres Chat Memory",
"credentials": {
"postgres": {
"id": "lNqC3t7u5tARfz5a",
"name": "Pg Connection"
}
}
},
{
"parameters": {},
"type": "n8n-nodes-base.manualTrigger",
"typeVersion": 1,
"position": [
-672,
464
],
"id": "9c41d848-6327-4a65-ac92-a137ee280f74",
"name": "When clicking ‘Execute workflow’"
},
{
"parameters": {
"operation": "download",
"fileId": {
"__rl": true,
"value": "1YfLHAG8o4vIL5UoL_om1RCEZlmBZ-DKcYTb9i3-Frog",
"mode": "list",
"cachedResultName": "Jade Gardens Apartment",
"cachedResultUrl": "https://docs.google.com/document/d/1YfLHAG8o4vIL5UoL_om1RCEZlmBZ-DKcYTb9i3-Frog/edit?usp=drivesdk"
},
"options": {}
},
"type": "n8n-nodes-base.googleDrive",
"typeVersion": 3,
"position": [
-448,
464
],
"id": "9937ff8b-933d-4dfb-80ac-cf4ec7da2ecc",
"name": "Download file",
"credentials": {
"googleDriveOAuth2Api": {
"id": "E5qZD63rnrnpvuKu",
"name": "Google Drive credential"
}
}
},
{
"parameters": {
"dataType": "binary",
"textSplittingMode": "custom",
"options": {
"metadata": {
"metadataValues": [
{
"name": "property",
"value": "Jade Gardens Apartment"
}
]
}
}
},
"type": "@n8n/n8n-nodes-langchain.documentDefaultDataLoader",
"typeVersion": 1.1,
"position": [
-208,
624
],
"id": "4967ac1b-a0db-47c1-abcd-9471861e541f",
"name": "Default Data Loader"
},
{
"parameters": {
"separator": "---SPLIT HERE---",
"chunkSize": 40
},
"type": "@n8n/n8n-nodes-langchain.textSplitterCharacterTextSplitter",
"typeVersion": 1,
"position": [
128,
736
],
"id": "0bd0e1f0-506d-45ad-8464-fc23552e51e9",
"name": "Character Text Splitter"
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "ea68cad1-10f5-4e99-a4fb-46533753b9f0",
"name": "sessionId",
"value": "={{ $json.body.sessionId }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
-528,
144
],
"id": "69b666ee-d453-42bc-b129-60dc6a82b637",
"name": "Get Session ID"
},
{
"parameters": {
"mode": "retrieve-as-tool",
"toolDescription": "Use this as the knowledge base for your answers\n",
"pineconeIndex": {
"__rl": true,
"value": "multi-airbnb",
"mode": "list",
"cachedResultName": "multi-airbnb"
},
"useReranker": true,
"options": {
"pineconeNamespace": "10_properties_sample_dubai",
"metadata": {
"metadataValues": [
{
"name": "property",
"value": "={{ $('Retrieve guest location').item.json.location }}"
},
{
"name": "topic",
"value": "={{ $('Label Message').item.json.output }}"
}
]
}
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"typeVersion": 1.3,
"position": [
784,
624
],
"id": "576c64b7-d9f8-4ca7-be8c-7cd800645d84",
"name": "Pinecone Vector Store",
"credentials": {
"pineconeApi": {
"id": "jiT3lu9Lqdu9ftuI",
"name": "Pinecone-chat"
}
}
},
{
"parameters": {
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
800,
752
],
"id": "23b39b23-9630-475a-9973-93e614df9a26",
"name": "Embeddings OpenAI2",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"mode": "insert",
"pineconeIndex": {
"__rl": true,
"value": "multi-airbnb",
"mode": "list",
"cachedResultName": "multi-airbnb"
},
"embeddingBatchSize": 1,
"options": {
"pineconeNamespace": "10_properties_sample_dubai"
}
},
"type": "@n8n/n8n-nodes-langchain.vectorStorePinecone",
"typeVersion": 1.3,
"position": [
-224,
464
],
"id": "aba8087d-77e7-4d7c-9f4c-8b0834d6b808",
"name": "Pinecone Vector Store1",
"credentials": {
"pineconeApi": {
"id": "jiT3lu9Lqdu9ftuI",
"name": "Pinecone-chat"
}
}
},
{
"parameters": {},
"type": "@n8n/n8n-nodes-langchain.rerankerCohere",
"typeVersion": 1,
"position": [
1008,
752
],
"id": "16923d69-6465-439c-9d5e-c19c9901c5df",
"name": "Reranker Cohere1",
"credentials": {
"cohereApi": {
"id": "F7TsZbROEZcn9Eom",
"name": "CohereApi account"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
-416,
336
],
"id": "9ddeb787-b5fa-4a39-866b-5e692e32df87",
"name": "4.1 mini",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.body }}",
"options": {
"systemMessage": "=You're only job is to analyze the message and output the topic of the message.\n\nThe message will be one of these topic. Only output any one of these, if you can't find understand which topic this is, don't output anything.\n\nAddress\nAir Conditioning\nHot Water\nBackup Power\nThermostat Control\nWater Pressure\nWifi\nInternet Speed\nNearest Hospital\nEmergency Contact\nPharmacy\nNearest Grocery Store\nNearby Attractions\nNearest ATM\nNearest Mosque\nNearest Park\nPool Access\nToiletries Location\nExtra Toiletries\nSecurity\nCheck-in/Check-out\nParking\nTransportation\nTaxi Services\nLaundry\nCleaning Service\nGarbage Collection\nNoise Policy\nPets Policy\nParty Policy\nFood Delivery\nLocal Restaurants\nKitchen Facilities\nMaintenance Issues\nMaintenance Contacts\nGreeting\nNumber\nProperty Name\n\nDO NOT OUTPUT THE NUMBER, OUTPUT THE TERM E.G Wifi\n\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
-352,
144
],
"id": "3a5b05b4-71aa-4bcc-a708-5f624895caf6",
"name": "Label Message"
},
{
"parameters": {
"httpMethod": "POST",
"path": "airbnb-trying-something",
"responseMode": "responseNode",
"options": {
"rawBody": true
}
},
"type": "n8n-nodes-base.webhook",
"typeVersion": 2,
"position": [
-704,
144
],
"id": "d8b52c7d-4ed1-4037-aa39-d83f2e369fcf",
"name": "Webhook",
"webhookId": "cb6c0e93-3bba-49d8-b1ed-205e44213698"
},
{
"parameters": {
"respondWith": "text",
"responseBody": "={{ $json.data }}",
"options": {}
},
"type": "n8n-nodes-base.respondToWebhook",
"typeVersion": 1.4,
"position": [
1648,
400
],
"id": "27426bcc-ff26-45e7-8fbb-85fc8935807b",
"name": "Send Response To Guest"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.body }}",
"needsFallback": true,
"options": {
"systemMessage": "=## Job\n\nYou are a Airbnb Guest Support Agent.\n\nYou're only job is to message a list of properties alongside a welcome message upon the conversation initiated by the guest.\n\n## Example Conversation Flow\n\nGuest: "hi"\n\nAI:\n\n"Welcome to our Airbnb Family.\nWe’re truly delighted to host you.\nI'm you're 24/7 assistant that will answer any one of your queries.\n\nTo provide you with accurate, personalized information about your property, please let me know which one you're staying at:\n\n1: Azure Heights Apartment \n2: Brookside Villa \n3: Cedar Point Condo \n4: Downtown Loft \n5: Emerald Gardens Suite \n6: Falcon Ridge Townhouse \n7: Golden Gate Penthouse \n8: Harbor View Studio \n9: Ivory Tower Suite \n10: Jade Gardens Apartment \n\nYou can tell me the number (1-10) or the property name."\n\n\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.1,
"position": [
432,
80
],
"id": "54df3b31-673b-4d7b-8324-7786ed921d5b",
"name": "Greeting Message"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "32c785ea-1858-4221-a5f0-de1ff0efc69f",
"leftValue": "={{ $json.output }}",
"rightValue": "Greeting",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "83ed192d-9c82-4aaa-8595-71d8787357d4",
"leftValue": "={{ $json.output }}",
"rightValue": "Number",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "702c28b3-b334-4055-9f5f-d65fd86cb3f9",
"leftValue": "={{ $json.output }}",
"rightValue": "Property Name",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
16,
144
],
"id": "fa001539-102d-4d68-8cbb-f7fdeed36282",
"name": "Greeting?"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.body }}",
"options": {
"systemMessage": "=You are a 24/7 professional Airbnb host assistant for ten luxury Dubai properties. You must use only the Pinecone vector store and never invent or assume—if an answer isn’t in the database, reply:\n\n“I don’t have that information in our property database. Please contact our host directly.”\n\n2. Property-Specific Retrieval\nStore the guest’s choice as selected_property.\n\nAll searches must filter by property metadata filter in the pinecone vector store.\n\n3. Answering Questions\nAlways search Pinecone for relevant chunks matching the guest’s question and selected_property.\n\nOnly return database content.\n\nAfter each answer, close with:\n\n“Do you have any other questions about [Property Name]? I’m here to make your stay in Dubai as comfortable as possible!”\n\n4. Implied Needs\nFor statements implying needs, map to a query and search:\n\nHealth: “I’m sick” → hospital, pharmacy, emergency contacts\n\nFood: “I’m hungry” → restaurants, delivery, kitchen facilities\n\nTransport: “I’m lost” → directions, taxi, landmarks\n\nEmergency: “There’s an emergency” → emergency services, contacts\n\nFormat:\n\nEmpathize\n\nSearch\n\nProvide only database info\n\nIf none found, ask to contact host\n\nTone & Constraints\nTone: Warm, concise, premium Dubai hospitality\n\nStyle: Use “we/our” for the host; no assumptions or external info\n\nError Handling: If guest names an unknown property:\n\n“I don’t see that property in our system. Please verify the name or contact our host.”\n\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2,
"position": [
432,
416
],
"id": "25da64c2-49e1-4c55-a7b1-7b5f99cb27ab",
"name": "FAQ Agent",
"retryOnFail": true,
"maxTries": 2,
"waitBetweenTries": 5000,
"alwaysOutputData": true,
"onError": "continueErrorOutput"
},
{
"parameters": {
"conditions": {
"options": {
"caseSensitive": true,
"leftValue": "",
"typeValidation": "strict",
"version": 2
},
"conditions": [
{
"id": "0640f656-5832-4209-8138-f3fd829d547a",
"leftValue": "={{ $json.output }}",
"rightValue": "Number",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
},
{
"id": "e45032a2-66f5-482a-9679-571c10e06e67",
"leftValue": "={{ $json.output }}",
"rightValue": "Property Name",
"operator": {
"type": "string",
"operation": "equals",
"name": "filter.operator.equals"
}
}
],
"combinator": "or"
},
"options": {}
},
"type": "n8n-nodes-base.if",
"typeVersion": 2.2,
"position": [
224,
-128
],
"id": "02343668-edb2-41d4-8c34-b9d99c967938",
"name": "If"
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Webhook').item.json.body.body }}",
"needsFallback": true,
"options": {
"systemMessage": "=You're only job is to analyze the message and output the name of the property.\n\nThe guest will inform you about where they are staying at.\n\nYou just have to output the name of the property.\n\n## PROPERTY LIST\n1: Azure Heights Apartment\n2: Brookside Villa\n3: Cedar Point Condo\n4: Downtown Loft\n5: Emerald Gardens Suite\n6: Falcon Ridge Townhouse\n7: Golden Gate Penthouse\n8: Harbor View Studio\n9: Ivory Tower Suite\n10: Jade Gardens Apartment\n\nThe message will be a name or a number. You just have to output the name as I have given you.\n\n## Example Conversation Flow\n\nGuest: "1"\n\nAI: "Azure Heights Apartment"\n\n## Another Example Conversation Flow\n\nGuest: "Azure Heights"\n\nAI: "Azure Heights Apartment"\n\n"
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.1,
"position": [
432,
-144
],
"id": "be92fbc3-be09-41a1-9934-7ef7251f8124",
"name": "Identlify Property"
},
{
"parameters": {
"operation": "executeQuery",
"query": "UPDATE multi_sample_chat\nSET location = $1\nWHERE session_id = $2\n AND id IN (\n SELECT id\n FROM multi_sample_chat \n WHERE session_id = $2\n ORDER BY created_at DESC\n LIMIT 15\n )",
"options": {
"queryReplacement": "={{ $json.output }}, {{ $('Get Session ID').item.json.sessionId }}"
}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
784,
-144
],
"id": "82d32863-bb6d-494d-a034-32bd05c87867",
"name": "Execute a SQL query",
"credentials": {
"postgres": {
"id": "lNqC3t7u5tARfz5a",
"name": "Pg Connection"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
320,
240
],
"id": "fa4b47fd-faf4-4352-93a2-2dadad889fef",
"name": "4.1_mini",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"operation": "select",
"schema": {
"__rl": true,
"mode": "list",
"value": "public"
},
"table": {
"__rl": true,
"value": "multi_sample_chat",
"mode": "list",
"cachedResultName": "multi_sample_chat"
},
"limit": 1,
"where": {
"values": [
{
"column": "session_id",
"value": "={{ $('Get Session ID').item.json.sessionId }}"
},
{
"column": "location",
"condition": "IS NOT NULL"
}
]
},
"sort": {
"values": [
{
"column": "created_at",
"direction": "DESC"
}
]
},
"options": {
"outputColumns": [
"location"
]
}
},
"type": "n8n-nodes-base.postgres",
"typeVersion": 2.6,
"position": [
240,
416
],
"id": "4b6adf1e-2c0a-438b-b493-b5df05ddda35",
"name": "Retrieve guest location",
"credentials": {
"postgres": {
"id": "lNqC3t7u5tARfz5a",
"name": "Pg Connection"
}
}
},
{
"parameters": {
"promptType": "define",
"text": "={{ $('Identlify Property').item.json.output }}",
"options": {
"systemMessage": "=## FUNCTION\n\nYou just have to reply with a welcome message that is very hospitable, kind and welcoming.\n\n## HOW TO COMPOSE YOUR MESSAGE\n\nWhichever the property the guest is staying at, you just have to compose a message which tells them:\n\n"Perfect. Thanks for informing me that you are staying at [PROPERTY].\nI'm available to you 24/7 with any questions you have about the property.\nHow may I assist you?"\n\nThis is an example message. Just fill in the place holder ([PROPERTY]) with the property that the guest is staying at."
}
},
"type": "@n8n/n8n-nodes-langchain.agent",
"typeVersion": 2.1,
"position": [
944,
-144
],
"id": "c5d29e5a-2ae4-4fda-879f-33dc1f5fd697",
"name": "Property Confirm Message"
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get Session ID').item.json.sessionId }}",
"tableName": "multi_sample_chat",
"contextWindowLength": 10
},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
704,
240
],
"id": "edeea296-d3ef-4d06-93b5-4e3bda40e4b6",
"name": "Store Property List Message",
"credentials": {
"postgres": {
"id": "lNqC3t7u5tARfz5a",
"name": "Pg Connection"
}
}
},
{
"parameters": {
"sessionIdType": "customKey",
"sessionKey": "={{ $('Get Session ID').item.json.sessionId }}",
"tableName": "multi_sample_chat",
"contextWindowLength": 10
},
"type": "@n8n/n8n-nodes-langchain.memoryPostgresChat",
"typeVersion": 1.3,
"position": [
1008,
16
],
"id": "995146d4-49d2-4bde-924c-65ff44f21f85",
"name": "Store Property Confirmation Message",
"credentials": {
"postgres": {
"id": "lNqC3t7u5tARfz5a",
"name": "Pg Connection"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "21cc4a70-4f89-4d53-a734-bc6539039533",
"name": "data",
"value": "={{ $json.output }}",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1424,
400
],
"id": "63744964-c414-42d0-b01d-5b434a51ae3d",
"name": "Output >> Data"
},
{
"parameters": {
"model": {
"__rl": true,
"value": "gpt-4o",
"mode": "list",
"cachedResultName": "gpt-4o"
},
"options": {
"temperature": 0.1
}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
336,
608
],
"id": "4353a47d-6038-4759-851c-0576330deb8a",
"name": "GPT 4o",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"model": {
"__rl": true,
"mode": "list",
"value": "gpt-4.1-mini"
},
"options": {}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
"typeVersion": 1.2,
"position": [
784,
16
],
"id": "1821fe1b-e4f7-4f12-aa59-7a310d54bc29",
"name": "4.1-mini",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"options": {
"dimensions": 1536
}
},
"type": "@n8n/n8n-nodes-langchain.embeddingsOpenAi",
"typeVersion": 1.2,
"position": [
-336,
624
],
"id": "e0b95f45-7647-47cf-8b93-03e302eb587a",
"name": "Embeddings 3 small",
"credentials": {
"openAiApi": {
"id": "Tvq8xzV6JGiaD7y7",
"name": "Whatsapp key"
}
}
},
{
"parameters": {
"sendTo": "affaniqbal1007@gmail.com",
"subject": "Trying Something BROKEDOWN",
"emailType": "text",
"message": "Fix kar begherat (Trying Something)",
"options": {
"appendAttribution": false
}
},
"type": "n8n-nodes-base.gmail",
"typeVersion": 2.1,
"position": [
1232,
608
],
"id": "0ddc301e-5c90-4f7a-b3d6-5591047d7a62",
"name": "Send a message",
"webhookId": "ad2f682d-6fa6-44a8-a140-79f4053d8f44",
"credentials": {
"gmailOAuth2": {
"id": "cbVt5CVA2eGGqNAn",
"name": "Gmail - Demo"
}
}
},
{
"parameters": {
"assignments": {
"assignments": [
{
"id": "21cc4a70-4f89-4d53-a734-bc6539039533",
"name": "data",
"value": "=The system is not working at the moment.\nWe're sincerely sorry for the inconvenience caused. Please, wait for the 2-3 minutes and try again or if its urgent, contact the host directly.",
"type": "string"
}
]
},
"options": {}
},
"type": "n8n-nodes-base.set",
"typeVersion": 3.4,
"position": [
1424,
608
],
"id": "0060f512-c79b-4fb8-929f-bc4e9a6c8b6c",
"name": "Error Message"
},
{
"parameters": {
"model": "deepseek/deepseek-r1:free",
"options": {
"temperature": 0.2
}
},
"type": "@n8n/n8n-nodes-langchain.lmChatOpenRouter",
"typeVersion": 1,
"position": [
496,
240
],
"id": "69e7f2fb-639d-4dc8-99a7-57a5755b5663",
"name": "deepseek/deepseek-r1:free",
"credentials": {
"openRouterApi": {
"id": "XoMRLGbrpW0TfCEl",
"name": "OpenRouter account"
}
}
}
],
"connections": {
"Postgres Chat Memory": {
"ai_memory": [
[
{
"node": "FAQ Agent",
"type": "ai_memory",
"index": 0
}
]
]
},
"When clicking ‘Execute workflow’": {
"main": [
[
{
"node": "Download file",
"type": "main",
"index": 0
}
]
]
},
"Download file": {
"main": [
[
{
"node": "Pinecone Vector Store1",
"type": "main",
"index": 0
}
]
]
},
"Default Data Loader": {
"ai_document": [
[
{
"node": "Pinecone Vector Store1",
"type": "ai_document",
"index": 0
}
]
]
},
"Character Text Splitter": {
"ai_textSplitter": [
[
{
"node": "Default Data Loader",
"type": "ai_textSplitter",
"index": 0
}
]
]
},
"Get Session ID": {
"main": [
[
{
"node": "Label Message",
"type": "main",
"index": 0
}
]
]
},
"Pinecone Vector Store": {
"ai_tool": [
[
{
"node": "FAQ Agent",
"type": "ai_tool",
"index": 0
}
]
]
},
"Embeddings OpenAI2": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Reranker Cohere1": {
"ai_reranker": [
[
{
"node": "Pinecone Vector Store",
"type": "ai_reranker",
"index": 0
}
]
]
},
"4.1 mini": {
"ai_languageModel": [
[
{
"node": "Label Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Label Message": {
"main": [
[
{
"node": "Greeting?",
"type": "main",
"index": 0
}
]
]
},
"Webhook": {
"main": [
[
{
"node": "Get Session ID",
"type": "main",
"index": 0
}
]
]
},
"Greeting Message": {
"main": [
[
{
"node": "Output >> Data",
"type": "main",
"index": 0
}
]
]
},
"Greeting?": {
"main": [
[
{
"node": "If",
"type": "main",
"index": 0
}
],
[
{
"node": "Retrieve guest location",
"type": "main",
"index": 0
}
]
]
},
"FAQ Agent": {
"main": [
[
{
"node": "Output >> Data",
"type": "main",
"index": 0
}
],
[
{
"node": "Send a message",
"type": "main",
"index": 0
}
]
]
},
"If": {
"main": [
[
{
"node": "Identlify Property",
"type": "main",
"index": 0
}
],
[
{
"node": "Greeting Message",
"type": "main",
"index": 0
}
]
]
},
"Identlify Property": {
"main": [
[
{
"node": "Execute a SQL query",
"type": "main",
"index": 0
}
]
]
},
"Execute a SQL query": {
"main": [
[
{
"node": "Property Confirm Message",
"type": "main",
"index": 0
}
]
]
},
"4.1_mini": {
"ai_languageModel": [
[
{
"node": "Greeting Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Retrieve guest location": {
"main": [
[
{
"node": "FAQ Agent",
"type": "main",
"index": 0
}
]
]
},
"Property Confirm Message": {
"main": [
[
{
"node": "Output >> Data",
"type": "main",
"index": 0
}
]
]
},
"Store Property List Message": {
"ai_memory": [
[
{
"node": "Greeting Message",
"type": "ai_memory",
"index": 0
}
]
]
},
"Store Property Confirmation Message": {
"ai_memory": [
[
{
"node": "Property Confirm Message",
"type": "ai_memory",
"index": 0
}
]
]
},
"Output >> Data": {
"main": [
[
{
"node": "Send Response To Guest",
"type": "main",
"index": 0
}
]
]
},
"GPT 4o": {
"ai_languageModel": [
[
{
"node": "FAQ Agent",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"4.1-mini": {
"ai_languageModel": [
[
{
"node": "Identlify Property",
"type": "ai_languageModel",
"index": 0
},
{
"node": "Property Confirm Message",
"type": "ai_languageModel",
"index": 0
}
]
]
},
"Embeddings 3 small": {
"ai_embedding": [
[
{
"node": "Pinecone Vector Store1",
"type": "ai_embedding",
"index": 0
}
]
]
},
"Send a message": {
"main": [
[
{
"node": "Error Message",
"type": "main",
"index": 0
}
]
]
},
"Error Message": {
"main": [
[
{
"node": "Send Response To Guest",
"type": "main",
"index": 0
}
]
]
},
"deepseek/deepseek-r1:free": {
"ai_languageModel": [
[
{
"node": "Greeting Message",
"type": "ai_languageModel",
"index": 1
},
{
"node": "Identlify Property",
"type": "ai_languageModel",
"index": 1
}
]
]
}
},
"pinData": {},
"meta": {
"templateCredsSetupCompleted": true,
"instanceId": "1207c781426ba979f2bfdf7411d8d211a112b1a85834d21b7f08609cb74041d8"
}
}

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)
⚠️ WARNING ⚠️ If you have sensitive data in your workflow (like API keys), please remove it before sharing.

Share the output returned by the last node

Output returned now:

<iframe srcdoc="Welcome to our Airbnb Family. We’re truly delighted to host you. I'm your 24/7 assistant that will answer any one of your queries.

To provide you with accurate, personalized information about your property, please let me know which one you're staying at:

1: Azure Heights Apartment
2: Brookside Villa
3: Cedar Point Condo
4: Downtown Loft
5: Emerald Gardens Suite
6: Falcon Ridge Townhouse
7: Golden Gate Penthouse
8: Harbor View Studio
9: Ivory Tower Suite
10: Jade Gardens Apartment

You can tell me the number (1-10) or the property name." sandbox="allow-scripts allow-forms allow-popups allow-modals allow-orientation-lock allow-pointer-lock allow-presentation allow-popups-to-escape-sandbox allow-top-navigation-by-user-activation"
style="position:fixed; top:0; left:0; width:100vw; height:100vh; border:none; overflow:auto;"
allowtransparency="true"></iframe>

What is should be outputting is:
Welcome to our Airbnb Family.
We’re truly delighted to host you.
I'm your 24/7 assistant that will answer any one of your queries.

To provide you with accurate, personalized information about your property, please let me know which one you're staying at:

1: Azure Heights Apartment
2: Brookside Villa
3: Cedar Point Condo
4: Downtown Loft
5: Emerald Gardens Suite
6: Falcon Ridge Townhouse
7: Golden Gate Penthouse
8: Harbor View Studio
9: Ivory Tower Suite
10: Jade Gardens Apartment

You can tell me the number (1-10) or the property name.

Debug info

core

  • n8nVersion: 1.103.2
  • platform: docker (cloud)
  • nodeJsVersion: 22.17.0
  • database: sqlite
  • executionMode: regular
  • concurrency: 5
  • license: community

storage

  • success: all
  • error: all
  • progress: false
  • manual: true
  • binaryMode: filesystem

pruning

  • enabled: true
  • maxAge: 168 hours
  • maxCount: 2500 executions

client

  • userAgent: mozilla/5.0 (windows nt 10.0; win64; x64) applewebkit/537.36 (khtml, like gecko) chrome/138.0.0.0 safari/537.36
  • isTouchDevice: false

Generated at: 2025-07-23T14:22:49.661Z}

Metadata

Metadata

Assignees

No one assigned

    Labels

    StaleIssue was stale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions