{
  "name": "Garage Service Reminder & Follow-up System",
  "nodes": [
    {
      "parameters": {
        "content": "## Airtable\nCreate an Airtable base with these tables/fields, then select it in the Airtable nodes:\n- **Garage / Car Service Reminder System → Tables**: `Phone`, `Reminder_Sent`, `Reminder_Sent_On`, `Pickup_Notification_Sent`, `Pickup_Notification_Sent_On`, `Feedback_Sent`, `Feedback_Sent_On`, `Next_Service_Notification_Sent_On`\n- **Base → Table**: _(columns as used in the nodes)_",
        "height": 128
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -544,
        -80
      ],
      "id": "2f0ad37a-3203-4e4c-893a-e7f95cef787f",
      "name": "Sticky Note"
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "filterByFormula": "=AND(\n  {Status} = \"Pending\",\n  {Service_Date} >= DATEADD(TODAY(), -2, 'days'),\n  {Service_Date} <= DATEADD(TODAY(), 7, 'days'),\n  {Reminder_Sent} = FALSE()\n)",
        "returnAll": false,
        "options": {
          "fields": [
            "Service_ID",
            "Customer_Name",
            "Phone",
            "Email",
            "Vehicle_Model",
            "Vehicle_Number",
            "Service_Type",
            "Service_Date",
            "Status"
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        0,
        -32
      ],
      "id": "ada2eabd-69c3-4a89-8b07-84e6a794de76",
      "name": "Fetch Pending Services (±7 Days)",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        192,
        -32
      ],
      "id": "881e3a90-0503-4612-9ffe-32e68f3d261f",
      "name": "Iterate Services"
    },
    {
      "parameters": {
        "jsCode": "// Purpose: Generate WhatsApp + Email service reminders with premium garage branding\n\nconst GARAGE_NAME = \"PrimeCare Auto Garage\";\n\nconst today = new Date();\ntoday.setHours(0, 0, 0, 0);\n\nreturn items.map(item => {\n  const {\n    Customer_Name,\n    Vehicle_Model,\n    Vehicle_Number,\n    Service_Type,\n    Service_Date,\n    Phone,\n    Email\n  } = item.json;\n\n  const serviceDate = new Date(Service_Date);\n  serviceDate.setHours(0, 0, 0, 0);\n\n  const diffDays = Math.floor(\n    (serviceDate - today) / (1000 * 60 * 60 * 24)\n  );\n\n  let reminderType = null;\n  let whatsappMessage = null;\n  let emailSubject = null;\n  let emailBody = null;\n\n  // ---------- OVERDUE ----------\n  if (diffDays < 0) {\n    reminderType = \"OVERDUE\";\n\n    whatsappMessage =\n`🚨 *SERVICE OVERDUE ALERT*\n\nHello *${Customer_Name}*,\n\nYour vehicle service is overdue. Please review the details below:\n\n🚗 *Vehicle:* ${Vehicle_Model}\n🔢 *Number:* ${Vehicle_Number}\n🛠️ *Service Type:* ${Service_Type}\n📆 *Due Date:* ${Service_Date}\n\nKindly contact us at the earliest to reschedule your service.\n\n— *${GARAGE_NAME}*`;\n\n    emailSubject = `Service Overdue – ${Vehicle_Model} (${Vehicle_Number})`;\n\n    emailBody =\n`Dear ${Customer_Name},\n\nGreetings from ${GARAGE_NAME}.\n\nOur records indicate that your vehicle service is overdue. Please find the service details below:\n\nVehicle Model : ${Vehicle_Model}\nVehicle Number: ${Vehicle_Number}\nService Type  : ${Service_Type}\nDue Date      : ${Service_Date}\n\nTo ensure optimal vehicle performance and safety, we kindly request you to contact us and reschedule your service at the earliest.\n\nIf you have already completed the service, please replay this email.\n\nWarm regards,  \n${GARAGE_NAME}`;\n  }\n\n  // ---------- TODAY ----------\n  else if (diffDays === 0) {\n    reminderType = \"TODAY\";\n\n    whatsappMessage =\n`🔔 *SERVICE REMINDER – TODAY*\n\nHello *${Customer_Name}*,\n\nThis is a reminder that your vehicle service is scheduled for today:\n\n🚗 *Vehicle:* ${Vehicle_Model}\n🔢 *Number:* ${Vehicle_Number}\n🛠️ *Service Type:* ${Service_Type}\n\nWe look forward to serving you.\n\n— *${GARAGE_NAME}*`;\n\n    emailSubject = `Service Reminder Today – ${Vehicle_Model}`;\n\n    emailBody =\n`Dear ${Customer_Name},\n\nThis is a friendly reminder from ${GARAGE_NAME} that your vehicle service is scheduled for today.\n\nService Details:\nVehicle Model : ${Vehicle_Model}\nVehicle Number: ${Vehicle_Number}\nService Type  : ${Service_Type}\nService Date  : Today\n\nOur service team is ready to assist you.\n\nThank you for trusting ${GARAGE_NAME}.\n\nBest regards,  \n${GARAGE_NAME}`;\n  }\n\n  // ---------- UPCOMING (NEXT 7 DAYS) ----------\n  else if (diffDays <= 7) {\n    reminderType = \"UPCOMING\";\n\n    whatsappMessage =\n`📅 *UPCOMING SERVICE REMINDER*\n\nHello *${Customer_Name}*,\n\nYour vehicle service is scheduled soon. Please find the details below:\n\n🚗 *Vehicle:* ${Vehicle_Model}\n🔢 *Number:* ${Vehicle_Number}\n🛠️ *Service Type:* ${Service_Type}\n📆 *Service Date:* ${Service_Date}\n\nIf you need any changes or assistance, feel free to contact us.\n\n— *${GARAGE_NAME}*`;\n\n    emailSubject = `Upcoming Vehicle Service – ${Vehicle_Model}`;\n\n    emailBody =\n`Dear ${Customer_Name},\n\nWe would like to remind you of your upcoming vehicle service with ${GARAGE_NAME}.\n\nService Information:\nVehicle Model : ${Vehicle_Model}\nVehicle Number: ${Vehicle_Number}\nService Type  : ${Service_Type}\nService Date  : ${Service_Date}\n\nShould you require any rescheduling or support, please do not hesitate to contact us.\n\nWe look forward to serving you.\n\nSincerely,  \n${GARAGE_NAME}`;\n  }\n\n  // ---------- OUTPUT ----------\n  return {\n    json: {\n      reminderType,\n      whatsappMessage,\n      emailSubject,\n      emailBody,\n      phone: Phone,\n      email: Email\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        400,
        -16
      ],
      "id": "f7b8d789-17cf-47e1-a223-d1186995d394",
      "name": "Build Reminder Messages"
    },
    {
      "parameters": {
        "from": "+14155238886",
        "to": "={{ $('Build Reminder Messages').item.json.phone}}",
        "toWhatsapp": true,
        "message": "={{ $json.whatsappMessage }}",
        "options": {}
      },
      "id": "afe9aaf2-1d00-466c-a1a1-60f09faf329a",
      "name": "Send WhatsApp Reminder",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        560,
        -16
      ],
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('Build Reminder Messages').item.json.email}}",
        "subject": "={{ $('Build Reminder Messages').item.json.emailSubject }}",
        "emailType": "text",
        "message": "={{ $('Build Reminder Messages').item.json.emailBody }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        736,
        -16
      ],
      "id": "0ebe0796-53f2-4eae-b98b-6c30ce887bef",
      "name": "Send Email Reminder",
      "webhookId": "567f36d8-63c0-447c-9386-2c9b08c16349",
      "credentials": {
        "gmailOAuth2": {
          "id": "emmuhpJGs7nAZSDK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Reminder_Sent": true,
            "Reminder_Sent_On": "={{ $now.toISO() }}",
            "Phone": "={{ $('Build Reminder Messages').item.json.phone }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Service_ID",
              "displayName": "Service_ID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Customer_Name",
              "displayName": "Customer_Name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Model",
              "displayName": "Vehicle_Model",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Number",
              "displayName": "Vehicle_Number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Type",
              "displayName": "Service_Type",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Minor",
                  "value": "Minor"
                },
                {
                  "name": "Major",
                  "value": "Major"
                },
                {
                  "name": "Paid",
                  "value": "Paid"
                },
                {
                  "name": "Free",
                  "value": "Free"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Date",
              "displayName": "Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Delivered",
                  "value": "Delivered"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent",
              "displayName": "Reminder_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Reminder_Sent_On",
              "displayName": "Reminder_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Pickup_Notification_Sent",
              "displayName": "Pickup_Notification_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent_On",
              "displayName": "Pickup_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent",
              "displayName": "Feedback_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent_On",
              "displayName": "Feedback_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Date",
              "displayName": "Next_Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Notification_Sent_On",
              "displayName": "Next_Service_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Created",
              "displayName": "Created",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Last Modified",
              "displayName": "Last Modified",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        912,
        -16
      ],
      "id": "3a5f8e7b-7cff-4075-804e-d8d09ec6979a",
      "name": "Mark Reminder Sent",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "authentication": "airtableTokenApi",
        "baseId": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "id"
        },
        "tableId": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "id"
        },
        "triggerField": "Last Modified",
        "additionalFields": {
          "formula": "={Status} = \"Done\""
        }
      },
      "type": "n8n-nodes-base.airtableTrigger",
      "typeVersion": 1,
      "position": [
        -192,
        256
      ],
      "id": "8fb8aec4-2bc1-4ecb-bfa4-137787d29c57",
      "name": "Run to Service Status Changed → Done",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        -16,
        256
      ],
      "id": "2f19d318-8f0d-49b8-bb54-89be9d89b255",
      "name": "Iterate Completed Services"
    },
    {
      "parameters": {
        "jsCode": "// n8n Function Node\n// Purpose: Generate WhatsApp + Email messages for Car Pickup Notification (Branded & Clean)\n\nconst GARAGE_NAME = \"PrimeCare Auto Garage\";\n\nreturn items.map(item => {\n  const data = $input.first().json.fields;\n\n  const customerName  = data.Customer_Name;\n  const vehicleModel  = data.Vehicle_Model;\n  const vehicleNumber = data.Vehicle_Number || \"\";\n  const serviceType   = data.Service_Type || \"General Service\";\n  const serviceDate   = data.Service_Date || \"N/A\";\n\n  // -----------------------------\n  // WhatsApp Message\n  // -----------------------------\n  const whatsappMessage =\n`🚗 *VEHICLE READY FOR PICKUP*\n\nHello *${customerName}*,\n\nWe are pleased to inform you that your vehicle service has been completed successfully.\n\n🚘 *Vehicle:* ${vehicleModel}${vehicleNumber ? ` (${vehicleNumber})` : \"\"}\n🛠️ *Service Type:* ${serviceType}\n📅 *Service Date:* ${serviceDate}\n\nYour vehicle is now ready for pickup.  \nPlease visit us at your convenience.\n\n🙏 Thank you for choosing.\n  — *${GARAGE_NAME}*`;\n\n  // -----------------------------\n  // Email Subject\n  // -----------------------------\n  const emailSubject =\n    `Your Vehicle Is Ready for Pickup – ${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Email Body\n  // -----------------------------\n  const emailBody =\n`Dear ${customerName},\n\nGreetings from ${GARAGE_NAME}.\n\nWe are happy to inform you that the service for your vehicle has been completed and your car is now ready for pickup.\n\nService Summary:\nVehicle Model : ${vehicleModel}\nVehicle Number: ${vehicleNumber || \"N/A\"}\nService Type  : ${serviceType}\nService Date  : ${serviceDate}\n\nYou may visit our service center at your convenience to collect your vehicle.\n\nIf you have any questions or require assistance, please feel free to contact us.\n\nThank you for trusting ${GARAGE_NAME} with your vehicle.\n\nWarm regards,  \n${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Output\n  // -----------------------------\n  return {\n    json: {\n      phone: data.Phone,\n      email: data.Email,\n      whatsappMessage,\n      emailSubject,\n      emailBody\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        192,
        272
      ],
      "id": "35dfe1ec-e4c5-4e6a-88f5-ce3635178b99",
      "name": "Build Pickup Messages"
    },
    {
      "parameters": {
        "from": "+14155238886",
        "to": "={{ $('Build Pickup Messages').item.json.phone }}",
        "toWhatsapp": true,
        "message": "={{ $json.whatsappMessage }}",
        "options": {}
      },
      "id": "83fcd59d-c042-49b0-bc51-44b284841bb3",
      "name": "Send Pickup WhatsApp",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        384,
        272
      ],
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('Build Pickup Messages').item.json.email }}",
        "subject": "={{ $('Build Pickup Messages').item.json.emailSubject }}",
        "emailType": "text",
        "message": "={{ $('Build Pickup Messages').item.json.emailBody }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        576,
        272
      ],
      "id": "cf10e348-d926-49d7-9d89-827cc9733320",
      "name": "Send Pickup Email",
      "webhookId": "567f36d8-63c0-447c-9386-2c9b08c16349",
      "credentials": {
        "gmailOAuth2": {
          "id": "emmuhpJGs7nAZSDK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Pickup_Notification_Sent_On": "={{ $now.toISO() }}",
            "Pickup_Notification_Sent": true,
            "Phone": "={{ $('Build Pickup Messages').item.json.phone }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Service_ID",
              "displayName": "Service_ID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Customer_Name",
              "displayName": "Customer_Name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Model",
              "displayName": "Vehicle_Model",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Number",
              "displayName": "Vehicle_Number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Type",
              "displayName": "Service_Type",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Minor",
                  "value": "Minor"
                },
                {
                  "name": "Major",
                  "value": "Major"
                },
                {
                  "name": "Paid",
                  "value": "Paid"
                },
                {
                  "name": "Free",
                  "value": "Free"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Date",
              "displayName": "Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Delivered",
                  "value": "Delivered"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent",
              "displayName": "Reminder_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent_On",
              "displayName": "Reminder_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent",
              "displayName": "Pickup_Notification_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Pickup_Notification_Sent_On",
              "displayName": "Pickup_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Feedback_Sent",
              "displayName": "Feedback_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent_On",
              "displayName": "Feedback_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Date",
              "displayName": "Next_Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Notification_Sent_On",
              "displayName": "Next_Service_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Created",
              "displayName": "Created",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Last Modified",
              "displayName": "Last Modified",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        768,
        272
      ],
      "id": "7035f672-5108-4717-99e7-7f085fb1f475",
      "name": "Mark Pickup Notification Sent",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "pollTimes": {
          "item": [
            {
              "mode": "everyMinute"
            }
          ]
        },
        "authentication": "airtableTokenApi",
        "baseId": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "id"
        },
        "tableId": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "id"
        },
        "triggerField": "Last Modified",
        "additionalFields": {
          "formula": "={Status} = \"Delivered\""
        }
      },
      "type": "n8n-nodes-base.airtableTrigger",
      "typeVersion": 1,
      "position": [
        -192,
        560
      ],
      "id": "90138b81-7a9b-48f5-80ae-3fc1ae381c4d",
      "name": "Vehicle Delivered Trigger",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        16,
        560
      ],
      "id": "22252e8e-1a62-47ef-a264-9ed41ae703b4",
      "name": "Iterate Delivered Records"
    },
    {
      "parameters": {
        "jsCode": "// n8n Function Node\n// Workflow: Post-Delivery Feedback Collection (Branded & Clean)\n\nconst GARAGE_NAME = \"PrimeCare Auto Garage\";\n\nreturn items.map(item => {\n  const data = $input.first().json.fields;\n\n  // -----------------------------\n  // Safety Check (avoid duplicate feedback requests)\n  // -----------------------------\n  if (data.Feedback_Sent === true) {\n    return { json: { skip: true } };\n  }\n\n  const customerName  = data.Customer_Name;\n  const vehicleModel  = data.Vehicle_Model;\n  const vehicleNumber = data.Vehicle_Number || \"\";\n  const serviceDate   = data.Service_Date || \"N/A\";\n\n  // 🔗 Feedback link (replace if needed)\n  const feedbackLink = \"https://forms.gle/YOUR-FORM-ID\";\n\n  // -----------------------------\n  // WhatsApp Feedback Message\n  // -----------------------------\n  const whatsappMessage =\n`🙏 *THANK YOU FOR CHOOSING ${GARAGE_NAME.toUpperCase()}*\n\nHello *${customerName}*,\n\nWe hope you are enjoying your vehicle after the recent service.\n\n🚘 *Vehicle:* ${vehicleModel}${vehicleNumber ? ` (${vehicleNumber})` : \"\"}\n📅 *Service Date:* ${serviceDate}\n\nYour feedback means a lot to us and helps us improve our service quality.\n\n⭐ *Please share your experience here:*  \n${feedbackLink}\n\nThank you for your valuable time.\n— *${GARAGE_NAME}*`;\n\n  // -----------------------------\n  // Email Subject\n  // -----------------------------\n  const emailSubject =\n    `We Value Your Feedback – ${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Email Body\n  // -----------------------------\n  const emailBody =\n`Dear ${customerName},\n\nGreetings from ${GARAGE_NAME}.\n\nThank you for choosing us for your recent vehicle service. We hope your experience met your expectations.\n\nService Details:\nVehicle Model : ${vehicleModel}\nVehicle Number: ${vehicleNumber || \"N/A\"}\nService Date  : ${serviceDate}\n\nYour feedback plays an important role in helping us improve and serve you better.\n\nPlease take a moment to share your experience by clicking the link below:\n${feedbackLink}\n\nWe truly appreciate your time and support.\n\nWarm regards,  \n${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Output for Next Nodes\n  // -----------------------------\n  return {\n    json: {\n      phone: data.Phone,\n      email: data.Email,\n      whatsappMessage,\n      emailSubject,\n      emailBody,\n      markFeedbackSent: true\n    }\n  };\n});"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        224,
        576
      ],
      "id": "15e10a75-c888-4347-8ad3-14e1ca780d92",
      "name": "Build Feedback Messages"
    },
    {
      "parameters": {
        "from": "+14155238886",
        "to": "={{ $('Build Feedback Messages').item.json.phone }}",
        "toWhatsapp": true,
        "message": "={{ $json.whatsappMessage }}",
        "options": {}
      },
      "id": "6680bf81-b182-4cd0-8d65-c70bf819b570",
      "name": "Send Feedback WhatsApp",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        384,
        576
      ],
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $('Build Feedback Messages').item.json.email }}",
        "subject": "={{ $('Build Feedback Messages').item.json.emailSubject }}",
        "emailType": "text",
        "message": "={{ $('Build Feedback Messages').item.json.emailBody }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        576,
        576
      ],
      "id": "f679ed51-ab80-4825-88ae-8994a3fc04d1",
      "name": "Send Feedback Email",
      "webhookId": "567f36d8-63c0-447c-9386-2c9b08c16349",
      "credentials": {
        "gmailOAuth2": {
          "id": "emmuhpJGs7nAZSDK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Feedback_Sent": "={{ $('Build Feedback Messages').item.json.markFeedbackSent }}",
            "Feedback_Sent_On": "={{ $now.toISO() }}",
            "Phone": "={{ $('Build Feedback Messages').item.json.phone }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Service_ID",
              "displayName": "Service_ID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Customer_Name",
              "displayName": "Customer_Name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Model",
              "displayName": "Vehicle_Model",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Number",
              "displayName": "Vehicle_Number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Type",
              "displayName": "Service_Type",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Minor",
                  "value": "Minor"
                },
                {
                  "name": "Major",
                  "value": "Major"
                },
                {
                  "name": "Paid",
                  "value": "Paid"
                },
                {
                  "name": "Free",
                  "value": "Free"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Date",
              "displayName": "Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Delivered",
                  "value": "Delivered"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent",
              "displayName": "Reminder_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent_On",
              "displayName": "Reminder_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent",
              "displayName": "Pickup_Notification_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent_On",
              "displayName": "Pickup_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent",
              "displayName": "Feedback_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Feedback_Sent_On",
              "displayName": "Feedback_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Next_Service_Date",
              "displayName": "Next_Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Notification_Sent_On",
              "displayName": "Next_Service_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Created",
              "displayName": "Created",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Last Modified",
              "displayName": "Last Modified",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        768,
        576
      ],
      "id": "7ebf125d-6082-4ade-8a9c-e5ed1ed0a2b6",
      "name": "Mark Feedback Sent",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "content": "## WF-01 | Scheduled Service Reminder",
        "width": 512
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -224,
        -96
      ],
      "id": "0597a659-fde9-4bc0-a18f-5e30b907bc19",
      "name": "Sticky Note1"
    },
    {
      "parameters": {
        "content": "## WF-02 | Pickup Notification",
        "width": 352
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -224,
        192
      ],
      "id": "7c10ab8c-087a-4a01-9df8-ae3233f7c297",
      "name": "Sticky Note2"
    },
    {
      "parameters": {
        "content": "## WF-03 | Feedback Collection",
        "width": 368
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -224,
        496
      ],
      "id": "432bd351-4446-4148-af7a-f6f138a078b6",
      "name": "Sticky Note3"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -192,
        -32
      ],
      "id": "7bd1c85c-139c-4300-a690-28fdc8c2d22c",
      "name": "Daily Service Reminder Trigger"
    },
    {
      "parameters": {
        "content": "## Google sheet (Feed-Back Collect)\nCreate your own spreadsheet and select it in the Google Sheets nodes.",
        "height": 192,
        "width": 256
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -544,
        64
      ],
      "id": "3eff89af-7605-4890-bb4f-5a8def22f44d",
      "name": "Sticky Note4"
    },
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 9
            }
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        -192,
        832
      ],
      "id": "6ba38d81-f960-4732-9943-d58f0c4bb57b",
      "name": "Next Service Reminder Trigger"
    },
    {
      "parameters": {
        "operation": "search",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "filterByFormula": "=AND(\n  {Next_Service_Date} >= DATEADD(TODAY(), -2, 'days'),\n  {Next_Service_Date} <= DATEADD(TODAY(), 7, 'days')\n)",
        "returnAll": false,
        "options": {
          "fields": [
            "Customer_Name",
            "Phone",
            "Email",
            "Vehicle_Model",
            "Vehicle_Number",
            "Service_Type",
            "Service_Date",
            "Next_Service_Date"
          ]
        }
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        0,
        832
      ],
      "id": "d35c0b54-15d1-4a69-ad34-2e24b81cb5ef",
      "name": "Fetch Next Services (±7 Days)",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "options": {}
      },
      "type": "n8n-nodes-base.splitInBatches",
      "typeVersion": 3,
      "position": [
        192,
        832
      ],
      "id": "b570e6b4-4549-4d80-80b9-7e19dfa8a7ea",
      "name": "Iterate Services "
    },
    {
      "parameters": {
        "jsCode": "// n8n Function Node\n// Workflow: Next Service Reminder (Window: -2 days to +7 days)\n\nconst GARAGE_NAME = \"PrimeCare Auto Garage\";\n\nconst today = new Date();\ntoday.setHours(0, 0, 0, 0);\n\nreturn items.map(item => {\n  const data = item.json.fields || item.json;\n\n  const customerName  = data.Customer_Name;\n  const vehicleModel  = data.Vehicle_Model;\n  const vehicleNumber = data.Vehicle_Number || \"\";\n  const serviceType   = data.Service_Type || \"General Service\";\n  const nextService   = new Date(data.Next_Service_Date);\n  const phone         = data.Phone;\n  const email         = data.Email;\n\n  nextService.setHours(0, 0, 0, 0);\n\n  const diffDays = Math.floor(\n    (nextService - today) / (1000 * 60 * 60 * 24)\n  );\n\n  // ⛔ Outside reminder window (-2 to +7 days)\n  if (diffDays < -2 || diffDays > 7) {\n    return { json: { skip: true } };\n  }\n\n  // -----------------------------\n  // Determine Reminder Type\n  // -----------------------------\n  let reminderType = \"\";\n  let titleEmoji = \"\";\n  let heading = \"\";\n\n  if (diffDays < 0) {\n    reminderType = \"OVERDUE\";\n    titleEmoji = \"⚠️\";\n    heading = \"SERVICE OVERDUE REMINDER\";\n  } else if (diffDays === 0) {\n    reminderType = \"TODAY\";\n    titleEmoji = \"🔔\";\n    heading = \"SERVICE DUE TODAY\";\n  } else {\n    reminderType = \"UPCOMING\";\n    titleEmoji = \"📅\";\n    heading = \"UPCOMING SERVICE REMINDER\";\n  }\n\n  const formattedDate = nextService.toISOString().split(\"T\")[0];\n\n  // -----------------------------\n  // WhatsApp Message (Beautiful)\n  // -----------------------------\n  const whatsappMessage =\n`${titleEmoji} *${heading}*\n\nHello *${customerName}*,\n\nThis is a reminder from *${GARAGE_NAME}* regarding your upcoming vehicle service.\n\n🚗 *Vehicle:* ${vehicleModel}${vehicleNumber ? ` (${vehicleNumber})` : \"\"}\n🛠️ *Service Type:* ${serviceType}\n📆 *Service Date:* ${formattedDate}\n\nPlease contact us if you would like to confirm or reschedule your service.\n\nThank you for trusting.\n— *${GARAGE_NAME}*`;\n\n  // -----------------------------\n  // Email Subject\n  // -----------------------------\n  const emailSubject =\n    `${heading} – ${vehicleModel} | ${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Email Body (Clean & Professional)\n  // -----------------------------\n  const emailBody =\n`Dear ${customerName},\n\nGreetings from ${GARAGE_NAME}.\n\nThis is a reminder regarding your vehicle’s upcoming service. Please find the details below:\n\nVehicle Model : ${vehicleModel}\nVehicle Number: ${vehicleNumber || \"N/A\"}\nService Type  : ${serviceType}\nService Date  : ${formattedDate}\n\nRegular servicing helps ensure safety, performance, and longevity of your vehicle.  \nIf you wish to reschedule or have any questions, please feel free to contact us.\n\nThank you for choosing ${GARAGE_NAME}. We look forward to serving you.\n\nWarm regards,  \n${GARAGE_NAME}`;\n\n  // -----------------------------\n  // Output\n  // -----------------------------\n  return {\n    json: {\n      reminderType,\n      phone,\n      email,\n      whatsappMessage,\n      emailSubject,\n      emailBody\n    }\n  };\n});\n"
      },
      "type": "n8n-nodes-base.code",
      "typeVersion": 2,
      "position": [
        384,
        848
      ],
      "id": "3ed9ff1b-f45a-418b-8106-798fd16c3b0b",
      "name": "Build Next Service Reminder Messages"
    },
    {
      "parameters": {
        "from": "+14155238886",
        "to": "=Phone_number",
        "toWhatsapp": true,
        "message": "={{ $json.whatsappMessage }}",
        "options": {}
      },
      "id": "d552e080-0f2a-466e-9229-4220c802c916",
      "name": "Send Next Service WhatsApp",
      "type": "n8n-nodes-base.twilio",
      "typeVersion": 1,
      "position": [
        560,
        848
      ],
      "credentials": {
        "twilioApi": {
          "id": "xmQ7NblKKLEiOZwC",
          "name": "Twilio account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "=team@forgentsystems.com",
        "subject": "={{ $('Build Next Service Reminder Messages').item.json.emailSubject }}",
        "emailType": "text",
        "message": "={{ $('Build Next Service Reminder Messages').item.json.emailBody }}",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.2,
      "position": [
        752,
        848
      ],
      "id": "560ac54f-aa77-43ed-81dc-ccf81fe0babf",
      "name": "Send Next Service Email",
      "webhookId": "567f36d8-63c0-447c-9386-2c9b08c16349",
      "credentials": {
        "gmailOAuth2": {
          "id": "emmuhpJGs7nAZSDK",
          "name": "Gmail account"
        }
      }
    },
    {
      "parameters": {
        "operation": "update",
        "base": {
          "__rl": true,
          "value": "appmSBBXPDGEXnseu",
          "mode": "list",
          "cachedResultName": "Garage / Car Service Reminder System"
        },
        "table": {
          "__rl": true,
          "value": "tbl3MOWawOfMkbcuk",
          "mode": "list",
          "cachedResultName": "Tables"
        },
        "columns": {
          "mappingMode": "defineBelow",
          "value": {
            "Phone": "={{ $('Build Next Service Reminder Messages').item.json.phone }}",
            "Next_Service_Notification_Sent_On": "={{ $now.toISO() }}"
          },
          "matchingColumns": [
            "Phone"
          ],
          "schema": [
            {
              "id": "id",
              "displayName": "id",
              "required": false,
              "defaultMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Service_ID",
              "displayName": "Service_ID",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Customer_Name",
              "displayName": "Customer_Name",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Phone",
              "displayName": "Phone",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Email",
              "displayName": "Email",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Model",
              "displayName": "Vehicle_Model",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Vehicle_Number",
              "displayName": "Vehicle_Number",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Type",
              "displayName": "Service_Type",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Minor",
                  "value": "Minor"
                },
                {
                  "name": "Major",
                  "value": "Major"
                },
                {
                  "name": "Paid",
                  "value": "Paid"
                },
                {
                  "name": "Free",
                  "value": "Free"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Service_Date",
              "displayName": "Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Status",
              "displayName": "Status",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "options",
              "options": [
                {
                  "name": "Pending",
                  "value": "Pending"
                },
                {
                  "name": "In Progress",
                  "value": "In Progress"
                },
                {
                  "name": "Done",
                  "value": "Done"
                },
                {
                  "name": "Delivered",
                  "value": "Delivered"
                }
              ],
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent",
              "displayName": "Reminder_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Reminder_Sent_On",
              "displayName": "Reminder_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent",
              "displayName": "Pickup_Notification_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Pickup_Notification_Sent_On",
              "displayName": "Pickup_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent",
              "displayName": "Feedback_Sent",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "boolean",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Feedback_Sent_On",
              "displayName": "Feedback_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Date",
              "displayName": "Next_Service_Date",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": true
            },
            {
              "id": "Next_Service_Notification_Sent_On",
              "displayName": "Next_Service_Notification_Sent_On",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "dateTime",
              "readOnly": false,
              "removed": false
            },
            {
              "id": "Created",
              "displayName": "Created",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            },
            {
              "id": "Last Modified",
              "displayName": "Last Modified",
              "required": false,
              "defaultMatch": false,
              "canBeUsedToMatch": true,
              "display": true,
              "type": "string",
              "readOnly": true,
              "removed": true
            }
          ],
          "attemptToConvertTypes": false,
          "convertFieldsToString": false
        },
        "options": {}
      },
      "type": "n8n-nodes-base.airtable",
      "typeVersion": 2.1,
      "position": [
        944,
        848
      ],
      "id": "935b44ba-6186-4935-a67c-f6283f1c745a",
      "name": "Mark Next Service Reminder Sent",
      "credentials": {
        "airtableTokenApi": {
          "id": "0lstEdikXtvhmDPJ",
          "name": "Airtable account"
        }
      }
    },
    {
      "parameters": {
        "content": "## WF-04 | Next Service Reminder",
        "width": 384
      },
      "type": "n8n-nodes-base.stickyNote",
      "typeVersion": 1,
      "position": [
        -224,
        768
      ],
      "id": "a8111e8d-294a-45f9-86ef-31356404c9ee",
      "name": "Sticky Note5"
    }
  ],
  "pinData": {},
  "connections": {
    "Fetch Pending Services (±7 Days)": {
      "main": [
        [
          {
            "node": "Iterate Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Services": {
      "main": [
        [],
        [
          {
            "node": "Build Reminder Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Reminder Messages": {
      "main": [
        [
          {
            "node": "Send WhatsApp Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send WhatsApp Reminder": {
      "main": [
        [
          {
            "node": "Send Email Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Email Reminder": {
      "main": [
        [
          {
            "node": "Mark Reminder Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Reminder Sent": {
      "main": [
        [
          {
            "node": "Iterate Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Run to Service Status Changed → Done": {
      "main": [
        [
          {
            "node": "Iterate Completed Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Completed Services": {
      "main": [
        [],
        [
          {
            "node": "Build Pickup Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Pickup Messages": {
      "main": [
        [
          {
            "node": "Send Pickup WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Pickup WhatsApp": {
      "main": [
        [
          {
            "node": "Send Pickup Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Pickup Email": {
      "main": [
        [
          {
            "node": "Mark Pickup Notification Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Pickup Notification Sent": {
      "main": [
        [
          {
            "node": "Iterate Completed Services",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Vehicle Delivered Trigger": {
      "main": [
        [
          {
            "node": "Iterate Delivered Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Delivered Records": {
      "main": [
        [],
        [
          {
            "node": "Build Feedback Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Feedback Messages": {
      "main": [
        [
          {
            "node": "Send Feedback WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Feedback WhatsApp": {
      "main": [
        [
          {
            "node": "Send Feedback Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Feedback Email": {
      "main": [
        [
          {
            "node": "Mark Feedback Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Feedback Sent": {
      "main": [
        [
          {
            "node": "Iterate Delivered Records",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Service Reminder Trigger": {
      "main": [
        [
          {
            "node": "Fetch Pending Services (±7 Days)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Next Service Reminder Trigger": {
      "main": [
        [
          {
            "node": "Fetch Next Services (±7 Days)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Fetch Next Services (±7 Days)": {
      "main": [
        [
          {
            "node": "Iterate Services ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Iterate Services ": {
      "main": [
        [],
        [
          {
            "node": "Build Next Service Reminder Messages",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Build Next Service Reminder Messages": {
      "main": [
        [
          {
            "node": "Send Next Service WhatsApp",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Next Service WhatsApp": {
      "main": [
        [
          {
            "node": "Send Next Service Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Next Service Email": {
      "main": [
        [
          {
            "node": "Mark Next Service Reminder Sent",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Mark Next Service Reminder Sent": {
      "main": [
        [
          {
            "node": "Iterate Services ",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "1f10a3ae-fb14-44c4-946f-431e28ad9724",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "mD37DH57FYy7k8Dt",
  "tags": []
}