AutomationFlowsSlack & Telegram › Account Linking

Account Linking

Account Linking. Uses telegramTrigger, httpRequest, telegram. Event-driven trigger; 9 nodes.

Event trigger★★★★☆ complexity9 nodesTelegram TriggerHTTP RequestTelegram
Slack & Telegram Trigger: Event Nodes: 9 Complexity: ★★★★☆ Added:

This workflow follows the HTTP Request → Telegram 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
{
  "name": "Account Linking",
  "nodes": [
    {
      "parameters": {
        "updates": [
          "message"
        ],
        "additionalFields": {}
      },
      "id": "telegram-trigger",
      "name": "Telegram Trigger",
      "type": "n8n-nodes-base.telegramTrigger",
      "typeVersion": 1,
      "position": [
        240,
        300
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "start-command",
              "leftValue": "={{ $json.message.text }}",
              "rightValue": "/start",
              "operator": {
                "type": "string",
                "operation": "startsWith"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-start-command",
      "name": "Check Start Command",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        460,
        300
      ]
    },
    {
      "parameters": {
        "assignments": {
          "assignments": [
            {
              "id": "connection-code",
              "name": "connectionCode",
              "value": "={{ $json.message.text.split(' ')[1] || '' }}",
              "type": "string"
            },
            {
              "id": "chat-id",
              "name": "chatId",
              "value": "={{ $json.message.chat.id }}",
              "type": "string"
            },
            {
              "id": "username",
              "name": "username",
              "value": "={{ $json.message.from.username || '' }}",
              "type": "string"
            }
          ]
        },
        "options": {}
      },
      "id": "extract-connection-data",
      "name": "Extract Connection Data",
      "type": "n8n-nodes-base.set",
      "typeVersion": 3.3,
      "position": [
        680,
        200
      ]
    },
    {
      "parameters": {
        "conditions": {
          "options": {
            "caseSensitive": true,
            "leftValue": "",
            "typeValidation": "strict"
          },
          "conditions": [
            {
              "id": "has-connection-code",
              "leftValue": "={{ $json.connectionCode }}",
              "rightValue": "",
              "operator": {
                "type": "string",
                "operation": "notEqual"
              }
            }
          ],
          "combinator": "and"
        },
        "options": {}
      },
      "id": "check-connection-code",
      "name": "Check Connection Code",
      "type": "n8n-nodes-base.if",
      "typeVersion": 2,
      "position": [
        900,
        200
      ]
    },
    {
      "parameters": {
        "url": "={{ $env.APP_URL }}/api/telegram/link",
        "options": {
          "headers": {
            "Content-Type": "application/json"
          }
        },
        "sendBody": true,
        "bodyParameters": {
          "parameters": [
            {
              "name": "userId",
              "value": "={{ $json.connectionCode }}"
            },
            {
              "name": "chatId",
              "value": "={{ $json.chatId }}"
            },
            {
              "name": "username",
              "value": "={{ $json.username }}"
            }
          ]
        }
      },
      "id": "link-account",
      "name": "Link Account",
      "type": "n8n-nodes-base.httpRequest",
      "typeVersion": 4.2,
      "position": [
        1120,
        100
      ]
    },
    {
      "parameters": {
        "chatId": "={{ $json.chatId }}",
        "text": "\u2705 Account linked successfully!\n\nYou will now receive:\n\u2022 Booking notifications\n\u2022 Contact updates\n\u2022 Meeting reminders\n\nSend /help to see available commands.",
        "additionalFields": {}
      },
      "id": "send-success-message",
      "name": "Send Success Message",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1340,
        100
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $json.chatId }}",
        "text": "\u274c Failed to link account.\n\nPlease check your connection code and try again.\n\nTo get your connection code:\n1. Go to your SimpleSchedule account settings\n2. Look for the Telegram integration section\n3. Use the connection code shown there",
        "additionalFields": {}
      },
      "id": "send-error-message",
      "name": "Send Error Message",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1340,
        200
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $json.chatId }}",
        "text": "\ud83d\udd17 Welcome to SimpleSchedule Bot!\n\nTo link your account:\n1. Go to your SimpleSchedule account settings\n2. Find the Telegram integration section\n3. Copy your connection code\n4. Send: /start YOUR_CONNECTION_CODE\n\nExample: /start 12345",
        "additionalFields": {}
      },
      "id": "send-welcome-message",
      "name": "Send Welcome Message",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        1120,
        300
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    },
    {
      "parameters": {
        "chatId": "={{ $json.message.chat.id }}",
        "text": "\u2753 This bot is for SimpleSchedule users only.\n\nTo use this bot, you need a SimpleSchedule account.\n\nVisit https://your-app-url.com to sign up!",
        "additionalFields": {}
      },
      "id": "send-not-start-message",
      "name": "Send Not Start Message",
      "type": "n8n-nodes-base.telegram",
      "typeVersion": 1,
      "position": [
        680,
        400
      ],
      "credentials": {
        "telegramApi": {
          "name": "<your credential>"
        }
      }
    }
  ],
  "connections": {
    "Telegram Trigger": {
      "main": [
        [
          {
            "node": "Check Start Command",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Start Command": {
      "main": [
        [
          {
            "node": "Extract Connection Data",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Not Start Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Extract Connection Data": {
      "main": [
        [
          {
            "node": "Check Connection Code",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Check Connection Code": {
      "main": [
        [
          {
            "node": "Link Account",
            "type": "main",
            "index": 0
          }
        ],
        [
          {
            "node": "Send Welcome Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    },
    "Link Account": {
      "main": [
        [
          {
            "node": "Send Success Message",
            "type": "main",
            "index": 0
          },
          {
            "node": "Send Error Message",
            "type": "main",
            "index": 0
          }
        ]
      ]
    }
  },
  "settings": {
    "executionOrder": "v1"
  },
  "staticData": null,
  "tags": [],
  "triggerCount": 1,
  "updatedAt": "2024-01-15T10:00:00.000Z",
  "versionId": "1"
}

Credentials you'll need

Each integration node will prompt for credentials when you import. We strip credential IDs before publishing — you'll add your own.

Pro

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

About this workflow

Account Linking. Uses telegramTrigger, httpRequest, telegram. Event-driven trigger; 9 nodes.

Source: https://github.com/iamtij/simpleschedule/blob/0af40801e669d5f99aefe7989a50bd036acd35d2/n8n-workflows/account-linking.json — 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

N8N Complete Final. Uses telegramTrigger, dataTable, telegram, mqtt. Event-driven trigger; 58 nodes.

Telegram Trigger, Data Table, Telegram +3
Slack & Telegram

Pede Ai. Uses httpRequest, telegram, postgres, telegramTrigger. Event-driven trigger; 57 nodes.

HTTP Request, Telegram, Postgres +1
Slack & Telegram

TextMain. Uses telegramTrigger, stopAndError, telegram, httpRequest. Event-driven trigger; 56 nodes.

Telegram Trigger, Stop And Error, Telegram +2
Slack & Telegram

Pede Ai. Uses httpRequest, telegram, postgres, telegramTrigger. Event-driven trigger; 53 nodes.

HTTP Request, Telegram, Postgres +1
Slack & Telegram

📄 Documentation: Notion Guide

Telegram Trigger, @Blotato/N8N Nodes Blotato, Telegram +1