Telegram Bot Employee Attendance and Google Sheets Tracker - n8n Workflow

Use this comprehensive n8n workflow to track employee attendance (Check-In/Out) via a Telegram bot, storing all data securely in Google Sheets. Includes duplicate prevention and employee validation.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Companies needing a simple, decentralized attendance tracking system.

  • HR staff looking to automate time logging and reporting.

  • n8n users seeking robust n8n templates integrating chat bots and cloud storage.

  • Technical teams requiring an attendance solution without dedicated software.

Overview

Managing employee attendance can be streamlined significantly using chat interfaces. This n8n workflow provides a robust solution by leveraging a Telegram bot as the primary interface and Google Sheets as the secure, easily accessible database. This specific n8n workflow is designed to handle key requirements like employee validation (ensuring only registered users can submit entries) and crucial duplicate prevention (stopping a user from checking in twice on the same day).

The automation starts with an n8n trigger listening for user input on Telegram. It intelligently branches the flow based on whether the user requests to view their status or log a time event. By using a Google Sheets n8n node to cross-reference employee data and log new entries, this n8n automation eliminates manual data entry and ensures accurate, real-time reporting.

How it Works

The entire process is initiated by the Telegram Trigger n8n node, which listens for user input, typically /start or /menu.


  1. Menu Display: If the Telegram message matches /start or /menu, an IF n8n node directs the flow to send the main menu via Telegram, offering options to log attendance or check status.

  2. Checking Status: If the user selects 'Today’s Attendance Status', the workflow uses a Google Sheets n8n node (Sheets Read (employee)) to verify the user’s Telegram username against the Employee sheet. If validated, it reads today's records from the Attendance sheet.

  3. Status Formatting: An Aggregate n8n node collects the data, and a Function Item n8n node (Format Attendance Status) analyzes the collected records to determine if Check-In and Check-Out were completed, then replies with the daily status.

  4. Logging Attendance: If the user selects 'Check In' or 'Check Out', the workflow follows a similar verification path (Sheets Read (employee)1).

  5. Duplicate Prevention: Before logging, the Sheets Read (duplicate attendance) n8n node checks the Google Sheet for an existing entry (e.g., if a 'checkin' record already exists today). The subsequent IF n8n node (IF duplicate attendance) blocks the submission if a duplicate is found, replying with a warning.

  6. Record and Confirm: If no duplicate is detected, the Sheets Append (Attendance) n8n node writes a new row containing the timestamp, attendance type (checkin/checkout), and employee details to the Google Sheet. The final n8n node replies via Telegram, confirming the successful recording.

Installation Guide

To deploy this powerful n8n workflow, follow these steps:


  1. Import the n8n Workflow: Download the JSON and import it directly into your n8n instance.

  2. Google Sheets Setup: You must have two sheets: one named 'Employee' (for validation, containing username_telegram) and one named 'Attendance' (for logging). Update the Google Sheets n8n node configurations to point to your specific spreadsheet ID.

  3. Google Sheets Credentials: Create or select an existing Google Sheets OAuth2 API credential in n8n, ensuring it has read/write access to your chosen spreadsheet.

  4. Telegram Bot Setup: Create a new bot using BotFather in Telegram, obtain the API token, and set up your Telegram API credentials within n8n. These credentials will be used by the Telegram Trigger n8n node and all subsequent Telegram messaging nodes.

  5. Activation: Ensure the n8n trigger is active and save the workflow. Test the process by typing /start in your new Telegram bot.

Node Details

This n8n workflow relies on several key n8n nodes for logic and integration:

Telegram Trigger: The starting n8n trigger, configured to listen for message and callbackquery events, allowing it to respond both to direct commands and button clicks.
Google Sheets (Read/Append): Multiple Google Sheets n8n node instances are used. They are crucial for reading employee validation data and attendance history, as well as appending new time logs. Key configuration involves filtering by username
telegram and date.
IF (n8n node): Heavily utilized throughout the n8n workflow for conditional routing, checking for menu commands (/start), validating employee existence (IF employee), and performing the vital check for duplicate attendance records (IF duplicate attendance).
Function Item: The Format Attendance Status n8n node contains custom JavaScript logic to process the raw attendance data read from Google Sheets and generate a clean, readable summary message for the user.


  • Telegram (Send Message): These n8n nodes are used for user interaction, sending the main menu, the check-in/out options (using inline keyboards), sending confirmation messages, and delivering error/warning replies.

Related n8n Workflows

Free

Nodes: 7 Nodes
Updated: December 26 2025
View all
Created by

Hi, I’m Singgi 👋 A developer who loves creating smart automations with n8n. I build workflows for Telegram/WhatsApp bots, Google Sheets, and APIs to make life easier.

Featured*