AutomationFlowsSlack & Telegram › Manage User Authentication with Telegram, Redis Cache and Google Sheets

Manage User Authentication with Telegram, Redis Cache and Google Sheets

ByArchit Jain @architjn on n8n.io

How It Works Telegram bot listens for messages and uses chat ID as the unique user identifier. Checks Google Sheets for existing users; registers new users if not found. Caches active sessions in Redis for fast lookup and login-state handling. Stores and retrieves user data…

Event trigger★★★★☆ complexity15 nodesTelegram TriggerGoogle SheetsRedisExecute Workflow Trigger
Slack & Telegram Trigger: Event Nodes: 15 Complexity: ★★★★☆ Added:

This workflow corresponds to n8n.io template #4548 — we link there as the canonical source.

This workflow follows the Execute Workflow Trigger → Google Sheets recipe pattern — see all workflows that pair these two integrations.

The workflow JSON

Copy or download the full n8n JSON below. Paste it into a new n8n workflow, add your credentials, activate. Full import guide →

Download .json
{
  "id": "wQIlBiGuRAehquVv",
  "meta": {
    "templateCredsSetupCompleted": true
  },
  "name": "Login System",
  "tags": [],
  "nodes": [
    {
      "id": "47ba2270-9e4d-4bf1-a3c5-c68e2e810065",
      "name": "Get Message",
      "type": "n8n-nodes-base.telegramTrigger",
      "position": [
        -160,
        800
      ],
      "parameters": {},
      "typeVersion": 1.2
    },
    {
      "id": "2ab85c19-5f38-49de-b6a6-316c621705f6",
      "name": "Find User",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        560,
        600
      ],
      "parameters": {},
      "typeVersion": 4.6,
      "alwaysOutputData": true
    },
    {
      "id": "3dcd8b09-cb74-439b-80aa-87c7994e65b1",
      "name": "Is New User",
      "type": "n8n-nodes-base.switch",
      "position": [
        760,
        600
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "9e20fe5b-c5e0-4b94-8262-01dd022ff0e7",
      "name": "Get UserId",
      "type": "n8n-nodes-base.code",
      "position": [
        920,
        780
      ],
      "parameters": {},
      "typeVersion": 2
    },
    {
      "id": "17f198c5-7a18-4661-b299-3cac28804b99",
      "name": "Create User",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        1120,
        780
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "ae42ce20-dd11-4ae3-8036-3d424cac004b",
      "name": "UserId",
      "type": "n8n-nodes-base.merge",
      "position": [
        1500,
        900
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "d70a4151-887d-475b-baeb-9588be242929",
      "name": "Find Cached User",
      "type": "n8n-nodes-base.redis",
      "position": [
        60,
        1040
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "c930bee8-2e8c-4eab-9a59-56ee1cb9349e",
      "name": "Is Cached",
      "type": "n8n-nodes-base.switch",
      "position": [
        280,
        1040
      ],
      "parameters": {},
      "typeVersion": 3.2
    },
    {
      "id": "4896c86b-42f8-4b18-899b-f4353ef397ac",
      "name": "Cache User",
      "type": "n8n-nodes-base.redis",
      "position": [
        1120,
        580
      ],
      "parameters": {},
      "typeVersion": 1
    },
    {
      "id": "07465c66-6b72-4870-b02d-156e32f551ab",
      "name": "Sticky Note",
      "type": "n8n-nodes-base.stickyNote",
      "position": [
        -320,
        420
      ],
      "parameters": {
        "content": ""
      },
      "typeVersion": 1
    },
    {
      "id": "715e7922-e3fc-40cb-8a00-207c2ac08861",
      "name": "When Executed by Another Workflow",
      "type": "n8n-nodes-base.executeWorkflowTrigger",
      "position": [
        -160,
        600
      ],
      "parameters": {},
      "typeVersion": 1.1
    },
    {
      "id": "5de97977-1128-42f7-9b96-075dd9662e1e",
      "name": "Merge",
      "type": "n8n-nodes-base.merge",
      "position": [
        -160,
        1040
      ],
      "parameters": {},
      "typeVersion": 3.1
    },
    {
      "id": "5e68c21d-51f2-4a61-803b-5aff05007d3c",
      "name": "Get User",
      "type": "n8n-nodes-base.googleSheets",
      "position": [
        60,
        600
      ],
      "parameters": {},
      "typeVersion": 4.6
    },
    {
      "id": "da473a91-2c5b-4d6d-b850-4c35a1426625",
      "name": "Edit Fields",
      "type": "n8n-nodes-base.set",
      "position": [
        60,
        800
      ],
      "parameters": {},
      "typeVersion": 3.4
    },
    {
      "id": "642b0052-8987-4c09-b926-5382e37ddc02",
      "name": "Edit Fields2",
      "type": "n8n-nodes-base.set",
      "position": [
        320,
        600
      ],
      "parameters": {},
      "typeVersion": 3.4
    }
  ],
  "active": false,
  "settings": {
    "executionOrder": "v1"
  },
  "versionId": "c91fe9b2-0dd1-4aeb-a3d5-37e962b09495",
  "connections": {
    "Merge": {
      "main": [
        [
          {
            "node": "Find Cached User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "UserId": {
      "main": [
        []
      ]
    },
    "Get User": {
      "main": [
        [
          {
            "node": "Edit Fields2",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find User": {
      "main": [
        [
          {
            "node": "Is New User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is Cached": {
      "main": [
        [
          {
            "node": "Find User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "UserId",
            "type": "main",
            "index": 2
          }
        ]
      ]
    },
    "Cache User": {
      "main": [
        [
          {
            "node": "UserId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Get UserId": {
      "main": [
        [
          {
            "node": "Create User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Create User": {
      "main": [
        [
          {
            "node": "UserId",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Edit Fields": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 1
          }
        ]
      ]
    },
    "Get Message": {
      "main": [
        [
          {
            "node": "Edit Fields",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Is New User": {
      "main": [
        [
          {
            "node": "Cache User",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Get UserId",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Edit Fields2": {
      "main": [
        [
          {
            "node": "Merge",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Find Cached User": {
      "main": [
        [
          {
            "node": "Is Cached",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "When Executed by Another Workflow": {
      "main": [
        [
          {
            "node": "Get User",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  }
}
Pro

For the full experience including quality scoring and batch install features for each workflow upgrade to Pro

About this workflow

How It Works Telegram bot listens for messages and uses chat ID as the unique user identifier. Checks Google Sheets for existing users; registers new users if not found. Caches active sessions in Redis for fast lookup and login-state handling. Stores and retrieves user data…

Source: https://n8n.io/workflows/4548/ — original creator credit. Request a take-down →

More Slack & Telegram workflows → · Browse all categories →

Related workflows

Workflows that share integrations, category, or trigger type with this one. All free to copy and import.

Slack & Telegram

This workflow provides a complete solution for handling Telegram Stars payments, invoicing and refunds using n8n. It automates the process of sending invoices, managing pre-checkout approvals, recordi

HTTP Request, Execute Workflow Trigger, Google Sheets +2
Slack & Telegram

Telegram Wait. Uses stickyNote, httpRequest, redis, noOp. Event-driven trigger; 36 nodes.

HTTP Request, Redis, Telegram +1
Slack & Telegram

clients kept booking meetings during my prayer times. i'd either miss a prayer or scramble to reschedule. the problem wasn't the clients — it was that my calendar had no blocked windows for salah. i n

Telegram Trigger, HTTP Request, Google Calendar +3
Slack & Telegram

This workflow is a powerful reputation management tool designed to proactively filter customer reviews. It helps you encourage positive reviews on Google while capturing negative feedback privately be

Telegram Trigger, Google Sheets, Telegram
Slack & Telegram

This workflow is designed to automate your e-commerce order processing by instantly syncing new Jotform submissions with your internal systems and immediately notifying the customer on Telegram.

Jot Form Trigger, Telegram, Data Table +3