I integrated his solution into my workflow, everything worked, photos are sent by album, but the data is duplicated and two messages with the same data arrive.
The most reliable solution, used by several users successfully:
Don’t use the “Send Media Group” node.
Use an HTTP Request to the Telegram API: Endpoint: sendMediaGroup, JSON with a variable media array.
You can iterate over the media_ids retrieved from the database and dynamically build the array.
This approach allows you to send any combination of photos/videos, without duplicates and with proper programmatic logic.
You should also build a dynamic array, with a code node such as:
Then pass this. This JSON will be passed to the HTTP Request node.
Send with HTTP Request
Configure:
URL: https://api.telegram.org/bot<YOUR_TOKEN>/sendMediaGroup
Method: POST
Body: Use the generated JSON as JSON/RAW Body
This allows variable albums to be sent correctly.
thanks for the reply, I’m already using an http request from senmediagroup. It turns out that each attached copper to the message initializes a new startup of the workflow, and each node is executed several times, maybe I made a mistake somewhere during the setup?
items already deprecated since in the new version, you must use $input.all() instead.
so replace the 2nd line from items.map to $input.all().map() vice versa for the ids at line 19, you need to change it to $input.all().map(i=>i.json.id)