Hi, I am creating a zap that will broadcast to all subscribed users on telegram. it worked on my vscode but the zap does not produce anything, is there anything wrong with my codes?
let token = TOKEN;
await fetch(`https://stickybot-server.glitch.me/user/getAllUsers`)
.then(res => res.json())
.then(json =>
{
json.forEach(async user => {
let data = {
chat_id : user.userId.toString(),
text : "text"
}
await fetch(`https://api.telegram.org/bot${token}/sendMessage`,
{
method: 'POST',
body: JSON.stringify(data),
headers: {
'Content-Type': 'application/json'
}
})
})
})