Enhance & Expand Telegram Images to 3:2 with CodeFormer & LightX AI

Go to Workflow
0 views
Built by Vadym Nahornyi Vadym Nahornyi
Created on July 26, 2025

Description

šŸš€ Automatically enhance and expand Telegram images with AI

This n8n workflow turns your Telegram bot into a powerful AI photo enhancer!
Whether users send a photo or a link, it processes the image by:

šŸ“„ Receiving the input (photo or link)
🧠 Upscaling quality using Replicate's CodeFormer
šŸ“ Analyzing image dimensions and calculating paddings to fit the 3:2 ratio
šŸ–¼ļø Expanding the image contextually with LightX AI
ā˜ļø Uploading the result to S3
šŸ”— Sending back a public URL to the user in Telegram

šŸ‘„ Who is it for?
Telegram bot creators
Content creators & photographers
SMM pros looking to quickly polish user images
AI enthusiasts who want plug-and-play image workflows

šŸ› ļø Setup Requirements
A Telegram bot (via @BotFather)
AWS S3 Bucket (public)
Replicate API key
LightX API key

šŸ”§ How to customize
Add custom prompts or ratio in JavaScript node
Connect to other AI tools for filters or style transfer
Switch storage destination (e.g. Google Drive or Dropbox)

šŸ’” Tips
Works great in photo-related communities
Can be used for virtual try-ons, image recovery or thumbnail generation

šŸŒ Languages
The main sticky note can be localized — feel free to swap it for your audience!

Nodes Used (4)

AWS S3
n8n-nodes-base.awsS3
Code
n8n-nodes-base.code
HTTP Request
n8n-nodes-base.httpRequest
Telegram
n8n-nodes-base.telegram