{
  "id": "j8cEUhUTfh7NrWYR",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "WhatsApp Travel Planner \u2013 Instant Trip Assistance",
  "tags": [],
  "nodes": [
    {
      "id": "121aa07e-2fef-4449-8971-4ebc679a5bfa",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -160,
        -600
      ],
      "parameters": {
        "width": 480,
        "height": 180,
        "content": "This workflow automates personalized travel assistance via WhatsApp. It helps users plan trips, explore destinations, get visa/weather/hotel info, and book packages\u2014all through a friendly virtual agent named Alex. It ensures quick, human-like support 24/7, improving customer experience and reducing manual handling by travel agents."
      },
      "typeVersion": 1
    },
    {
      "id": "46233d6c-35a6-4d00-bc6a-f01e71ec538a",
      "name": "Get WhatsApp Message",
      "type": "n8n-nodes-base.whatsAppTrigger",
      "position": [
        -400,
        -140
      ],
      "parameters": {
        "options": {},
        "updates": [
          "messages"
        ]
      },
      "credentials": {
        "whatsAppTriggerApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "ce1e12df-55f4-42ce-a72f-5c5e1a03a641",
      "name": "Travel Assistant",
      "type": "@n8n/n8n-nodes-langchain.agent",
      "position": [
        -180,
        -140
      ],
      "parameters": {
        "text": "={{ $json.messages[0].text.body }}",
        "options": {
          "systemMessage": "You are Alex, a friendly, professional travel assistant, helping users on WhatsApp with trip planning, destination suggestions, tour packages, travel questions (like visas, weather, hotels), and bookings.\n\nYour style: Clear, concise, warm, and human-like. Avoid technical terms unless asked.\n\nAlways start with this message:\nHello! {{ $json.contacts[0].profile.name }}, welcome to OneClick. I\u2019m your travel assistant. Where would you like to travel?"
        },
        "promptType": "define"
      },
      "typeVersion": 1.9
    },
    {
      "id": "5293e129-1ef3-4500-a3f3-c31ee2516453",
      "name": "Memory",
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "position": [
        -32,
        80
      ],
      "parameters": {
        "sessionKey": "={{ $json.messages[0].text.body }}",
        "sessionIdType": "customKey",
        "contextWindowLength": 200
      },
      "typeVersion": 1.3
    },
    {
      "id": "6dc49e56-457c-44e2-a450-bdb17fd9d04b",
      "name": "Travel Plan Creator",
      "type": "@n8n/n8n-nodes-langchain.lmChatOllama",
      "position": [
        -152,
        80
      ],
      "parameters": {
        "model": "llama3.2-16000:latest",
        "options": {}
      },
      "credentials": {
        "ollamaApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    },
    {
      "id": "d48c5d6e-95f2-4e60-a4be-e4aa9d187229",
      "name": "Wait For Response",
      "type": "n8n-nodes-base.wait",
      "position": [
        196,
        -140
      ],
      "parameters": {
        "amount": 10
      },
      "typeVersion": 1.1
    },
    {
      "id": "c0b1cb28-8f3e-4cbf-9119-29bc62b4a7fc",
      "name": "Send Reply On WhatsApp",
      "type": "n8n-nodes-base.whatsApp",
      "position": [
        416,
        -140
      ],
      "parameters": {
        "textBody": "={{ $json.output }}",
        "operation": "send",
        "phoneNumberId": "=+919876542345",
        "additionalFields": {},
        "recipientPhoneNumber": "={{ $('Get WhatsApp Message').item.json.contacts[0].wa_id }}"
      },
      "credentials": {
        "whatsAppApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "827ccd83-7f7a-41ce-8568-c3beb451fbd9",
  "connections": {
    "Memory": {
      "ai_memory": [
        [
          {
            "node": "Travel Assistant",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Travel Assistant": {
      "main": [
        [
          {
            "node": "Wait For Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait For Response": {
      "main": [
        [
          {
            "node": "Send Reply On WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Travel Plan Creator": {
      "ai_languageModel": [
        [
          {
            "node": "Travel Assistant",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Get WhatsApp Message": {
      "main": [
        [
          {
            "node": "Travel Assistant",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}