{
  "id": "7L6Ka02UXZjZkoGl",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "My workflow 11",
  "tags": [],
  "nodes": [
    {
      "id": "9487a692-5838-4bdf-a28c-dce226b76990",
      "name": "Daily Appointment Check",
      "type": "n8n-nodes-base.scheduleTrigger",
      "position": [
        -4208,
        736
      ],
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "typeVersion": 1.3
    },
    {
      "id": "f02422d3-2777-44cc-8fe7-f8f2b1076e74",
      "name": "Workflow Configuration",
      "type": "n8n-nodes-base.set",
      "position": [
        -3984,
        736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "daysAhead",
              "type": "number",
              "value": 1
            },
            {
              "id": "id-2",
              "name": "rescheduleUrl",
              "type": "string",
              "value": "<__PLACEHOLDER_VALUE__Reschedule booking URL__>"
            },
            {
              "id": "id-3",
              "name": "groomingInstructions",
              "type": "string",
              "value": "Please ensure your pet is clean and dry before the appointment. Avoid feeding 2 hours before grooming."
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "ed4cdd56-f47a-4a98-9bef-b82493b3691f",
      "name": "Get Upcoming Appointments",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -3760,
        736
      ],
      "parameters": {
        "options": {
          "dataLocationOnSheet": {
            "values": {
              "range": "A:F",
              "rangeDefinition": "specifyRangeA1"
            }
          }
        },
        "filtersUI": {
          "values": [
            {
              "lookupValue": "={{ $today.plus({ days: $('Workflow Configuration').first().json.daysAhead }).toFormat('yyyy-MM-dd') }}",
              "lookupColumn": "date"
            }
          ]
        },
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "<__PLACEHOLDER_VALUE__Sheet name (e.g., Appointments)__>"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Google Sheets Document ID__>"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "13578abd-9958-4562-8c35-b919c63c9083",
      "name": "Normalize Client Data",
      "type": "n8n-nodes-base.set",
      "position": [
        -3536,
        736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "clientName",
              "type": "string",
              "value": "={{ $json.clientName || $json['Client Name'] }}"
            },
            {
              "id": "id-2",
              "name": "phone",
              "type": "string",
              "value": "={{ $json.phone || $json['Phone'] }}"
            },
            {
              "id": "id-3",
              "name": "email",
              "type": "string",
              "value": "={{ $json.email || $json['Email'] }}"
            },
            {
              "id": "id-4",
              "name": "petType",
              "type": "string",
              "value": "={{ $json.petType || $json['Pet Type'] }}"
            },
            {
              "id": "id-5",
              "name": "appointmentDate",
              "type": "string",
              "value": "={{ $json.appointmentDate || $json['Appointment Date'] }}"
            },
            {
              "id": "id-6",
              "name": "appointmentTime",
              "type": "string",
              "value": "={{ $json.appointmentTime || $json['Appointment Time'] }}"
            },
            {
              "id": "id-7",
              "name": "confirmed",
              "type": "string",
              "value": "={{ $json.confirmed || $json['Confirmed'] || 'No' }}"
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "0eb09452-aa1f-4664-8015-75e0c946ab36",
      "name": "Generate Personalized Reminder",
      "type": "@n8n/n8n-nodes-langchain.openAi",
      "position": [
        -3312,
        640
      ],
      "parameters": {
        "modelId": {
          "mode": "id",
          "value": "gpt-4o-mini"
        },
        "options": {},
        "responses": {
          "values": [
            {
              "content": "=Generate a friendly, personalized appointment reminder SMS for {{ $json.clientName }}. Their {{ $json.petType }} grooming appointment is tomorrow ({{ $json.appointmentDate }}) at {{ $json.appointmentTime }}. Keep it under 160 characters, warm and professional."
            }
          ]
        },
        "builtInTools": {}
      },
      "credentials": {
        "openAiApi": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 2.1
    },
    {
      "id": "e5a892d2-d8e6-4dd6-a4b8-c9acab0baf0f",
      "name": "Send SMS Reminder",
      "type": "n8n-nodes-base.twilio",
      "position": [
        -2960,
        640
      ],
      "parameters": {
        "to": "={{ $json.phone }}",
        "from": "<__PLACEHOLDER_VALUE__Twilio phone number__>",
        "message": "={{ $json.message }}",
        "options": {}
      },
      "typeVersion": 1
    },
    {
      "id": "981f2882-1a06-4b58-b6ec-82855552a0fe",
      "name": "Send Grooming Prep Instructions",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -2736,
        640
      ],
      "parameters": {
        "text": "=Hi {{ $json.clientName }},\n\nYour {{ $json.petType }} grooming appointment is tomorrow at {{ $json.appointmentTime }}!\n\nPrep Instructions:\n{{ $('Workflow Configuration').first().json.groomingInstructions }}\n\nSee you soon!\nYour Grooming Team",
        "options": {},
        "subject": "=Grooming Prep Instructions for {{ $json.petType }} - Tomorrow!",
        "toEmail": "={{ $json.email }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Your business email address__>",
        "emailFormat": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "2b4f8cc4-7077-4475-b8e4-260ba07527bc",
      "name": "Check Confirmation Status",
      "type": "n8n-nodes-base.if",
      "position": [
        -2512,
        640
      ],
      "parameters": {
        "options": {
          "ignoreCase": true
        },
        "conditions": {
          "options": {
            "leftValue": "",
            "caseSensitive": false,
            "typeValidation": "loose"
          },
          "combinator": "and",
          "conditions": [
            {
              "id": "id-1",
              "operator": {
                "type": "string",
                "operation": "equals"
              },
              "leftValue": "={{ $json.confirmed }}",
              "rightValue": "Yes"
            }
          ]
        }
      },
      "typeVersion": 2.3
    },
    {
      "id": "3821ec08-09f7-4be7-93a7-699c7ceb7691",
      "name": "Wait for Follow-up Time",
      "type": "n8n-nodes-base.wait",
      "position": [
        -2288,
        544
      ],
      "parameters": {
        "unit": "days",
        "amount": 1
      },
      "typeVersion": 1.1
    },
    {
      "id": "940c4830-88da-4dcb-abe8-5e0caee59f20",
      "name": "Send Thank You Message",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -2064,
        544
      ],
      "parameters": {
        "text": "=Hi {{ $json.clientName }},\n\nThank you for bringing {{ $json.petType }} to our grooming salon! We hope you loved the results.\n\nWe'd love to see you again soon. Book your next appointment anytime!\n\nBest regards,\nYour Grooming Team",
        "options": {},
        "subject": "Thank You for Visiting Us!",
        "toEmail": "={{ $json.email }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Your business email address__>",
        "emailFormat": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "1d3f56d8-5c2a-467a-8670-47c3d044308b",
      "name": "Send Reschedule Link",
      "type": "n8n-nodes-base.emailSend",
      "position": [
        -2064,
        736
      ],
      "parameters": {
        "text": "=Hi {{ $json.clientName }},\n\nWe noticed you weren't able to make your grooming appointment. No worries!\n\nReschedule anytime using this link:\n{{ $('Workflow Configuration').first().json.rescheduleUrl }}\n\nWe look forward to pampering {{ $json.petType }} soon!\n\nBest regards,\nYour Grooming Team",
        "options": {},
        "subject": "We Missed You - Reschedule Your Grooming Appointment",
        "toEmail": "={{ $json.email }}",
        "fromEmail": "<__PLACEHOLDER_VALUE__Your business email address__>",
        "emailFormat": "text"
      },
      "typeVersion": 2.1
    },
    {
      "id": "d6775eb1-ad86-4c60-b96d-f3c78ba8f0c6",
      "name": "Log Client Interactions",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        -1840,
        640
      ],
      "parameters": {
        "columns": {
          "value": {
            "email": "={{ $json.email }}",
            "phone": "={{ $json.phone }}",
            "petType": "={{ $json.petType }}",
            "timestamp": "={{ $now.toISO() }}",
            "clientName": "={{ $json.clientName }}",
            "appointmentDate": "={{ $json.appointmentDate }}",
            "interactionType": "Follow-up Sent"
          },
          "mappingMode": "autoMapInputData"
        },
        "options": {},
        "operation": "appendOrUpdate",
        "sheetName": {
          "__rl": true,
          "mode": "name",
          "value": "<__PLACEHOLDER_VALUE__Sheet name for logs (e.g., ClientInteractions)__>"
        },
        "documentId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Google Sheets Document ID for logging__>"
        }
      },
      "credentials": {
        "googleSheetsOAuth2Api": {
          "name": "<your credential>"
        }
      },
      "typeVersion": 4.7
    },
    {
      "id": "82eedc59-723e-4e45-902e-714b38f8c641",
      "name": "Notify Groomers of Daily Schedule",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1792,
        912
      ],
      "parameters": {
        "text": "=\ud83d\udcc5 *Daily Grooming Schedule*\n\nUpcoming appointments for {{ $json.appointmentDate }}:\n\n\u2022 {{ $json.appointmentTime }} - {{ $json.clientName }} ({{ $json.petType }})\n  Phone: {{ $json.phone }}\n  Status: {{ $json.confirmed === \"Yes\" ? \"\u2705 Confirmed\" : \"\u23f3 Pending\" }}",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "name",
          "value": "<__PLACEHOLDER_VALUE__Slack channel ID or name (e.g., #groomers)__>"
        },
        "otherOptions": {}
      },
      "typeVersion": 2.4
    },
    {
      "id": "b1ec86e8-ca39-4783-a1c2-dd56a57594fd",
      "name": "Compile Weekly Summary Data",
      "type": "n8n-nodes-base.merge",
      "position": [
        -1616,
        736
      ],
      "parameters": {
        "mode": "combine",
        "options": {},
        "combineBy": "combineByPosition"
      },
      "typeVersion": 3.2
    },
    {
      "id": "2bbab3d4-fbf1-45b9-acfa-3dacae33a952",
      "name": "Format Weekly Report",
      "type": "n8n-nodes-base.set",
      "position": [
        -1392,
        736
      ],
      "parameters": {
        "options": {},
        "assignments": {
          "assignments": [
            {
              "id": "id-1",
              "name": "reportTitle",
              "type": "string",
              "value": "Weekly Client Engagement Summary"
            },
            {
              "id": "id-2",
              "name": "reportDate",
              "type": "string",
              "value": "={{ $now.toFormat('yyyy-MM-dd') }}"
            },
            {
              "id": "id-3",
              "name": "totalInteractions",
              "type": "number",
              "value": "={{ $input.all().length }}"
            },
            {
              "id": "id-4",
              "name": "summary",
              "type": "string",
              "value": "=This week we had {{ $input.all().length }} client interactions including appointment reminders, confirmations, and follow-ups."
            }
          ]
        },
        "includeOtherFields": true
      },
      "typeVersion": 3.4
    },
    {
      "id": "e49eead5-4aa3-45e6-ab7e-b0b73d077e0a",
      "name": "Send Weekly Summary Report",
      "type": "n8n-nodes-base.slack",
      "position": [
        -1168,
        736
      ],
      "parameters": {
        "text": "=\ud83d\udcca *{{ $json.reportTitle }}*\n_{{ $json.reportDate }}_\n\n{{ $json.summary }}\n\nTotal Interactions: *{{ $json.totalInteractions }}*\n\nKeep up the great work! \ud83d\udc3e",
        "select": "channel",
        "channelId": {
          "__rl": true,
          "mode": "id",
          "value": "<__PLACEHOLDER_VALUE__Slack channel ID for reports (e.g., #management)__>"
        },
        "otherOptions": {}
      },
      "typeVersion": 2.4
    },
    {
      "id": "3e141dc2-643e-4011-9750-6875b4be806f",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4272,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 464,
        "height": 624,
        "content": "## Trigger & Config"
      },
      "typeVersion": 1
    },
    {
      "id": "b2d0d87b-2c91-482a-95c9-9eb4f1b66fdb",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3776,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 720,
        "height": 624,
        "content": "## Sheets & AI logic"
      },
      "typeVersion": 1
    },
    {
      "id": "e461b889-f7e8-4ada-a183-c8a97640f122",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -3024,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 1120,
        "height": 624,
        "content": "## Communication"
      },
      "typeVersion": 1
    },
    {
      "id": "5480ef86-fc3a-4f61-977a-a34a3961611f",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -1872,
        464
      ],
      "parameters": {
        "color": 7,
        "width": 880,
        "height": 624,
        "content": "## Log & Notify"
      },
      "typeVersion": 1
    },
    {
      "id": "df4ed6a0-b434-46f4-aaa9-3a41895d40e9",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -4656,
        480
      ],
      "parameters": {
        "width": 320,
        "height": 480,
        "content": "## Main\nAutomates pet grooming appointment reminders, personalized engagement, and team notifications. Clients are reminded, groomers are updated, and follow-ups are automated.\n\n## Setup\n1. Connect Google Sheets for appointment data.\n2. Add SMS and Email nodes for client communication.\n3. Connect Slack to notify groomers.\n4. Add OpenAI API key for personalized messages.\n5. Customize messages and instructions to match your brand.\nFor assistance, contact Hyrum Hurst at hyrum@quartersmart.com\n"
      },
      "typeVersion": 1
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "adb1e7be-b730-4fec-872c-6bf268c9ab4d",
  "connections": {
    "Send SMS Reminder": {
      "main": [
        [
          {
            "node": "Send Grooming Prep Instructions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Weekly Report": {
      "main": [
        [
          {
            "node": "Send Weekly Summary Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Reschedule Link": {
      "main": [
        [
          {
            "node": "Log Client Interactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Normalize Client Data": {
      "main": [
        [
          {
            "node": "Generate Personalized Reminder",
            "type": "main",
            "index": 0
          },
          {
            "node": "Notify Groomers of Daily Schedule",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Thank You Message": {
      "main": [
        [
          {
            "node": "Log Client Interactions",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Workflow Configuration": {
      "main": [
        [
          {
            "node": "Get Upcoming Appointments",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Daily Appointment Check": {
      "main": [
        [
          {
            "node": "Workflow Configuration",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Log Client Interactions": {
      "main": [
        [
          {
            "node": "Compile Weekly Summary Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Wait for Follow-up Time": {
      "main": [
        [
          {
            "node": "Send Thank You Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Confirmation Status": {
      "main": [
        [
          {
            "node": "Wait for Follow-up Time",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Reschedule Link",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get Upcoming Appointments": {
      "main": [
        [
          {
            "node": "Normalize Client Data",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Compile Weekly Summary Data": {
      "main": [
        [
          {
            "node": "Format Weekly Report",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Generate Personalized Reminder": {
      "main": [
        [
          {
            "node": "Send SMS Reminder",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Send Grooming Prep Instructions": {
      "main": [
        [
          {
            "node": "Check Confirmation Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Notify Groomers of Daily Schedule": {
      "main": [
        [
          {
            "node": "Compile Weekly Summary Data",
            "type": "main",
            "index": 1
          }
        ]
      ]
    }
  }
}