{"id":35683798,"url":"https://github.com/patricktobias86/node-red-telegram-account","last_synced_at":"2026-01-31T05:08:39.134Z","repository":{"id":290661074,"uuid":"975201812","full_name":"patricktobias86/node-red-telegram-account","owner":"patricktobias86","description":"Node-RED nodes to communicate with Telegram (TeleProto).","archived":false,"fork":false,"pushed_at":"2026-01-20T21:18:08.000Z","size":927,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-21T06:44:23.410Z","etag":null,"topics":["node-red","telegram","teleproto"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/@patricktobias86/node-red-telegram-account","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patricktobias86.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-04-30T00:18:43.000Z","updated_at":"2026-01-20T21:18:12.000Z","dependencies_parsed_at":"2026-01-06T13:07:12.628Z","dependency_job_id":null,"html_url":"https://github.com/patricktobias86/node-red-telegram-account","commit_stats":null,"previous_names":["patricktobias86/node-red-telegram-account"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/patricktobias86/node-red-telegram-account","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricktobias86%2Fnode-red-telegram-account","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricktobias86%2Fnode-red-telegram-account/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricktobias86%2Fnode-red-telegram-account/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricktobias86%2Fnode-red-telegram-account/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patricktobias86","download_url":"https://codeload.github.com/patricktobias86/node-red-telegram-account/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patricktobias86%2Fnode-red-telegram-account/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28929865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-red","telegram","teleproto"],"created_at":"2026-01-05T21:11:57.125Z","updated_at":"2026-01-31T05:08:39.130Z","avatar_url":"https://github.com/patricktobias86.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node-RED nodes to communicate with TeleProto\n\n\u003cp align=\"center\"\u003e\n\u003cimg alt=\"GitHub issues\" src=\"https://img.shields.io/github/issues/patricktobias86/node-red-telegram-account?color=56BEB8\" /\u003e\n\u003cimg alt=\"GitHub forks\" src=\"https://img.shields.io/github/forks/patricktobias86/node-red-telegram-account?color=56BEB8\" /\u003e\n\u003cimg alt=\"GitHub stars\" src=\"https://img.shields.io/github/stars/patricktobias86/node-red-telegram-account?color=56BEB8\" /\u003e\n\u003c/p\u003e\n\n```bash\nnpm i @patricktobias86/node-red-telegram-account\n```\n\nThis package contains a collection of Node‑RED nodes built on top of [TeleProto](https://www.npmjs.com/package/teleproto). They make it easier to interact with the Telegram MTProto API from your flows.\n\n## Node overview\n\nSee [docs/NODES.md](docs/NODES.md) for a detailed description of every node. Below is a quick summary:\n\n- **config** – stores your API credentials and caches sessions for reuse.\n- **auth** – interactive login that outputs a `stringSession` (also set on `msg.stringSession`).\n- **receiver** – emits messages for every incoming Telegram message using Raw MTProto updates (with optional ignore list, message type filter, media size limit, and optional edit filtering), including channel posts and service messages. Event listeners are cleaned up on node close so redeploys won't duplicate messages.\n- **command** – triggers when an incoming message matches a command or regex. Event listeners are removed on redeploy to prevent duplicates.\n- **send-message** – sends text or media messages with rich options.\n- **send-files** – uploads one or more files with captions and buttons.\n- **get-entity** – resolves usernames, IDs or t.me links into Telegram entities.\n - **delete-message** – deletes one or more messages, optionally revoking them, and forwards the original input message with the API response.\n- **iter-dialogs** – iterates over your dialogs (chats, groups, channels).\n- **iter-messages** – iterates over messages in a chat with filtering options.\n- **promote-admin** – promotes a user to admin with configurable rights.\n- **resolve-userid** – converts a username to a numeric user ID.\n\nAll nodes preserve any properties on the incoming message outside of \u003ccode\u003emsg.payload\u003c/code\u003e.\n\nAll nodes include a \u003ccode\u003eDebug\u003c/code\u003e option that logs incoming and outgoing messages to the Node-RED log when enabled.\n\n## Session management\n\nConnections to Telegram are cached by the configuration node. A Map keyed by the `stringSession` tracks each client together with a reference count and the connection promise. If a node is created while another one is still connecting, it waits for that promise and then reuses the same client.\n\nA single `TelegramClient` instance is therefore shared between all flows that point to the same configuration node, even after a redeploy. When Node‑RED restarts it checks the cache and returns the existing client rather than creating a new connection. The reference count is decreased whenever a node using the session is closed. Once all nodes have closed and the count reaches zero, the cached client is disconnected.\n\nExample flows can be found in the [examples](examples) folder.\n\n## Running tests\n\nAfter cloning the repository, install dependencies and run the test suite with:\n\n```bash\nnpm install\nnpm test\n```\n\nThe tests use Mocha and verify that sessions are properly cached across nodes.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for release notes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricktobias86%2Fnode-red-telegram-account","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatricktobias86%2Fnode-red-telegram-account","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatricktobias86%2Fnode-red-telegram-account/lists"}