{
  "name": "Birthday Greetings",
  "nodes": [
    {
      "parameters": {
        "rule": {
          "interval": [
            {
              "triggerAtHour": 8
            }
          ]
        }
      },
      "id": "1e44421f-d801-4219-8fb0-dea0298d3fe7",
      "name": "Every Morning",
      "type": "n8n-nodes-base.scheduleTrigger",
      "typeVersion": 1.3,
      "position": [
        0,
        0
      ]
    },
    {
      "parameters": {
        "operation": "getAll",
        "calendar": {
          "__rl": true,
          "value": "shrijjs@gmail.com",
          "mode": "list",
          "cachedResultName": "shrijjs@gmail.com"
        },
        "returnAll": true,
        "timeMin": "={{ $now.startOf(\"day\").toISO() }}",
        "timeMax": "={{ $now.endOf(\"day\").toISO() }}",
        "options": {
          "orderBy": "startTime",
          "recurringEventHandling": "expand"
        }
      },
      "id": "5c413849-66ac-419b-9c2b-5ddd0b5b0160",
      "name": "Get many events",
      "type": "n8n-nodes-base.googleCalendar",
      "typeVersion": 1.3,
      "position": [
        224,
        0
      ],
      "credentials": {
        "googleCalendarOAuth2Api": {
          "id": "owyyJxAWdIUuQAnK",
          "name": "Google Calendar account"
        }
      }
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "8435a65e-17ff-403d-a490-716ebcf83382",
              "name": "personName",
              "value": "={{ $json.summary.replace(\"'s Birthday\", \"\").replace(\" Birthday\", \"\").trim() }}",
              "type": "string"
            },
            {
              "id": "a6954b0c-45f7-4a77-9045-e74b5a891589",
              "name": "greetingMessage",
              "value": "=🎉 Happy Birthday {{ $json.summary.replace(\"'s Birthday\", \"\").replace(\" Birthday\", \"\").trim() }}! 🎂 Wishing you a wonderful day full of joy and love from all of us! 🥳",
              "type": "string"
            },
            {
              "id": "c3d1e2f4-5a6b-4c7d-8e9f-0a1b2c3d4e5f",
              "name": "chatId",
              "value": "={{ ($json.description || \"\").match(/-?\\d+/) ? ($json.description || \"\").match(/-?\\d+/)[0] : \"\" }}",
              "type": "string"
            },
            {
              "id": "5dcfe75b-ea6f-4111-a2c3-d9bb665f9f3a",
              "name": "emailid",
              "value": "={{ ($json.description || \"\").match(/-?\\d+/) ? ($json.description || \"\").match(/-?\\d+/)[1] : \"\" }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "175c1c4d-822a-4251-9e31-f498857fd069",
      "name": "Content Format",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.5,
      "position": [
        448,
        0
      ]
    },
    {
      "parameters": {
        "chatId": "=-5340943325",
        "text": "={{ $json.greetingMessage }}",
        "additionalFields": {
          "appendAttribution": false
        }
      },
      "id": "498de0c9-0b44-42b2-b966-54bf9cf48491",
      "name": "Send a text message",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1.2,
      "position": [
        672,
        0
      ],
      "webhookId": "9e6f8fa4-ed9c-4a25-9b86-6bfc224c2c9e",
      "credentials": {
        "telegramApi": {
          "id": "sXTETXWOl3iWTyMP",
          "name": "Telegram account"
        }
      }
    },
    {
      "parameters": {
        "fromEmail": "shrijjs@gmail.com",
        "toEmail": "deepamofficial@gmail.com",
        "subject": "Birthday Wishes",
        "html": "=<!DOCTYPE html>\n<html>\n<head>\n<meta charset=\"UTF-8\">\n<title>Happy Birthday</title>\n</head>\n\n<body style=\"margin:0;padding:0;background:#f4f7fb;font-family:Arial,Helvetica,sans-serif;\">\n\n<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#f4f7fb;padding:30px 0;\">\n<tr>\n<td align=\"center\">\n\n<table width=\"600\" cellpadding=\"0\" cellspacing=\"0\" style=\"background:#ffffff;border-radius:18px;overflow:hidden;box-shadow:0 10px 25px rgba(0,0,0,.1);\">\n\n    <!-- Header -->\n    <tr>\n        <td align=\"center\"\n            style=\"background:linear-gradient(135deg,#ff6b6b,#ff9f43,#feca57,#48dbfb,#5f27cd);\n                   padding:35px;color:white;\">\n            <h1 style=\"margin:0;font-size:42px;\">🎉 Happy Birthday! 🎂</h1>\n            <p style=\"margin-top:12px;font-size:20px;\">\n                Wishing you a day filled with happiness and smiles!\n            </p>\n        </td>\n    </tr>\n\n    <!-- Cake -->\n    <tr>\n        <td align=\"center\" style=\"padding:30px 20px 10px;\">\n            <div style=\"font-size:80px;\">🎂</div>\n\n            <h2 style=\"color:#ff4081;font-size:34px;margin:15px 0;\">\n                Dear {{ $json.personName }},\n            </h2>\n\n            <p style=\"font-size:18px;color:#555;line-height:30px;padding:0 35px;\">\n                On your special day, we wish you abundant joy, good health,\n                success, and unforgettable moments.\n                <br><br>\n                May this year bring exciting opportunities,\n                wonderful memories, and endless reasons to smile.\n            </p>\n        </td>\n    </tr>\n\n    <!-- Wishes -->\n    <tr>\n        <td align=\"center\" style=\"padding:10px 30px;\">\n            <table cellpadding=\"12\" cellspacing=\"0\" width=\"100%\">\n                <tr>\n                    <td align=\"center\"\n                        style=\"background:#fff7e6;border-radius:12px;font-size:17px;color:#444;\">\n                        🎈 Happiness\n                    </td>\n                    <td width=\"10\"></td>\n                    <td align=\"center\"\n                        style=\"background:#e8fff4;border-radius:12px;font-size:17px;color:#444;\">\n                        💼 Success\n                    </td>\n                </tr>\n\n                <tr><td height=\"10\"></td></tr>\n\n                <tr>\n                    <td align=\"center\"\n                        style=\"background:#eef4ff;border-radius:12px;font-size:17px;color:#444;\">\n                        ❤️ Good Health\n                    </td>\n                    <td></td>\n                    <td align=\"center\"\n                        style=\"background:#fff0f7;border-radius:12px;font-size:17px;color:#444;\">\n                        🌟 Great Memories\n                    </td>\n                </tr>\n            </table>\n        </td>\n    </tr>\n\n    <!-- Quote -->\n    <tr>\n        <td align=\"center\" style=\"padding:35px;\">\n            <div style=\"background:#f8f9ff;\n                        border-left:6px solid #ff4081;\n                        padding:20px;\n                        border-radius:12px;\n                        color:#555;\n                        font-size:18px;\n                        line-height:30px;\">\n                ✨ <strong>\"Celebrate today, embrace tomorrow, and keep shining every day!\"</strong>\n            </div>\n        </td>\n    </tr>\n\n    <!-- Button -->\n    <tr>\n        <td align=\"center\" style=\"padding-bottom:35px;\">\n            <a href=\"#\"\n               style=\"background:#ff4081;\n                      color:white;\n                      text-decoration:none;\n                      padding:15px 35px;\n                      border-radius:40px;\n                      font-size:18px;\n                      display:inline-block;\n                      font-weight:bold;\">\n                🎁 Best Wishes\n            </a>\n        </td>\n    </tr>\n\n    <!-- Footer -->\n    <tr>\n        <td align=\"center\"\n            style=\"background:#2d3436;color:#cccccc;padding:25px;font-size:14px;\">\n           \n\n            Wishing you happiness, success and a fantastic year ahead!\n\n            <br>\n        </td>\n    </tr>\n\n</table>\n\n</td>\n</tr>\n</table>\n\n</body>\n</html>",
        "options": {}
      },
      "type": "n8n-nodes-base.emailSend",
      "typeVersion": 2.1,
      "position": [
        672,
        -144
      ],
      "id": "7a0c20c2-1a9f-4776-91b1-048dba58dc60",
      "name": "Send an Email",
      "webhookId": "e34c6b2e-9881-4079-afa0-78917b649884",
      "credentials": {
        "smtp": {
          "id": "GxYswwuZ6Ru2njyU",
          "name": "SMTP account"
        }
      }
    }
  ],
  "pinData": {},
  "connections": {
    "Every Morning": {
      "main": [
        [
          {
            "node": "Get many events",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get many events": {
      "main": [
        [
          {
            "node": "Content Format",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Content Format": {
      "main": [
        [
          {
            "node": "Send a text message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send an Email",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "active": false,
  "settings": {
    "executionOrder": "v1",
    "binaryMode": "separate",
    "availableInMCP": false
  },
  "versionId": "5b97e8ca-ae92-4fc9-baaf-257523e8406e",
  "meta": {
    "templateCredsSetupCompleted": true,
    "instanceId": "f64bcab73ccbb78b09abbd6ab945d09a143ba5e0140f370355e029f922e95f41"
  },
  "nodeGroups": [],
  "id": "YyuiwObGNY5dqU6H",
  "tags": []
}