Fortinet Document Library

Version:

Version:

Version:

Version:


Table of Contents

Administration Guide

Download PDF
Copy Link

Slack Notification action

To configure an automation stitch with a Slack Notification action, you first need to configure an incoming webhook in Slack. Then you can enter the webhook URL when you configure the Slack Notification action.

This example uses a Security Rating Summary trigger in the automation stitch with two Slack Notification actions with different notification messages. One message is a custom message, and the other is for the Security Rating Summary log with a 90 second delay.

To create an Incoming Webhook in Slack:
  1. Go to the Slack website, and create a workspace.
  2. Create a Slack application for the workspace.

  3. Add an Incoming Webhook to a channel in the workspace (see Sending messages using Incoming Webhooks for more details).
  4. Activate the Incoming Webhook, and copy the Webhook URL to the clipboard.

To configure an automation stitch with Slack Notification actions in the GUI:
  1. Go to Security Fabric > Automation and click Create New.
  2. Enter a name for the stitch, and select the FortiGate devices that it will be applied to.
  3. For Trigger, select Security Rating Summary.
  4. For action, select Slack Notification, and configure the notification settings.
    1. First action:
      Name slack1
      Delay 0
      URL Paste the webhook URL from the clipboard
      Message

      This is test for slack notification.

    2. Click the + and configure the second action:
      Name slack2
      Delay 90
      URL Paste the webhook URL from the clipboard
      Message

      %%log%%

  5. Click OK.
  6. Run the automation stitch to trigger the action.
To configure an automation stitch with Slack Notification actions in the CLI:
  1. Create the Slack Notification actions:

    config system automation-action

    edit "slack1"

    set action-type slack-notification

    set minimum-interval 0

    set delay 0

    set required disable

    set message "This is test for slack notification."

    set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"

    next

    edit "slack2"

    set action-type slack-notification

    set minimum-interval 0

    set delay 90

    set required disable

    set message "%%log%%"

    set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"

    next

    end

  2. Create the automation trigger:

    config system automation-trigger

    edit "auto-rating"

    set trigger-type event-based

    set event-type security-rating-summary

    next

    end

  3. Configure the automation stitch:

    config system automation-stitch

    edit "auto-rating"

    set status enable

    set trigger "auto-rating"

    set action "slack1" "slack2"

    next

    end

  4. Trigger the automation stitch.

The notification action is triggered in FortiGate.

The message you entered in the automation stitch is delivered to the Slack channel.

Slack Notification action

To configure an automation stitch with a Slack Notification action, you first need to configure an incoming webhook in Slack. Then you can enter the webhook URL when you configure the Slack Notification action.

This example uses a Security Rating Summary trigger in the automation stitch with two Slack Notification actions with different notification messages. One message is a custom message, and the other is for the Security Rating Summary log with a 90 second delay.

To create an Incoming Webhook in Slack:
  1. Go to the Slack website, and create a workspace.
  2. Create a Slack application for the workspace.

  3. Add an Incoming Webhook to a channel in the workspace (see Sending messages using Incoming Webhooks for more details).
  4. Activate the Incoming Webhook, and copy the Webhook URL to the clipboard.

To configure an automation stitch with Slack Notification actions in the GUI:
  1. Go to Security Fabric > Automation and click Create New.
  2. Enter a name for the stitch, and select the FortiGate devices that it will be applied to.
  3. For Trigger, select Security Rating Summary.
  4. For action, select Slack Notification, and configure the notification settings.
    1. First action:
      Name slack1
      Delay 0
      URL Paste the webhook URL from the clipboard
      Message

      This is test for slack notification.

    2. Click the + and configure the second action:
      Name slack2
      Delay 90
      URL Paste the webhook URL from the clipboard
      Message

      %%log%%

  5. Click OK.
  6. Run the automation stitch to trigger the action.
To configure an automation stitch with Slack Notification actions in the CLI:
  1. Create the Slack Notification actions:

    config system automation-action

    edit "slack1"

    set action-type slack-notification

    set minimum-interval 0

    set delay 0

    set required disable

    set message "This is test for slack notification."

    set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"

    next

    edit "slack2"

    set action-type slack-notification

    set minimum-interval 0

    set delay 90

    set required disable

    set message "%%log%%"

    set uri "hooks.slack.com/services/xxxxxxxxx/xxxxxxxxx/xxxxxxxxxxxxxxxxxxxxxxxx"

    next

    end

  2. Create the automation trigger:

    config system automation-trigger

    edit "auto-rating"

    set trigger-type event-based

    set event-type security-rating-summary

    next

    end

  3. Configure the automation stitch:

    config system automation-stitch

    edit "auto-rating"

    set status enable

    set trigger "auto-rating"

    set action "slack1" "slack2"

    next

    end

  4. Trigger the automation stitch.

The notification action is triggered in FortiGate.

The message you entered in the automation stitch is delivered to the Slack channel.