Adding a URL to Dall-E 3 generated images in Telegram

Hi everyone,

I’m a non-tech user of n8n, and I’ve been checking a recent workflow for building Telegram AI bots that allows generating images with Dall-E 3.

Since files are compressed and lose quality after being sent via Telegram, I thought it’d be useful to add a URL to download the original images.

Telegram allows adding a caption below the image which can contain a corresponding URL. It can be configured via a Telegram node that receives the JSON with the image URL from the HTTP Request node.

Telegram image captions also seem to be more limited than standard text messages (e.g. don’t support HTML) and it may be better to send a URL in plain text.

Here are two images: one downloaded directly from the app (222.28 KB) and another via a URL (3.02 MB). The first picture is smaller but has a bit more noise.

While the difference in quality may seem very small visually, it ‘s sometimes necessary to have original images (e.g. for professional printing or editing purposes).

4 Likes

Thanks for sharing Yulia! I do wonder if those links are permanent, or will they expire after a while?

Unfortunately, the links are not permanent and expire quite quickly. Hard to say exactly how fast but the images I created two days ago are already not available via a link. Maybe it’s also possible to send an image as a file with a new Telegram node, so that Telegram itself serves as storage.

2 Likes

Actually I managed to set up the second node to send an image as a document. After placing both Telegram nodes in parallel, I got both an image with a URL and sent as a file. The later image has the original quality and size and I can save it from Telegram any time!

Telegram_image as file

2 Likes