Warning
This project is deprecated. You can use instead https://github.com/yazdipour/TelegramToTRMNL which is a bit cleaner version of this project with more feature like pdf and epub reader.
This project lets you forward images from Telegram directly to a TRMNL device display using a Pipedream integration.
It listens for incoming Telegram messages with images and captions, extracts the image and formatting info (CSS classes and styles), then sends that to your TRMNL plugin.
-
You send an image to a Telegram bot.
-
Optionally, you include a caption with CSS-like formatting:
.classNameis extracted asimg_class- anything else is added as inline
img_style
-
The bot grabs the image URL and formats a payload:
{ "merge_variables": { "img_url": "https://...", "img_class": "your-class", "img_style": "width:100%" } } -
This payload is sent to your TRMNL plugin and displayed.
.invert- Enhances image brightness and saturation.rotate- Rotates image 90° clockwise
✅ Complete setup takes ~10–15 minutes
- Visit usetrmnl.com
- Go to Dashboard → Plugins
- Click “+ Add Plugin”
- Choose Custom Plugin and create Private Plugin with Webhook.
- Copy your plugin’s UUID which you'll need it later.
- Setup Markup by copying the content of the Markup.html (Can use it shared between different views)
-
Open @BotFather on Telegram
-
Send
/newbotand follow the prompts -
You'll receive a Bot Token, like:
6119652656:AAxxxxx...
Save this for the Pipedream step.
You’ll use Pipedream.com to glue it all together
- Go to Pipedream Telegram integrations
- Click “Connect Account”
- Paste your Telegram Bot Token when prompted
- Create a new workflow in Pipedream
- Choose Trigger: Telegram → New Message
- Add a new “Run Node.js Code” step
- Paste the code from 'src.js` (in this repo)
- In the step config:
- Select your Telegram bot
- Set
plugin_idto the TRMNL plugin UUID you copied earlier
- Save and deploy the workflow
- Start sending images to your bot!
- Telegram file links are temporary and not public
- You do not need to upload images to third-party services
- No cloud image hosting needed — all via Telegram CDN
If you have issues setting up TRMNL, Telegram Bot, or Pipedream:
- Check the TRMNL Docs
- Use @BotFather to regenerate your token
- Visit Pipedream Support
- We are also open to contributions and improvements! So feel free to open issues or PRs.
Made with 💻 by [Shahriar Yazdipour]


