{
  "id": "cxCJTsyZ4OX5OxaM",
  "name": "Airlines FAQ Bot",
  "tags": [],
  "nodes": [
    {
      "id": "d1db4f7a-cbb3-4ae1-a476-184c12f3b84c",
      "name": "Webhook - User Question",
      "type": "n8n-nodes-base.webhook",
      "notes": "Receives user questions from chat interface (web, mobile, messaging apps)",
      "position": [
        -2240,
        -48
      ],
      "parameters": {
        "path": "airlines-faq",
        "options": {},
        "httpMethod": "POST",
        "responseMode": "responseNode"
      },
      "typeVersion": 1.1
    },
    {
      "id": "0bef0713-edcc-471a-99b5-461a74ddb142",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2302,
        -204
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 316,
        "content": "## \ud83d\udce5 ENTRY POINT\nReceives travel questions from users"
      },
      "typeVersion": 1
    },
    {
      "id": "315fc368-5276-43ea-a448-9fa6196ad139",
      "name": "Extract & Clean Question",
      "type": "n8n-nodes-base.code",
      "notes": "Parses webhook payload and extracts user question with metadata",
      "position": [
        -2016,
        -48
      ],
      "parameters": {
        "jsCode": "// Extract and clean user input\nconst userQuestion = $input.item.json.body.question || $input.item.json.body.message || $input.item.json.body.text;\nconst userId = $input.item.json.body.user_id || $input.item.json.body.userId || 'anonymous';\nconst sessionId = $input.item.json.body.session_id || $input.item.json.body.sessionId || `session_${Date.now()}`;\nconst userName = $input.item.json.body.user_name || $input.item.json.body.userName || 'Traveler';\n\n// Clean the question\nconst cleanedQuestion = userQuestion.trim();\n\nreturn {\n  json: {\n    userQuestion: cleanedQuestion,\n    userId: userId,\n    sessionId: sessionId,\n    userName: userName,\n    timestamp: new Date().toISOString(),\n    questionLength: cleanedQuestion.length\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "1ba95fc8-ec26-4777-9862-f935b9eb1689",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -2078,
        -204
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 316,
        "content": "## \ud83d\udd0d DATA EXTRACTION\nCleans and structures incoming question"
      },
      "typeVersion": 1
    },
    {
      "id": "8497922b-c25a-499c-9011-30658f50f7fb",
      "name": "Classify Question Category",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Uses AI to categorize the question type for better response handling",
      "position": [
        -1792,
        -48
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-3.5-turbo"
            },
            {
              "name": "messages",
              "value": "=[{\"role\": \"system\", \"content\": \"You are a travel question classifier. Classify the following travel question into ONE of these categories: DESTINATIONS, PACKAGES, VISA, TRANSPORT, HOTELS, ACTIVITIES, BOOKING, CANCELLATION, BAGGAGE, GENERAL. Respond with only the category name in uppercase.\"}, {\"role\": \"user\", \"content\": \"{{ $json.userQuestion }}\"}]"
            },
            {
              "name": "temperature",
              "value": "0.2"
            },
            {
              "name": "max_tokens",
              "value": "20"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "769f6bfc-2285-48b4-9e66-39df46c26e08",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1854,
        -252
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 364,
        "content": "## \ud83c\udff7\ufe0f CATEGORIZATION\nClassifies question into travel categories"
      },
      "typeVersion": 1
    },
    {
      "id": "3cfb9603-87c8-400e-8759-16e48edc9b3a",
      "name": "Parse Category Result",
      "type": "n8n-nodes-base.code",
      "notes": "Extracts and stores the detected question category",
      "position": [
        -1568,
        -48
      ],
      "parameters": {
        "jsCode": "// Extract category from AI response\nconst category = $input.item.json.choices[0].message.content.trim().toUpperCase();\nconst previousData = $('Extract & Clean Question').item.json;\n\nreturn {\n  json: {\n    ...previousData,\n    category: category,\n    categoryDetected: true\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "095d8f5c-5ade-410f-8520-f6425cc1dfc2",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1630,
        -204
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 316,
        "content": "## \ud83d\udccb CATEGORY PARSING\nStores question category for routing"
      },
      "typeVersion": 1
    },
    {
      "id": "bb2ef1fa-d174-4bc7-9701-2198294717ea",
      "name": "Fetch Knowledge Base Context",
      "type": "n8n-nodes-base.code",
      "notes": "Retrieves relevant information from knowledge base based on category",
      "position": [
        -1344,
        -48
      ],
      "parameters": {
        "jsCode": "// Retrieve relevant knowledge base content based on category\nconst category = $input.item.json.category;\n\n// Knowledge base for different categories\nconst knowledgeBase = {\n  DESTINATIONS: `Popular destinations include: Paris (France) - Eiffel Tower, museums; Tokyo (Japan) - temples, technology; New York (USA) - landmarks, culture; Dubai (UAE) - luxury, architecture; Bali (Indonesia) - beaches, temples; London (UK) - history, culture; Rome (Italy) - ancient sites; Barcelona (Spain) - architecture, beaches; Sydney (Australia) - Opera House, beaches; Singapore - modern city, gardens. Best times to visit vary by destination. Europe: April-October. Asia: November-March. Americas: Year-round with seasonal variations.`,\n  \n  PACKAGES: `Travel packages available: Honeymoon packages (7-14 days) with romantic destinations; Family packages with kid-friendly activities; Adventure packages including trekking, diving, skiing; Beach resort packages with all-inclusive options; Cultural tour packages with guided experiences; Business travel packages with flexible bookings; Group tour packages with fixed itineraries; Custom packages tailored to preferences. Packages include flights, hotels, transfers, and selected activities. Early bird discounts up to 20% available.`,\n  \n  VISA: `Visa requirements vary by destination and passport: EU citizens can travel visa-free within Schengen area; US/UK/Canada citizens have visa-free access to 150+ countries; Tourist visas typically valid 30-90 days; Business visas require company invitation letter; E-visas available for many countries (Turkey, India, Australia, etc.); Visa-on-arrival available in Thailand, Indonesia, Maldives; Processing time: 3-15 business days; Required documents: valid passport (6 months validity), photos, travel itinerary, proof of accommodation, bank statements.`,\n  \n  TRANSPORT: `Transportation options: International flights with major airlines (economy, business, first class); Domestic flights for inter-city travel; Airport transfers (private car, shuttle, taxi, metro); Train services (high-speed, regional); Car rentals with international/local companies; Private chauffeurs available; Bike rentals in tourist cities; Ferry services for island destinations; Metro/subway in major cities; Rideshare services (Uber, Lyft) available in most cities. Pre-booking recommended for better rates.`,\n  \n  HOTELS: `Accommodation options: 5-star luxury hotels with premium amenities; 4-star business hotels with conference facilities; 3-star tourist hotels for budget travelers; Boutique hotels with unique experiences; Beach resorts with all-inclusive packages; Airport hotels for layovers; Hostels for backpackers; Vacation rentals (Airbnb, apartments); Bed & breakfasts; Eco-lodges and sustainable accommodations. Amenities include: WiFi, breakfast, pool, gym, spa, concierge, room service. Free cancellation available on selected bookings.`,\n  \n  ACTIVITIES: `Popular activities: City tours (walking, bus, bike); Museum and gallery visits; Adventure sports (diving, skiing, paragliding); Cultural experiences (cooking classes, traditional shows); Beach activities (snorkeling, surfing, sailing); Wildlife safaris and nature tours; Food and wine tours; Shopping tours in local markets; Spa and wellness experiences; Night entertainment and cruises; Photography tours; Theme parks and attractions. Activities can be pre-booked or arranged on arrival.`,\n  \n  BOOKING: `Booking process: Search flights/hotels on website or app; Select dates, passengers, preferences; Compare prices and options; Add extras (meals, baggage, insurance); Enter passenger details; Choose payment method (card, PayPal, installments); Receive instant confirmation email; E-tickets sent to email/app; Check-in online 24-48 hours before departure; Modify booking through manage booking section. Customer support available 24/7. Book in advance for better prices (2-3 months recommended).`,\n  \n  CANCELLATION: `Cancellation policy: Free cancellation up to 24 hours for most bookings; Refundable tickets allow cancellation with fees; Non-refundable tickets have restrictions; Cancellation fees: 0-100% depending on timing; Hotels: usually free cancellation 1-3 days before check-in; Packages: cancellation fees apply per component; Medical emergencies considered for exceptions; Travel insurance covers cancellations; Refund processing: 7-14 business days; Online cancellation available through manage booking. Contact support for assistance.`,\n  \n  BAGGAGE: `Baggage allowance: Economy class - 1 cabin bag (7-10kg) + 1 checked bag (20-23kg); Business class - 2 cabin bags + 2 checked bags (32kg each); Cabin baggage dimensions: 55x40x20cm; Excess baggage charged per kg; Liquid restrictions: max 100ml containers in clear bag; Sports equipment charged separately; Musical instruments as cabin baggage (subject to size); Prohibited items: weapons, explosives, flammables; Fragile items declaration recommended; Lost baggage claim at airport desk; Delayed baggage compensation available.`,\n  \n  GENERAL: `General travel information: Customer service available 24/7 via phone, email, chat; Mobile app for iOS and Android; Loyalty program with points and rewards; Travel insurance recommended for all bookings; Payment options: credit/debit cards, PayPal, installments; Multi-currency support; Newsletter for deals and offers; Best price guarantee; Flexible booking options; Group booking discounts; Corporate travel solutions; Travel advisories and safety tips; Passport and document checklist; Health and vaccination requirements; Currency exchange information.`\n};\n\nconst relevantContext = knowledgeBase[category] || knowledgeBase['GENERAL'];\n\nreturn {\n  json: {\n    ...$input.item.json,\n    knowledgeContext: relevantContext,\n    contextLength: relevantContext.length\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "08a39ce0-ceeb-42b7-8834-7ab611c4ca0f",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1416,
        -188
      ],
      "parameters": {
        "color": 4,
        "height": 300,
        "content": "## \ud83d\udcda KNOWLEDGE BASE\nFetches relevant travel information"
      },
      "typeVersion": 1
    },
    {
      "id": "41dd1bb9-921f-4260-aa46-0af5ac648a4b",
      "name": "Generate AI Answer",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Uses GPT-4 to generate accurate, contextual answer to user's question",
      "position": [
        -1120,
        -48
      ],
      "parameters": {
        "url": "https://api.openai.com/v1/chat/completions",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "model",
              "value": "gpt-4"
            },
            {
              "name": "messages",
              "value": "=[{\"role\": \"system\", \"content\": \"You are a helpful and friendly airlines travel assistant. Answer travel questions accurately based on the provided context. Be concise but informative. Use a warm, professional tone. If you don't have specific information, provide general guidance and suggest contacting customer support for details. Always prioritize customer satisfaction and safety.\\n\\nContext Information:\\n{{ $json.knowledgeContext }}\"}, {\"role\": \"user\", \"content\": \"{{ $json.userQuestion }}\"}]"
            },
            {
              "name": "temperature",
              "value": "0.7"
            },
            {
              "name": "max_tokens",
              "value": "500"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "cfdcbd1d-75ae-43c8-85da-32f8f6f68191",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1192,
        -172
      ],
      "parameters": {
        "color": 6,
        "height": 284,
        "content": "## \ud83e\udd16 AI RESPONSE\nGenerates intelligent answer using GPT-4"
      },
      "typeVersion": 1
    },
    {
      "id": "e153881f-8b15-4138-9b2b-40aca2b9da64",
      "name": "Format Final Response",
      "type": "n8n-nodes-base.code",
      "notes": "Formats AI answer with quick links and related resources",
      "position": [
        -896,
        -48
      ],
      "parameters": {
        "jsCode": "// Extract AI answer and add helpful resources\nconst aiAnswer = $input.item.json.choices[0].message.content.trim();\nconst previousData = $('Fetch Knowledge Base Context').item.json;\nconst category = previousData.category;\n\n// Add relevant quick links based on category\nconst quickLinks = {\n  DESTINATIONS: ['View All Destinations', 'Travel Guides', 'Best Time to Visit'],\n  PACKAGES: ['Browse Packages', 'Custom Package Builder', 'Special Offers'],\n  VISA: ['Visa Requirements Checker', 'Document Checklist', 'Visa Application'],\n  TRANSPORT: ['Book Flights', 'Airport Transfers', 'Car Rentals'],\n  HOTELS: ['Search Hotels', 'Hotel Deals', 'Partner Properties'],\n  ACTIVITIES: ['Popular Activities', 'Book Tours', 'Local Experiences'],\n  BOOKING: ['New Booking', 'Manage Booking', 'Check-in Online'],\n  CANCELLATION: ['Cancel Booking', 'Refund Status', 'Change Booking'],\n  BAGGAGE: ['Baggage Policy', 'Add Extra Baggage', 'Track Baggage'],\n  GENERAL: ['Contact Support', 'FAQs', 'Travel Tips']\n};\n\nconst relatedLinks = quickLinks[category] || quickLinks['GENERAL'];\n\nreturn {\n  json: {\n    answer: aiAnswer,\n    category: category,\n    relatedLinks: relatedLinks,\n    userQuestion: previousData.userQuestion,\n    userName: previousData.userName,\n    userId: previousData.userId,\n    sessionId: previousData.sessionId,\n    timestamp: previousData.timestamp,\n    answerLength: aiAnswer.length,\n    tokensUsed: $input.item.json.usage?.total_tokens || 0\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "33add07e-b654-40f6-b949-306c54fff462",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -958,
        -204
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 316,
        "content": "## \ud83d\udcdd RESPONSE FORMATTING\nAdds helpful links and structures reply"
      },
      "typeVersion": 1
    },
    {
      "id": "8ca97e45-3377-43ec-986c-60437382fc97",
      "name": "Check User Satisfaction",
      "type": "n8n-nodes-base.if",
      "notes": "Detects positive feedback or satisfaction indicators in user response",
      "position": [
        -672,
        -48
      ],
      "parameters": {
        "options": {},
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "satisfaction-check",
              "operator": {
                "type": "string",
                "operation": "regex"
              },
              "leftValue": "={{ $json.userQuestion.toLowerCase() }}",
              "rightValue": "thank|thanks|helpful|great|perfect|excellent|satisfied"
            }
          ]
        }
      },
      "typeVersion": 2
    },
    {
      "id": "df25cb34-8bfc-49dc-84e2-fb49e4eaa574",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -734,
        -316
      ],
      "parameters": {
        "color": 4,
        "width": 220,
        "height": 428,
        "content": "## \u2705 SATISFACTION CHECK\nDetects if user is satisfied with answer"
      },
      "typeVersion": 1
    },
    {
      "id": "02415ea9-30f3-4e6a-9417-cbddb271385c",
      "name": "Log Satisfied User",
      "type": "n8n-nodes-base.code",
      "notes": "Records satisfied user interaction for analytics",
      "position": [
        -448,
        -144
      ],
      "parameters": {
        "jsCode": "// Log satisfied interaction\nconst logData = $input.item.json;\n\nreturn {\n  json: {\n    ...logData,\n    satisfactionStatus: 'satisfied',\n    followUpOffered: false,\n    needsHumanSupport: false\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "bdc67353-8ec2-4cc0-8b52-9b3d47b8dfc9",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        -400
      ],
      "parameters": {
        "color": 6,
        "width": 200,
        "height": 280,
        "content": "## \ud83d\ude0a SATISFIED PATH\nUser is happy with the response"
      },
      "typeVersion": 1
    },
    {
      "id": "cd966262-02d7-4a2a-8c4d-d4817274cbf6",
      "name": "Offer Human Support",
      "type": "n8n-nodes-base.code",
      "notes": "Offers human agent support if user seems unsatisfied or needs more help",
      "position": [
        -448,
        48
      ],
      "parameters": {
        "jsCode": "// Add follow-up offer for unsure users\nconst logData = $input.item.json;\n\nreturn {\n  json: {\n    ...logData,\n    satisfactionStatus: 'needs_followup',\n    followUpOffered: true,\n    followUpMessage: 'Would you like to speak with a travel specialist for more personalized assistance? Or do you have any other questions?',\n    supportOptions: ['Chat with Agent', 'Schedule Call', 'Send Email', 'Continue with Bot']\n  }\n};"
      },
      "typeVersion": 2
    },
    {
      "id": "d7e44de7-358f-49b8-b33d-4a07a9119405",
      "name": "Sticky Note9",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -480,
        208
      ],
      "parameters": {
        "color": 5,
        "width": 200,
        "height": 328,
        "content": "## \ud83e\udd1d FOLLOW-UP PATH\nOffers additional support options"
      },
      "typeVersion": 1
    },
    {
      "id": "d109c4a2-0fbf-4d2d-b83a-6a564dc0debf",
      "name": "Merge Satisfaction Paths",
      "type": "n8n-nodes-base.merge",
      "notes": "Combines both satisfaction paths into single output stream",
      "position": [
        -224,
        -48
      ],
      "parameters": {
        "mode": "combine",
        "options": {}
      },
      "typeVersion": 3
    },
    {
      "id": "93a86c68-f530-42e1-bdb8-fc96d2a8ff0f",
      "name": "Sticky Note10",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -276,
        -220
      ],
      "parameters": {
        "color": 4,
        "width": 200,
        "height": 332,
        "content": "## \ud83d\udd00 PATH MERGE\nCombines different user paths"
      },
      "typeVersion": 1
    },
    {
      "id": "74c7c9f0-6980-49c3-ad70-83a1302b30f8",
      "name": "Log Interaction to Database",
      "type": "n8n-nodes-base.httpRequest",
      "notes": "Saves complete interaction data to database for analytics and training",
      "position": [
        0,
        -48
      ],
      "parameters": {
        "url": "https://your-database-api.com/logs/interactions",
        "options": {},
        "sendBody": true,
        "sendHeaders": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "userId",
              "value": "={{ $json.userId }}"
            },
            {
              "name": "sessionId",
              "value": "={{ $json.sessionId }}"
            },
            {
              "name": "question",
              "value": "={{ $json.userQuestion }}"
            },
            {
              "name": "category",
              "value": "={{ $json.category }}"
            },
            {
              "name": "answer",
              "value": "={{ $json.answer }}"
            },
            {
              "name": "satisfaction",
              "value": "={{ $json.satisfactionStatus }}"
            },
            {
              "name": "timestamp",
              "value": "={{ $json.timestamp }}"
            },
            {
              "name": "tokensUsed",
              "value": "={{ $json.tokensUsed }}"
            }
          ]
        },
        "headerParameters": {
          "parameters": [
            {
              "name": "Content-Type",
              "value": "application/json"
            }
          ]
        }
      },
      "typeVersion": 4.2
    },
    {
      "id": "fd0b4322-d55f-4fe4-b012-95449f15f1a6",
      "name": "Sticky Note11",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -62,
        -316
      ],
      "parameters": {
        "color": 6,
        "width": 220,
        "height": 428,
        "content": "## \ud83d\udcbe DATABASE LOGGING\nStores conversation for analytics"
      },
      "typeVersion": 1
    },
    {
      "id": "74fac8eb-c4d9-4c90-bb9b-b8a833e2285b",
      "name": "Send Response to User",
      "type": "n8n-nodes-base.respondToWebhook",
      "notes": "Sends formatted answer back to user via webhook response",
      "position": [
        224,
        -48
      ],
      "parameters": {
        "options": {},
        "respondWith": "json",
        "responseBody": "={{ {\n  \"status\": \"success\",\n  \"answer\": $json.answer,\n  \"category\": $json.category,\n  \"relatedLinks\": $json.relatedLinks,\n  \"followUpMessage\": $json.followUpMessage || null,\n  \"supportOptions\": $json.supportOptions || null,\n  \"sessionId\": $json.sessionId,\n  \"timestamp\": $json.timestamp\n} }}"
      },
      "typeVersion": 1.1
    },
    {
      "id": "fe10f085-1e51-4fdf-9c12-d673e1549176",
      "name": "Sticky Note12",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        162,
        -252
      ],
      "parameters": {
        "color": 5,
        "width": 220,
        "height": 364,
        "content": "## \ud83d\udce4 RESPONSE DELIVERY\nSends answer back to user interface"
      },
      "typeVersion": 1
    },
    {
      "id": "76739678-85b5-4e62-a537-ad651b769001",
      "name": "Sticky Note13",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1616,
        -1024
      ],
      "parameters": {
        "color": 3,
        "width": 380,
        "height": 664,
        "content": "## \u2708\ufe0f AIRLINES FAQ BOT\n\n**Intelligent Travel Assistant**\n\n**Categories Handled:**\n\u2022 Destinations & Travel Info\n\u2022 Package Deals & Offers  \n\u2022 Visa Requirements\n\u2022 Transportation Options\n\u2022 Hotel Bookings\n\u2022 Activities & Tours\n\u2022 Booking Management\n\u2022 Cancellations & Refunds\n\u2022 Baggage Policies\n\u2022 General Inquiries\n\n**Features:**\n\u2713 AI-powered responses\n\u2713 Context-aware answers\n\u2713 Category classification\n\u2713 Quick links & resources\n\u2713 Satisfaction tracking\n\u2713 Human support escalation\n\u2713 Conversation logging\n\n**Setup Required:**\n1. Add OpenAI API key\n2. Configure database endpoint\n3. Customize knowledge base\n4. Test webhook URL\n5. Connect to chat interface"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "255b9151-2d16-4a97-8929-7c4fe0306493",
  "connections": {
    "Generate AI Answer": {
      "main": [
        [
          {
            "node": "Format Final Response",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Satisfied User": {
      "main": [
        [
          {
            "node": "Merge Satisfaction Paths",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Offer Human Support": {
      "main": [
        [
          {
            "node": "Merge Satisfaction Paths",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Format Final Response": {
      "main": [
        [
          {
            "node": "Check User Satisfaction",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Parse Category Result": {
      "main": [
        [
          {
            "node": "Fetch Knowledge Base Context",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check User Satisfaction": {
      "main": [
        [
          {
            "node": "Log Satisfied User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Offer Human Support",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Webhook - User Question": {
      "main": [
        [
          {
            "node": "Extract & Clean Question",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract & Clean Question": {
      "main": [
        [
          {
            "node": "Classify Question Category",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Merge Satisfaction Paths": {
      "main": [
        [
          {
            "node": "Log Interaction to Database",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Classify Question Category": {
      "main": [
        [
          {
            "node": "Parse Category Result",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Interaction to Database": {
      "main": [
        [
          {
            "node": "Send Response to User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Knowledge Base Context": {
      "main": [
        [
          {
            "node": "Generate AI Answer",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}