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.
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.
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.