{
  "name": "Employee attendance tracker with Telegram Bot and Google Sheets",
  "nodes": [
    {
      "id": "c4893eb0-6cfc-436a-9ebe-9871b0eceeae",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -128,
        128
      ]
    },
    {
      "id": "7ec13d8c-2d87-43a2-b38a-9e0a899bb3d0",
      "name": "IF /start|/menu",
      "type": "n8n-nodes-base.if",
      "position": [
        144,
        -384
      ]
    },
    {
      "id": "85592562-59b7-4149-a61a-8a1d00ad78a6",
      "name": "Send Main Menu",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        -400
      ]
    },
    {
      "id": "e8fe7ee3-59fd-4e6d-aa6a-19c90a43142c",
      "name": "IF callback_query",
      "type": "n8n-nodes-base.if",
      "position": [
        80,
        848
      ]
    },
    {
      "id": "a85632f1-2460-45fd-9c0f-332b5097b156",
      "name": "Aggregate",
      "type": "n8n-nodes-base.aggregate",
      "position": [
        1088,
        208
      ]
    },
    {
      "id": "a6d12c8c-a3b9-488b-bc92-0e925c8a8ed5",
      "name": "IF menu_attendance",
      "type": "n8n-nodes-base.if",
      "position": [
        128,
        -112
      ]
    },
    {
      "id": "adc378a0-64a8-4d86-ba95-b18c99db8144",
      "name": "Send Check In/Out Menu",
      "type": "n8n-nodes-base.telegram",
      "position": [
        352,
        -128
      ]
    },
    {
      "id": "b775ffdd-9744-46f3-8d10-c99937521f06",
      "name": "Sheets Read (employee)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        320,
        288
      ]
    },
    {
      "id": "d6172ee4-97c9-4ae7-8ae3-1883c333e6d9",
      "name": "Sheets Read (Attendance Status)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        784,
        208
      ]
    },
    {
      "id": "af846aa9-25e6-4dc1-86d9-c00686aae0f5",
      "name": "IF employee",
      "type": "n8n-nodes-base.if",
      "position": [
        608,
        288
      ]
    },
    {
      "id": "722b1cc7-847c-4fb2-b4ec-a4efa82f0fd6",
      "name": "Reply Attendance Status",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1520,
        208
      ]
    },
    {
      "id": "a69a67a0-95bd-4005-b290-4c88c022774d",
      "name": "Format Attendance Status",
      "type": "n8n-nodes-base.functionItem",
      "position": [
        1312,
        208
      ]
    },
    {
      "id": "0cfd3a1f-8f72-4b37-a5ae-df98a4b4a540",
      "name": "Reply Not Employee",
      "type": "n8n-nodes-base.telegram",
      "position": [
        784,
        400
      ]
    },
    {
      "id": "a390650a-8251-4080-a4a8-5cc5c0ea2b3f",
      "name": "Reply Not Employee1",
      "type": "n8n-nodes-base.telegram",
      "position": [
        784,
        928
      ]
    },
    {
      "id": "6fe62d75-f959-43ef-a399-1c47311fbe3c",
      "name": "Sheets Read (duplicate attendance)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        784,
        752
      ]
    },
    {
      "id": "df79d542-38c1-46a5-b059-13082dabd1d7",
      "name": "IF duplicate attendance",
      "type": "n8n-nodes-base.if",
      "position": [
        1120,
        752
      ]
    },
    {
      "id": "e56e30a9-6a67-4b5a-898f-240b228fc5ac",
      "name": "Reply Duplicate Attendance",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1360,
        672
      ]
    },
    {
      "id": "2b497016-397c-48e3-a4a6-d2d1d5a05c9d",
      "name": "Reply Attendance OK",
      "type": "n8n-nodes-base.telegram",
      "position": [
        1568,
        848
      ]
    },
    {
      "id": "4f89f750-4c38-4da6-b228-c737eabf1bb7",
      "name": "Sheets Read (employee)1",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        320,
        832
      ]
    },
    {
      "id": "0d3cd98d-fb7e-4fe5-9d78-1136fd6aca9b",
      "name": "IF menu_attendance_status",
      "type": "n8n-nodes-base.if",
      "position": [
        96,
        304
      ]
    },
    {
      "id": "814855bc-59d0-4313-b3fe-a5e43c44ab8d",
      "name": "IF Employee",
      "type": "n8n-nodes-base.if",
      "position": [
        560,
        832
      ]
    },
    {
      "id": "6f762fa7-4aaf-4a98-83c8-e125bea57716",
      "name": "Sheets Append (Attendance)",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1344,
        848
      ]
    },
    {
      "id": "fceace8c-057d-4e49-b48b-83924e8beed0",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -960,
        -320
      ],
      "parameters": {
        "width": 672,
        "height": 1856,
        "content": "# Attendance Telegram App with Google Sheets\n\nManage employee attendance directly through **Telegram** with seamless **Google Sheets** integration.  \nEmployees can check in, check out, and view their "
      }
    },
    {
      "id": "4f6c09c6-25de-4095-9c2f-20d11395c34a",
      "name": "Sticky Note1",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -480
      ],
      "parameters": {
        "width": 432,
        "height": 240,
        "content": "## Send Menu Button"
      }
    },
    {
      "id": "8917f9a0-180c-4ca5-aa44-1e665388aa06",
      "name": "Sticky Note2",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        96,
        -192
      ],
      "parameters": {
        "width": 432,
        "height": 224,
        "content": "## Send Check In/Out Button"
      }
    },
    {
      "id": "f294e910-e5fd-4771-8ea5-8101db950346",
      "name": "Sticky Note3",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        80,
        224
      ],
      "parameters": {
        "width": 416,
        "height": 272,
        "content": "## Check Today’s Attendance Status"
      }
    },
    {
      "id": "c88b7d72-cf69-4ade-ae5c-575ea1ce0525",
      "name": "Sticky Note4",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        48,
        736
      ],
      "parameters": {
        "width": 432,
        "height": 320,
        "content": "## Check In/Out"
      }
    },
    {
      "id": "c074958e-4acd-4d08-a5b6-8a1d939a9e95",
      "name": "Sticky Note5",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        656
      ],
      "parameters": {
        "width": 496,
        "height": 480,
        "content": "## Verify Employee"
      }
    },
    {
      "id": "eab6e6aa-3392-40d5-aafe-05ac4b751844",
      "name": "Sticky Note6",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        528,
        128
      ],
      "parameters": {
        "width": 496,
        "height": 480,
        "content": "## Verify Employee"
      }
    },
    {
      "id": "adac4563-c652-4e0b-9ab8-148d3c302b67",
      "name": "Sticky Note7",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        528
      ],
      "parameters": {
        "width": 656,
        "height": 528,
        "content": "## Check for Duplicate Attendance\n✅ If TRUE → Reply via Telegram: “Your check-in/check-out has already been recorded ⚠️”\n\n❌ If FALSE → Append a new row into the Attendance sheet, then reply via Telegr"
      }
    },
    {
      "id": "e0330191-b7ac-44d0-9ad3-ee5655873324",
      "name": "Sticky Note8",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        1072,
        64
      ],
      "parameters": {
        "width": 672,
        "height": 432,
        "content": "## Format & Send Today's Attendance Status"
      }
    }
  ],
  "connections": {
    "Aggregate": {
      "main": [
        [
          {
            "node": "Format Attendance Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF Employee": {
      "main": [
        [
          {
            "node": "Sheets Read (duplicate attendance)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply Not Employee1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF employee": {
      "main": [
        [
          {
            "node": "Sheets Read (Attendance Status)",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Reply Not Employee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF /start|/menu": {
      "main": [
        [
          {
            "node": "Send Main Menu",
            "type": "main",
            "index": 0
          }
        ],
        []
      ]
    },
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "IF /start|/menu",
            "type": "main",
            "index": 0
          },
          {
            "node": "IF menu_attendance",
            "type": "main",
            "index": 0
          },
          {
            "node": "IF menu_attendance_status",
            "type": "main",
            "index": 0
          },
          {
            "node": "IF callback_query",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF callback_query": {
      "main": [
        [
          {
            "node": "Sheets Read (employee)1",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF menu_attendance": {
      "main": [
        [
          {
            "node": "Send Check In/Out Menu",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Read (employee)": {
      "main": [
        [
          {
            "node": "IF employee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF duplicate attendance": {
      "main": [
        [
          {
            "node": "Reply Duplicate Attendance",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Sheets Append (Attendance)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Read (employee)1": {
      "main": [
        [
          {
            "node": "IF Employee",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Format Attendance Status": {
      "main": [
        [
          {
            "node": "Reply Attendance Status",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "IF menu_attendance_status": {
      "main": [
        [
          {
            "node": "Sheets Read (employee)",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Append (Attendance)": {
      "main": [
        [
          {
            "node": "Reply Attendance OK",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Read (Attendance Status)": {
      "main": [
        [
          {
            "node": "Aggregate",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Sheets Read (duplicate attendance)": {
      "main": [
        [
          {
            "node": "IF duplicate attendance",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}