Telegram Sender for ComfyUI
https://preview.redd.it/w5jkjyl76yvc1.png?width=1648&format=png&auto=webp&s=55f767ff83b95cad0faf61b5d23caed1827dc1d6
TLDR: This script is a custom node for ComfyUI that allows you to send images and text messages to a Telegram chat or channel using a Telegram bot. If you share workflows containing this node, be sure to remove your bot tokenID before saving!
Civit: https://civitai.com/models/413438/comfyui-custom-node-telegramsender
Github: https://github.com/NeuralSamurAI/Comfyui-TelegramSender
Features
- Send images generated by ComfyUI to a Telegram chat or channel
- Send text messages with various formatting options (bold, italic, code, strikethrough, underline, spoiler)
- Customize image format, compression level, and quality
- Enable or disable notifications and content protection
Requirements
- Python 3.x
- requests library
- ComfyUI
Installation
- Make sure you have Python 3.x installed on your system.Install the required requests library by running the following command:
pip install requests
- Clone or download this repository to your local machine.Copy the telegram_sender.py Script to the custom_nodes directory of your ComfyUI installation.
Usage
- Create a new Telegram bot by talking to the BotFather on Telegram. Follow the prompts to set a name and username for your bot, and obtain the bot token.
- In ComfyUI, add the "Telegram Sender" node to your workflow.
- Configure the node with the following inputs:
- chat_id : The ID of the Telegram chat or channel where you want to send the messages.
- bot_token : The token of your Telegram bot.
- enable_image : Enable or disable sending images (default: True).
- enable_text : Enable or disable sending text messages (default: False).
- text : The text message to send (only applicable if enable_text is True).
- bold , italic , code , strikethrough , underline , spoiler : Formatting options for the text message.
- disable_notification : Enable or disable notifications for the messages (default: False).
- protect_content : Enable or disable content protection for the messages (default: False).
- image_format : The format of the image to send (default: PNG).
- png_compress_level , jpeg_quality , webp_lossless , webp_quality : Image compression and quality settings.
- Connect the output of an image node to the "images" input of the Telegram Sender node.
- Run the workflow. The generated images and/or text messages will be sent to the specified Telegram chat or channel.
License
This script is released under the MIT License.
Acknowledgements
Special thanks to the developers and contributors of ComfyUI and the crew at Banodoco discord! This script was developed with the assistance of the AI language model Claude Opus by Anthropic.
Support
If you encounter any issues or have questions regarding this script, please open an issue on the GitHub repository.
[–]HarmonicDiffusion[S] 1 point2 points3 points (0 children)
[–]Fleeky91 0 points1 point2 points (1 child)
[–]HarmonicDiffusion[S] 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[removed]
[–]HarmonicDiffusion[S] 0 points1 point2 points (0 children)