Skip to main content
smkml
Staff
Staff
January 30, 2025

Technical Tip: FortiWeb notification alert send to Telegram

  • January 30, 2025
  • 0 replies
  • 1131 views
Description

 

This article describes how to send an alert to Telegram application using a webhook from FortiWeb.

 

fwb webhook.png

 

Scope

 

FortiWeb, Telegram.

 

Solution

 

  1. Create a Telegram bot and get a Bot Token.

get bot token.png

 

  1. Create a Telegram group and add a bot created initially into the group. Take note of the group ID, for this example web.telegram.org/k/#-4703356725.

telegram group.png

 

telegram group id.png

 

  1. Create a webhook Automation Action in FortiWeb, go to Security Fabric -> Automation -> Action -> Create New -> General -> Webhook.

create a webhook in fwb.png

 

Fill up the attributes as in the following format (for this example):

 

Name fwb_telegram
Protocol HTTPS
URL api.telegram.org/bot<Bot Token>/sendMessage
Method POST
HTTP Body {"chat_id":"<Group ID>","text": "Failed to logged in, here is the full event log: %%log%%"}
HTTP Header Content-Type:application/json

 

  1. Create a Stitch that will trigger the action to send the logs to Telegram. Go to Security Fabric -> Automation -> Stich -> Create New.

create a stich in fwb.png

 

Make sure the Triggers are chosen correctly to select the correct logs to trigger with.

Security Fabric -> Automation -> Trigger -> Create New.

 

create a cutom trigger in fwb.png

 

  1. Trigger the event and observed the logs in Event Logs and alert sent to Telegram.

fwb event log.png

 

alert send to telegram.png

 

Related articles:

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!