Fortinet black logo

Administration Guide

Slack integration webhook

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:
  1. Go to Security Fabric > Automation.
  2. Click Create New.
  3. Enter a name for the stitch.
  4. Select the trigger Configuration Change.
  5. Select Webhook and configure the settings:

  6. Click OK.
To create a webhook automation stitch for Slack integration in the CLI:
  1. 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
  2. Create the automation trigger:
    config system automation-trigger
        edit "config change"
            set event-type config-change
        next
    end
  3. Create the automation stitch:
    config system automation-stitch
        edit "Slack"
            set trigger "config change"
            set action "send to Slack"
        next
    end

Slack integration webhook

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:
  1. Go to Security Fabric > Automation.
  2. Click Create New.
  3. Enter a name for the stitch.
  4. Select the trigger Configuration Change.
  5. Select Webhook and configure the settings:

  6. Click OK.
To create a webhook automation stitch for Slack integration in the CLI:
  1. 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
  2. Create the automation trigger:
    config system automation-trigger
        edit "config change"
            set event-type config-change
        next
    end
  3. Create the automation stitch:
    config system automation-stitch
        edit "Slack"
            set trigger "config change"
            set action "send to Slack"
        next
    end