Send Program Notifications via Webhook

Hi
in Program Notifications section

can I use variable inside webhook url ?

to include Full name and mobile number

for test it is worked when I put telegram link ::
https://api.telegram.org/bot$BOT_TOKEN/sendMessage?chat_id=myid&text=Hi

can I replace chat_id value with variable ? or set V{program_name} A{P2cwLGskgxn}
phone number
chat_id value
inside url ??
any help ?
also when I chose webhook how to send text written before in
what to send section ( Message template)

1 Like

Hi @aabdo

Thanks for the post. You’re the first person to post about using Telegram bot with DHIS2 api / webhooks. I’m pretty sure that you can’t insert the variables as URL parameters, but I think you might be able to customize the message template and use the variables there.

If this doesn’t work, you might want to create a ‘proxy’ API that receives the notification from DHIS2 and sends (using a custom script) the values you want to the Telegram bot.