Send multiple images telegram bot to n8n ai bot

Hi, I’m trying to send multiple pictures to my telegram bot, then n8n ai bot need to analyze it.
When i use the build in n8n chat, the chat will pass all images to the ai bot, and my automation works 100%.

But i want to use my telegram bot instead of the n8n chat function. When i send multiple images to my telegram bot, it will only pass 1 image instead of all images.

I found a post of @shuui and he made it work, but the post is a little to complicated for me.
I need to do something with media_group_id.. Dynamically send variable groups of media on Telegram with n8n - #2 by shuui

Hope someone can help me.

Information on your n8n setup

  • n8n version: 1.104.1
  • Database (default: SQLite): default
  • Running n8n via (Docker, npm, n8n cloud, desktop app): docker
  • Operating system: unraid

Hey Ask chatgpt to be a n8n expert in Jpan and ask thaat question I am sure You’ll get the answers>

So what happens is, if you send 2 photos using telegram, you’ll get the workflow executing 2 times, one per image. I would maybe recommend you first detect whether an image was sent, store the images to disk or a cloud bucket, then in a separate execution or a followup message, instruct your bot to pull the stored images and use them. You can use the media_group_id as a unique identifier to link the images together. I assume you need all images to be passed to the llm agent at the same time?

@Eyas I chatted with Chatgtp, gemini, Claude for hours, but did not managed to get it done.

Wouter, I swapped from telegram to a (custom) discord node, and managed to get it done. It took me so long, first i will use this discord method, but i will try telegram again, when i have some spare time.

https://i.imgur.com/78ubIUQ.png

The only other option is to maybe use a custom api call using http requests like the link you shared. Im not 100% sure if this is how telegram works, or if this is how the telegram node in n8n works.

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