I tried adding multiple Chat ID using
, but it’s not working.
But I can manually enter Individual Chat ID.
Expected Use Case:
- Here is the Sample Workflow
- Get a List of Chat IDs from Google Sheets and put them into the Chat ID field in Telegram Node.
It’ll work as Telegram Broadcast.
The limit is 30 Messages per second
Refer Docs: Bots FAQ
You can use a Split in Batches Node with a wait to not run into the rate-limiting.
But how can I send it to Multiple Chat IDs bro using Single Telegram Node?
I think Split in Batches works like…
Chat IDs → Split as 30 → Wait Node → Telegram Node
I’m confused. Any workflow example on my use case bro?
Here is the workflow that might help. You can change the wait time by changing the value of the
waitTimeSeconds variable in the
Wait node. Hope this helps.
Let me try and update you soon bro
@harshil1712 But the above code just returns the first value only.
Do others come on loop?
You need to put an if node later and check if there is no more items in SplitInBatches (there is an option in this node to know if no more items are available) .
If no more items are available, you have to finish flow. If more items exist, you need to link true output to SplitInBatches input again.
Hope this helps.
Let me try to explain what is happening in this workflow in more detail.
We split the incoming chat IDs in a batch of 30 (due to the limitation by the Telegram API). The Telegram node takes one Chat ID, sends a message, and then takes another Chat ID to send a message. This continues until a message has been sent to all the 30 Chat IDs that the Split In Batches return. Once, this is over, the wait node gets executed and it waits for 30 seconds (or whatever time we have set), and triggers the Split in Batches node to get the next batch of 30 Chat IDs.
This process is repeated until a message is sent to all the Chat IDs.
I hope this clear your doubt.
Also, as @Miquel_Colomer mentioned, you can add the IF node to check if all the values are fetched and execute the workflow accordingly.