Grafana send alert image to telegram separately

Unfortunately, it is not possible at this moment. Telegram integration uses two Telegram API endpoints: sendMessage and sendPhoto. The former does not support binary attachments but the latter does not present long messages well.

However, I can see a possible solution for this problem: screenshot service supports uploading images to a remote location. So, it can provide the URL of the uploaded image to the Telegram integration so it can embed it to sendMessage command and then, if that URL is publicly accessible, I guess Telegram will generate a preview.

I created an issue Include screenshot URL to Telegram message · Issue #123 · grafana/alerting · GitHub to track the progress on it. If you think this could be useful, please vote in the issue by :+1:

1 Like