n8n-nodes-telegram-client
v0.1.7
Published
n8n node for Telegram Client API with full user capabilities
Downloads
2,030
Readme
n8n-nodes-telegram-client
This is a comprehensive Telegram Client node for n8n that allows you to interact with Telegram as a regular user (not a bot). It provides access to advanced Telegram features that are not available through the regular bot API.
Features
- 🔐 Full user authentication support
- 📝 Complete message operations (send, edit, delete, pin)
- 📸 Media handling (photos, videos, documents)
- 👥 Chat management (join, leave, history)
- 💾 Session management for persistent authentication
- ⚡ Real-time updates and notifications
- 🔒 Secure credential storage
Installation
In n8n:
- Go to Settings > Community Nodes
- Click on Install a node from NPM
- Enter
n8n-nodes-telegram-client
- Click Install
Manual Installation:
npm install n8n-nodes-telegram-client
Configuration
Prerequisites
- Go to my.telegram.org
- Log in and create an application
- Note down your
api_id
andapi_hash
In n8n:
- Go to Credentials
- Click Create New Credentials
- Select Telegram Client API
- Fill in:
- API ID (from my.telegram.org)
- API Hash (from my.telegram.org)
- Phone Number (international format)
- 2FA Password (if enabled)
First Use
- When using the node for the first time, you'll be prompted for a verification code
- Enter the code sent to your Telegram account
- The session will be saved for future use
Usage
Available Operations
Message Operations
sendMessage
: Send text messagesreplyToMessage
: Reply to existing messageseditMessage
: Edit sent messagesdeleteMessages
: Delete messagesforwardMessages
: Forward messagespinMessage
: Pin messages in chats
Media Operations
sendMedia
: Send photos, videos, or documentssendAlbum
: Send multiple media files as an albumdownloadMedia
: Download media from messages
Chat Operations
getChatHistory
: Get chat message historyjoinChat
: Join channels or groupsleaveChat
: Leave channels or groups
Example Usage
Send Message
{
"operation": "sendMessage",
"chatId": "@username or chat_id",
"messageText": "Hello from n8n!"
}
Send Media
{
"operation": "sendMedia",
"chatId": "@username or chat_id",
"filePath": "/path/to/file.jpg",
"mediaType": "photo"
}
Error Handling
The node includes comprehensive error handling:
- Authentication errors
- Network issues
- Invalid parameters
- API limitations
Security
- Credentials are stored securely in n8n
- Session strings are encrypted
- 2FA support included
- No plaintext password storage
Development
Build
npm install
npm run build
Test
npm test
Lint
npm run lint
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature
) - Commit your changes (
git commit -m 'Add some AmazingFeature'
) - Push to the branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
License
MIT License - see LICENSE file for details
Support
- Create an issue on GitHub
- Contact the maintainer
Acknowledgments
- Telegram Client API
- n8n Community
- Contributors