{
  "name": "Patient Appointment Reminder Emails",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {}
          ]
        }
      },
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.2,
      "position": [
        -420,
        -20
      ],
      "id": "3c4fa29e-8c34-47a4-964a-757fbf4aae14",
      "name": "Schedule Trigger"
    },
    {
      "parameters": {
        "documentId": {
          "__rl": true,
          "value": "16DlLIKvEVmvTMUNCjIMzk6i8mcXvpXj7mxDHY5h77KM",
          "mode": "list",
          "cachedResultName": "appointment"
        },
        "sheetName": {
          "__rl": true,
          "value": "gid=0",
          "mode": "list",
          "cachedResultName": "Sheet1"
        },
        "filtersUI": {
          "values": [
            {
              "lookupColumn": "Appointment Date",
              "lookupValue": "={{ $now.toFormat(\"MM/dd/yyyy\") }}"
            }
          ]
        },
        "options": {}
      },
      "type": "n8n-nodes-base.googleSheets",
      "typeVersion": 4.5,
      "position": [
        -240,
        -20
      ],
      "id": "294a6b28-aad4-4914-bc53-8fd8efcdfaf8",
      "name": "Google Sheets",
      "credentials": {
        "googleSheetsOAuth2Api": {
          "id": "WcsdgqDUWiZopRun",
          "name": "Google Sheets account"
        }
      }
    },
    {
      "parameters": {
        "sendTo": "={{ $json.email }}",
        "subject": "Reminder: your appointment today",
        "emailType": "text",
        "message": "=Hi {{ $json.Name || 'there' }},\n\nThis is a friendly reminder of your appointment today ({{ $json['Appointment Date'] }}){{ $json['Appointment Time'] ? ' at ' + $json['Appointment Time'] : '' }}.\n\nPlease arrive 10 minutes early. If you need to reschedule, simply reply to this email.\n\nSee you soon,\nForgent Systems\n",
        "options": {
          "appendAttribution": false
        }
      },
      "type": "n8n-nodes-base.gmail",
      "typeVersion": 2.1,
      "position": [
        -80,
        -20
      ],
      "id": "696dc752-39ca-44e3-9fc2-fe27871d255e",
      "name": "Gmail",
      "webhookId": "e7d92286-5f81-42a3-a6d7-6d3335fc7376",
      "credentials": {
        "gmailOAuth2": {
          "id": "GXe14RV89PrT2yZB",
          "name": "Gmail account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Schedule Trigger": {
      "main": [
        [
          {
            "node": "Google Sheets",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Google Sheets": {
      "main": [
        [
          {
            "node": "Gmail",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "17d4df0c-6caf-43b9-8928-d3590e5d3f5c",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f1c26778ec36097a9722a22c47c5e9c01f00b8862dadd0121ec118026a370fa6"
  },
  "id": "8gpfw93PGxQvIOvi"
}