New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

n8n-tg-trigger

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

n8n-tg-trigger

Telegram chat listener that triggers n8n webhooks

latest
Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

n8n-tg-trigger

Telegram chat listener that triggers n8n webhooks using tg-lisa.

Installation

npm install n8n-tg-trigger

Usage

CLI

npx n8n-tg-trigger --config config.json

Programmatic

import { N8nTgTrigger } from 'n8n-tg-trigger';

const trigger = new N8nTgTrigger({
  api_id: 123456,
  api_hash: 'your_api_hash',
  sessionFilePath: './telegram-session.txt', // optional, defaults to './telegram-session.txt'
  chatIds: ['111111', '222222'],
  webhookUrl: 'https://your-n8n-instance.com/webhook/telegram'
});

await trigger.start();

// Stop listening
await trigger.stop();

Configuration

Create a config.json file:

{
  "api_id": 123456,
  "api_hash": "your_telegram_api_hash",
  "sessionFilePath": "./telegram-session.txt",
  "chatIds": ["111111", "222222"],
  "webhookUrl": "https://your-n8n-instance.com/webhook/telegram"
}

Parameters

  • api_id (required): Telegram API ID from https://my.telegram.org
  • api_hash (required): Telegram API hash from https://my.telegram.org
  • sessionFilePath (optional): Path to session file. Default: ./telegram-session.txt
  • chatIds (required): Array of chat IDs (as strings) to monitor
  • webhookUrl (required): n8n webhook URL

Webhook Payload

Messages are sent to the webhook with the following structure:

{
  "message": {
    "chatId": "111111",
    "text": "Message text"
  }
}

Development

npm install
npm run build
npm test

License

MIT

Keywords

telegram

FAQs

Package last updated on 22 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts