Sending many binary attachments via Telegram

Hello, I need to implement email forwarding with one or more attachments via a Telegram bot. I used an IMAP trigger that saves attachments to binary with names (attachment_0, attachment_1, and so on…). To send to Telegram, I used the Send Document node, where I specified the attachment name in the input binary field. However, how can I automatically send all attachments in one message without typing their names manually each time?

Workflow

Running via n8n cloud

why don’t you iterate over all attachments: sending one each time

Okay, this is also an option, but in any case, how do I go through them all without manually entering the names?

depends on the input but generally, split out the array that contains each attachment, map out the data and then set the name to something dynamic, but I’m assuming it won’t care if you upload files with the same name


My attachments are saved as shown in the screenshot. Even if I do interact with them using code, I do not know how to address them.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.