Slack integration webhook
A webhook can be created to post messages and notifications to Slack. For information about using incoming webhooks in Slack, see https://api.slack.com/incoming-webhooks.
In this example, a configuration change triggers the FortiGate to post a message to Slack.
To create a webhook automation stitch for Slack integration in the GUI:
- Go to Security Fabric > Automation.
- Click Create New.
- Enter a name for the stitch.
- Select the trigger Configuration Change.
- Select Webhook and configure the settings:
- Click OK.
To create a webhook automation stitch for Slack integration in the CLI:
- Create the automation action:
config system automation-action edit "send to Slack" set action-type webhook set protocol https set uri "hooks.slack.com/services/XXXXXXXX" set http-body "{\"channel\": \"#delivery\", \"username\": \"tleela\", \"text\": \"Configuration changed\", \"icon_emoji\": \":worried:\"}" set port 443 set headers "Content-type:application/json" next end
- Create the automation trigger:
config system automation-trigger edit "config change" set event-type config-change next end
- Create the automation stitch:
config system automation-stitch edit "Slack" set trigger "config change" set action "send to Slack" next end