Telegram/Discord integration

Hi everyone,

I’m really hoping to get some answers here from the Pipedream community!

At the moment I have a telegram channel with daily tv shedule listings posted to it. These schedules come in the form of images which are posted in a burst at night. These images are then transferred by a bot to be posted on my Discord server.

The problem is that the images are posted one by one on telegram and then posted one by one in the discord channel. The post header/avatar is copied with each image post (on Android mobile devices) taking up screen real estate and making it look pretty untidy.

I’ve learned that the only way to add multiple image embeds to a single post is by using webhooks hence my interest in Pipedream.

So the workflow I would like to create is Telegram Channel event (image posts) > Collect the 5-20 images > Send to Discord channel as one post/message.

Is this possible with Pipedream and if so does there need to be an intermediate step to collate the images from multiple posts before them being sent out as a single message to discord? (I thought G Sheets might be the way to do this?) Or can this be done within the existing telegram/discord app setups?

I’m very new to Javascript but keen to develop my understanding of how pipedream can facilitate these sort of tasks.


Hmmm, this is proving helpful…

@khpov yes, if the Telegram Channel webhook contains the information on the image that you need to perform the collation, I think writing some Node.js code might be your best bet. I shared some references in the other thread you posted on. Let me know if that helps.

Thanks for the replies, I am looking at how to get this done with node.js code.


So I’ve managed to get telegram connected successfully, the new message event triggers an http request which requests the file from telegram using getfile with the telegram API. I’ve connected this to google drive so the image is downloaded there. However when I try to use the discord send message app (embed) I can’t get the image to display. I get an error “Error{“embeds”:[“0”]}”.

Any thoughts?


@khpov Discord returns that error when the embeds object is malformed (that is, it doesn’t meet the format that Discord requires). You can find more docs on embeds and an example workflow that sends an embed to Discord here.

If you share the embed format with the Discord Developer server, they may also be able to help you format it correctly.

1 Like

I’m confused: If I embed a hyperlink it works:

{{ [{“description”:"("}] }}

But an image url does not:

{{ [{“image”:“”}] }}

I believe Discord verifies that it can hit the URL defined in image. If it doesn’t have access, it will also throw that error. Can you make sure the file is public, and try including the public download link to the image? I am not 100% sure if that will work, but I believe that’s the issue.

I wish Discord returned better error messages here. We just display what they return. I’d suggest reaching out to them to give them this feedback, since I agree it’s confusing.

Thanks but I’ve tried both those suggestions and still returns the same error. I will see if I can get any help from the discord side.