mtproto-devdace

Telegram MTPROTO API integration for n8n (devdace fork) - real-time new message listening from all chats

Package Information

Downloads: 1 weekly / 11 monthly
Latest Version: 0.1.0
Author: devdace

Documentation

n8n-nodes-mtproto-devdace

This is an n8n community node maintained by devdace that provides Telegram MTPROTO API integration for real-time message listening and automation workflows. The node extends the original veezex/n8n-nodes-telegram-mtproto project and focuses on stable delivery of all Telegram updates (personal chats, groups, supergroups, channels, bots) so you can build advanced workflows in n8n.

n8n is a fair-code licensed workflow automation platform.

Links

Installation

Follow the community nodes installation guide in the n8n docs.

Install from npm:

npm install n8n-nodes-mtproto-devdace

Quick Start

  1. Get your Telegram API credentials from https://my.telegram.org/apps
  2. Generate a session string using bun run test:connection (see Credentials)
  3. Create a Personal Telegram MTPROTO API credential in n8n (api_id, api_hash, phone number, session string)
  4. Add the Telegram MTPROTO Devdace Trigger node to your workflow
  5. Start the workflow and send a message from any chat (private/group/channel) — the trigger should emit the event in n8n immediately

Operations

Telegram MTPROTO Devdace Trigger

  • Listens for every new message the authenticated Telegram account can access (personal chats, groups, supergroups, channels, bots)
  • Emits raw message metadata plus convenience flags (isPrivate, isGroup, isChannel)
  • Does not apply built-in filters so you can decide how to branch logic in your workflow

Credentials

Prerequisites

Steps

  1. Visit https://my.telegram.org/apps and create/register an app
  2. Save your api_id and api_hash
  3. Run the session helper:
    bun install
    bun run test:connection
    
  4. Follow the CLI prompts (phone number, verification code, 2FA password if any)
  5. Copy the generated session string into the n8n credential

Creating the credential in n8n

  1. Go to Credentials → New → Personal Telegram MTPROTO API
  2. Fill api_id, api_hash, phoneNumber, sessionString
  3. Save — you’re ready to use the trigger

Build & Development

This project uses Bun for installs and scripts.

bun install
bun run dev      # watch mode
bun run build    # compile to dist/
bun run lint     # lint sources
bun run format   # prettier fix

Testing in n8n locally

  1. Build the node (bun run build)
  2. In your n8n instance, install the community node either from npm or via local files (Advanced → Community Nodes → Add)
  3. Configure the credential as described above
  4. Create a simple workflow: Telegram MTPROTO Devdace Trigger → Set → …
  5. Activate the workflow and send a message from another Telegram account to your main account (or in a group/channel)
  6. Verify the event payload inside n8n

Publishing to npm

  1. Update the version in package.json (e.g., 0.1.1)
  2. Run bun run build
  3. Login and publish:
    npm login
    npm publish --access public
    

Credits

  • Original MTProto node by veezex
  • Maintained & extended by devdace

Discussion