FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
adimailig
Staff & Editor
Staff & Editor
Article Id 279854
Description This article describes the steps on how to configure automation stitch with webhook action using Telegram.
Scope FortiGate.
Solution Create a Telegram Bot and get the BOT TOKEN.
Create a group chat and add the bot created as a member. Take note of the CHAT ID.

group.jpg

Setting up Automation Stitch with Webhook Action.

 

  1. Go to Security Fabric -> Automation -> Action -> Create New -> Webhook.
  2. Put the necessary details as shown on the below screenshot. On the URL, provide the BOT TOKEN. On HTTP body provide the CHAT ID.

1.PNG

 

Configuration via CLI:

config system automation-action

    edit "TELEGRAM_WEBHOOK"

        set action-type webhook

        set protocol https

        set uri "api.telegram.org/bot<BOT TOKEN> /sendMessage"

        set http-body "{\"chat_id\":\"<CHAT_ID>\",\"text\":\"%%msg%%\"}"

        set port 443

            config http-headers

                edit 1

                    set key "Content-Type"

                    set value "application/json"

                next

            end

    next

end

 

  1. Use created action on Automation stitch:
    Creating automation stitches

Testing Automation Stitch with Webhook using Telegram:
Testing automation stitches

test.PNG

 

Result :
  

result.jpg

 

Troubleshooting Automation Stitch with Webhook using Telegram:

Open CLI: Technical Tip: How to open the CLI window in GUI and download output   and run the following commands:

diagnose debug disable

diagnose debug reset

diagnose debug application autod -1

diagnose debug enable

 

Trigger the automation stitch to generate traffic.

To stop the debugging:

diagnose debug disable

diagnose debug reset

 

If further investigation is required, contact TAC  and provide the logs together with the necessary information.

Comments
jbernabe
Staff
Staff

Awesome! this article link help to resolved my customer problem