{
  "name": "Home Services Booking WhatsApp Agent",
  "nodes": [
    {
      "parameters": {
        "model": {
          "__rl": true,
          "value": "gpt-4o-mini",
          "mode": "list",
          "cachedResultName": "gpt-4o-mini"
        },
        "options": {}
      },
      "type": "@n8n/n8n-nodes-langchain.lmChatOpenAi",
      "typeVersion": 1.2,
      "position": [
        992,
        240
      ],
      "id": "ad5d5900-78ec-4372-b632-4dad50baf6c3",
      "name": "OpenAI Chat Model",
      "credentials": {
        "openAiApi": {
          "id": "SsnwT4koLkkkT1th",
          "name": "OpenAI account"
        }
      }
    },
    {
      "parameters": {
        "operation": "append",
        "documentId": {
          "__rl": true,
          "value": "1Pj98WJdKReEAcc-6VauuhvBPT25E2cwJ3MOYXdPJztU",
          "mode": "list",
          "cachedResultName": "Services Ai Agent"
        },
        "sheetName": {
          "__rl": true,
          "value": 1234260243,
          "mode": "list",
          "cachedResultName": "Appointments"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "Address": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Address', ``, 'string') }}",
            "Service": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Service', ``, 'string') }}",
            "Status": "=Booked",
            "Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Date', ``, 'string') }}",
            "Appointment ID": "=APT{{ Math.floor(Math.random() * 100000) }}",
            "Customer Name": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Customer_Name', ``, 'string') }}",
            "Service ID": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Service_ID', `find this id into calling this Get available service details tools and set a right service id for user asking service name id.`, 'string') }}",
            "Create At": "={{ $now.setZone('America/New_York').toFormat('yyyy-MM-dd hh:mma') }}"
          },
          "matchingColumns": [],
          "schema": [
            {
              "id": "Appointment ID",
              "displayName": "Appointment ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Customer Name",
              "displayName": "Customer Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Service ID",
              "displayName": "Service ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Service",
              "displayName": "Service",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Create At",
              "displayName": "Create At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Updated At",
              "displayName": "Updated At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Cancel Reason",
              "displayName": "Cancel Reason",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        1264,
        240
      ],
      "id": "558d0c9a-7f6c-4d48-ada7-d005706e27ad",
      "name": "Append booking details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Pj98WJdKReEAcc-6VauuhvBPT25E2cwJ3MOYXdPJztU",
          "mode": "list",
          "cachedResultName": "Services Ai Agent"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Services"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Active",
              "lookupValue": "YES"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        1424,
        240
      ],
      "id": "ebc2c8fd-c0f7-4712-9a4f-731d40f79b66",
      "name": "Get available service details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "promptType": "define",
        "text": "={{ $json.data.body }}",
        "hasOutputParser": true,
        "options": {
          "systemMessage": "=# Overview\nYou are an AI WhatsApp booking assistant for SparkHome Services.  \nYou manage home service bookings via WhatsApp using ONLY approved tools.\n\nYour responsibility is to correctly manage bookings for ALL services by:\n- Detecting whether a booking date is provided or missing\n- Handling relative dates like **today** and **tomorrow**\n- Correctly identifying the weekday for the given date\n- Matching that weekday with the service’s Available Days\n- Validating service-specific Start & End Time ONLY for TODAY bookings\n- Using America/New_York timezone\n- Sending instant, clean, WhatsApp-friendly responses (no filler messages)\n\n---\n\n## Context\n- Operates only in WhatsApp\n- Customer mobile number is auto-derived\n- Never ask for mobile number\n- Each service has its own Available Days\n- TODAY bookings must validate weekday FIRST, then time\n- TOMORROW and future bookings validate weekday ONLY\n- One message = one intent\n- If user provides date → respond immediately\n\n---\n\n## Supported User Intents\nDetect exactly ONE intent per message:\n- BOOK_SERVICE\n- RESCHEDULE_BOOKING\n- CANCEL_BOOKING\n- GET_BOOKING_DETAILS\n- GENERAL_QUERY / GREETING\n\nIf intent is unclear → ask ONE short clarifying question.\n\n---\n\n## Global Rules\n- Never ask for mobile number\n- Never repeat already collected information\n- Never mention tools, backend, spreadsheets, or UI\n- Never invent service data\n- Keep replies short, friendly, WhatsApp-style\n- Use emojis lightly\n- End completed flows with a thank-you\n\n---\n\n## Greeting Rule\nONLY on the first user message:\nHello 👋  \nWelcome to SparkHome Services!  \nHow can I help you today?\n\n---\n\n## Tools\nONLY these tools may be used:\n- Get available service details\n- Append booking details\n- Get booking details\n- Reschedule booking\n- Cancel booking\n\n---\n\n## Tool Rules\n- Mobile number MUST be derived as:\n  {{ $json.data.from.replaceAll('whatsapp:+1','') }}\n- Always fetch Service ID\n- Only ONE booking-changing tool per step\n- Allowed Status values ONLY:\n  - Booked\n  - Reschedule\n  - Cancelled\n  - Completed\n\n---\n\n## Date Detection\n\nIf user message contains:\n  - \"today\"\n  - \"tomorrow\"\n  - a valid date (yyyy-MM-dd)\n\nThen:\n  - Date State = DATE_PROVIDED\n\nElse:\n  - Date State = DATE_NOT_PROVIDED\n\nNever assume a date.\n\n---\n\n## Date Normalization\n\nIf Date State = DATE_PROVIDED:\n\n  - today  \n    Booking Date =\n    {{ $now.setZone(\"America/New_York\").toFormat(\"yyyy-MM-dd\") }}\n  \n  - tomorrow  \n    Booking Date =\n    {{ $now.setZone(\"America/New_York\").plus({ days: 1 }).toFormat(\"yyyy-MM-dd\") }}\n  \n  - explicit yyyy-MM-dd  \n    Use exactly as provided\n\n---\n\n## Weekday Handling (AUTHORITATIVE)\n\n### 🔒 HARD RULE\nWeekday MUST be derived correctly and consistently.\n\n### A. TODAY Weekday (ONLY for today)\nUse EXACTLY this expression:\n```text\n{{ [\"Mon\",\"Tue\",\"Wed\",\"Thu\",\"Fri\",\"Sat\",\"Sun\"][ $now.setZone(\"America/New_York\").weekday - 1 ] }}\nB. TOMORROW / FUTURE DATE Weekday\nConvert Booking Date (yyyy-MM-dd) → weekday\n\nOutput MUST be one of:\nMon, Tue, Wed, Thu, Fri, Sat, Sun\n\nCompare ONLY this weekday with service Available Days\n\n⚠️ Never use $now to validate tomorrow or future dates.\n\nBOOK_SERVICE FLOW (FULL & CORRECT)\nStep 1: Identify Service\nCall Get available service details\n\nMatch by Service Name\n\nEnsure Active = YES\n\nIf not available:\n❌ Sorry, this service is not available right now.\n\nStep 2: Date Validation\n(Runs ONLY if DATE_PROVIDED)\n\nA. Available Days Validation (ALWAYS FIRST)\nDerive weekday from Booking Date\n\nMatch with service Available Days\n\nIf weekday NOT allowed:\n❌ {Service} is available only on:\n📅 {Available Days}\n\nPlease choose another date 🙂\n\nSTOP FLOW\n❌ Do NOT check time\n❌ Do NOT ask for name or address\n\nB. TODAY Time Validation\n(Run ONLY if Booking Date = TODAY and weekday is valid)\n\nCurrent Time (ET):\n\ntext\nCopy code\n{{ $now.setZone(\"America/New_York\").toFormat(\"HH:mm\") }}\nDecision Logic:\n\nCurrent < Start Time → ✅ ALLOW\n\nStart Time ≤ Current ≤ End Time → ✅ ALLOW\n\nCurrent > End Time → ❌ BLOCK\n\nIf BLOCK:\n❌ Sorry, today’s booking window for {Service} has ended.\n\n📅 Please choose another date.\n\nSTOP FLOW\n\nStep 3: Ask Missing Details (Chat-Optimized)\nIf DATE_NOT_PROVIDED\nPlease share:\n\nYour name\n\nFull address with landmark\n\nPreferred booking date (yyyy-MM-dd)\n\nIf DATE_PROVIDED\nPlease share:\n\nYour name\n\nFull address with landmark\n\nStep 4: Confirmation\nPlease confirm your booking 👇\n\n🛠 Service: {Service}\n📅 Date: {Date}\n\nReply YES to confirm.\n\nStep 5: Create Booking\nONLY after user replies YES:\n\nCall Append booking details\n\nStatus = Booked\n\nUse derived mobile number\n\nUse correct Service ID\n\nGenerate Appointment ID\n\nStep 6: Final Confirmation\n✅ Booking Confirmed!\n\n🛠 Service: {Service}\n📅 Date: {Date}\n\nA technician will visit your address as scheduled.\n\nThank you for choosing SparkHome Services 🙏\n\nRESCHEDULE_BOOKING\n\nRe-detect and normalize new date\n\nDerive weekday from NEW booking date\n\nValidate Available Days FIRST\n\nValidate TODAY time if applicable\n\nNever reschedule if technician assigned\n\nCANCEL_BOOKING\nNever cancel if technician assigned\n\nAsk cancellation reason\n\nConfirm cancellation clearly\n\nGET_BOOKING_DETAILS\n📋 Your Booking Details\n\nService: {Service}\n\nDate: {Date}\n\nStatus: {Status}\n\nGENERAL_QUERY\nRespond briefly.\nIf information is unavailable:\nℹ️ I don’t have that information at the moment.\n\nFinal Guarantee\n“book Electrician today” → weekday checked correctly → valid result\n\n“book Electrician tomorrow” → tomorrow’s weekday checked correctly\n\nNo false weekday rejections\n\nNo incorrect availability messages\n\nProduction-safe and WhatsApp-optimized"
        }
      },
      "type": "@n8n/n8n-nodes-langchain.agent",
      "typeVersion": 2,
      "position": [
        1344,
        -16
      ],
      "id": "f80dd048-8ecb-4177-b022-1715aa903771",
      "name": "Home Service Booking AI Agent"
    },
    {
      "parameters": {
        "sessionIdType": "customKey",
        "sessionKey": "={{ $('Twilio Trigger').item.json.data.from }}"
      },
      "type": "@n8n/n8n-nodes-langchain.memoryBufferWindow",
      "typeVersion": 1.3,
      "position": [
        1136,
        240
      ],
      "id": "e96ec99e-5a08-4a50-9f6f-0069fdcbfffd",
      "name": "Simple Memory"
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pj98WJdKReEAcc-6VauuhvBPT25E2cwJ3MOYXdPJztU",
          "mode": "list",
          "cachedResultName": "Services Ai Agent"
        },
        "sheetName": {
          "__rl": true,
          "value": 1234260243,
          "mode": "list",
          "cachedResultName": "Appointments"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Status": "Cancelled",
            "Updated At": "={{ $now.setZone('America/New_York').toFormat('yyyy-MM-dd hh:mma') }}",
            "Cancel Reason": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Cancel_Reason', `store here user provide cancel reason`, 'string') }}",
            "Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone__using_to_match_', ``, 'string') }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "Appointment ID",
              "displayName": "Appointment ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Customer Name",
              "displayName": "Customer Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Service ID",
              "displayName": "Service ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Service",
              "displayName": "Service",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Create At",
              "displayName": "Create At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Updated At",
              "displayName": "Updated At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "Cancel Reason",
              "displayName": "Cancel Reason",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        1568,
        240
      ],
      "id": "b295b680-78c7-4180-bbc1-7b4186200925",
      "name": "Cancel booking",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "documentId": {
          "__rl": true,
          "value": "1Pj98WJdKReEAcc-6VauuhvBPT25E2cwJ3MOYXdPJztU",
          "mode": "list",
          "cachedResultName": "Services Ai Agent"
        },
        "sheetName": {
          "__rl": true,
          "value": 1234260243,
          "mode": "list",
          "cachedResultName": "Appointments"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Phone": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Phone', ``, 'string') }}",
            "Status": "=Reschedule",
            "Date": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('Date', ``, 'string') }}",
            "Updated At": "={{ $now.setZone('America/New_York').toFormat('yyyy-MM-dd hh:mma') }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "Appointment ID",
              "displayName": "Appointment ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Customer Name",
              "displayName": "Customer Name",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Address",
              "displayName": "Address",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Service ID",
              "displayName": "Service ID",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Service",
              "displayName": "Service",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Date",
              "displayName": "Date",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Create At",
              "displayName": "Create At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "Updated At",
              "displayName": "Updated At",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": false
            },
            {
              "id": "Cancel Reason",
              "displayName": "Cancel Reason",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "string",
              "canBeUsedToMatch": true,
              "removed": true
            },
            {
              "id": "row_number",
              "displayName": "row_number",
              "required": false,
              "defaultMatch": false,
              "display": true,
              "type": "number",
              "canBeUsedToMatch": true,
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        1712,
        240
      ],
      "id": "b5a2166d-84a0-467a-9eb1-be0d08933570",
      "name": "Reschedule booking",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "1Pj98WJdKReEAcc-6VauuhvBPT25E2cwJ3MOYXdPJztU",
          "mode": "list",
          "cachedResultName": "Services Ai Agent"
        },
        "sheetName": {
          "__rl": true,
          "value": 1234260243,
          "mode": "list",
          "cachedResultName": "Appointments"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Phone",
              "lookupValue": "={{ /*n8n-auto-generated-fromAI-override*/ $fromAI('values1_Value', ``, 'string') }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheetsTool",
      "typeVersion": 4.6,
      "position": [
        1872,
        240
      ],
      "id": "3e1e95cf-2842-446b-8460-20eca1345eb0",
      "name": "Get booking details",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "GojUvCMDXbhY8HrB",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "content": "## Google Sheet\nCreate your own spreadsheet with these tabs/columns, then select it in the Google Sheets nodes:\n- **Services Ai Agent → Appointments**: `Appointment ID`, `Customer Name`, `Phone`, `Address`, `Service ID`, `Service`, `Date`, `Status`, `Create At`, `Updated At`, `Cancel Reason`\n- **Services Ai Agent → Services**: `Active`",
        "height": 144
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        768,
        -16
      ],
      "id": "1490e2af-a793-4bda-8193-dcfd89e91701",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "from": "={{ $('Twilio Trigger').item.json.data.to.replaceAll('whatsapp:','') }}",
        "to": "={{ $('Twilio Trigger').item.json.data.from.replaceAll('whatsapp:','') }}",
        "toWhatsapp": true,
        "message": "={{ $json.output }}",
        "options": {}
      },
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        1680,
        -16
      ],
      "id": "745965c9-71d3-4e98-8e19-e522f68538fe",
      "name": "Send an WhatsApp message",
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "updates": [
          "com.twilio.messaging.inbound-message.received"
        ]
      },
      "type": "n8n-nodes-base.twilioTrigger",
      "typeVersion": 1,
      "position": [
        1120,
        -16
      ],
      "id": "d703a7aa-7ad5-41b3-9539-52611c32445d",
      "name": "Twilio Trigger",
      "webhookId": "2a0af9be-bbcd-4ead-9ba0-e34dce29bbb0",
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "OpenAI Chat Model": {
      "ai_languageModel": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_languageModel",
            "index": 0
          }
        ]
      ]
    },
    "Append booking details": {
      "ai_tool": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get available service details": {
      "ai_tool": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Simple Memory": {
      "ai_memory": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_memory",
            "index": 0
          }
        ]
      ]
    },
    "Cancel booking": {
      "ai_tool": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Reschedule booking": {
      "ai_tool": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Get booking details": {
      "ai_tool": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "ai_tool",
            "index": 0
          }
        ]
      ]
    },
    "Home Service Booking AI Agent": {
      "main": [
        [
          {
            "node": "Send an WhatsApp message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Twilio Trigger": {
      "main": [
        [
          {
            "node": "Home Service Booking AI Agent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "12789c1c-be15-4adc-8430-9616d3e3653c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "nMcUCXxgKg2vMTbO",
  "tags": []
}