Fortinet black logo

Slack v1.0.0

Copy Link
Copy Doc ID ff819c63-0fd7-4e48-bda2-6e7d3048d0b5:1

About the connector

Slack is a cloud-based set of proprietary team collaboration tools and services. Slack creates alignment and shared understanding across your team, making you more productive and less stressed. It brings all your team's communication together, giving everyone a shared workspace where conversations are organized and accessible.

This document provides information about the Slack connector, which facilitates automated interactions, with Slack using FortiSOAR™ playbooks. Add the Slack connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all channels and users configured in your Slack cloud, retrieving information about a user that is configured in your Slack cloud and sending a message to a channel configured in your Slack cloud.

Version information

Connector Version: 1.0.0

Compatibility with FortiSOAR™ Versions: 4.10.3-161 and later

Installing the connector

For the procedure to install a connector, click here.

Prerequisites to configuring the connector

  • You must have the URL of the Slack cloud to which you will connect and perform the automated operations and the token configured for your account to access that Slack cloud.
  • To access the FortiSOAR™ UI, ensure that port 443 is open through the firewall for the FortiSOAR™ instance.

Configuring the connector

For the procedure to configure a connector, click here.

Configuration parameters

In FortiSOAR™, on the Connectors page, select the Slack connector and click Configure to configure the following parameters:

Parameter Description
Server URL URL of the Slack cloud to which you will connect and perform automated operations.
Token Authentication Token that contains required scopes that are configured for your account for the Slack cloud to which you will connect and perform the automated operations.
For information on how to get an authentication token, see https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
Defaults to True.

Actions supported by the connector

The following automated operations can be included in playbooks and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 onwards:

Function Description Annotation and Category
Get Channels List Retrieves a list of channels and their details, available in a slack team, from your configured Slack cloud. get_channels
Investigation
Search Channel Retrieves detailed information about a specific channel, based on the channel name that you have specified, from your configured Slack cloud. get_channel
Investigation
Get User List Retrieves a list of users and their details, available in a slack team, from your configured Slack cloud. get_users
Investigation
Get User Information Retrieves detailed information about a specific user, based on the User ID that you have specified, from your configured Slack cloud. get_user
Investigation
Send Message Sends a message to a specific channel configured Slack cloud, based on the Channel ID and other input parameters that you have specified. send_message
Investigation
Upload File Uploads a file to a specific channel configured Slack cloud, based on the Channel ID and other input parameters that you have specified. upload_file
Miscellaneous

operation: Get Channels List

Input parameters

Note: All the input parameters are optional. However, if you do not specify any parameter, then no filter criteria is applied and an unfiltered list is returned.

Parameter Description
Exclude Archived Select this option, i.e., set it as true, to exclude archived channels from the list of channels retrieved from your configured Slack cloud.
By default, this is set as false.
Maximum Records Maximum number of records you want this operation to return.
By default, this is set as 0.
Cursor Set this parameter to a next_cursor attribute returned by a previous request's response_metadata.

Output

The JSON output contains a list of all channels along with their details, such as id, creator name, and purpose, present in a Slack team, retrieved from your configured Slack cloud.

Following image displays a sample output:

Sample output of the Get Channels List operation

operation: Search Channel

Input parameters

Parameter Description
Channel to Search Name of the channel whose details you want to retrieve from your configured Slack cloud.
Type of Search Type of filter option that you want to apply to the search operation.
You can choose from the following options: Exact, Contains, Starts With, or Ends With.

Output

The JSON output contains detailed information of a channel such as id, creator name and purpose, retrieved from your configured Slack cloud, based on the channel name that you have specified.

Following image displays a sample output:

Sample output of the Search Channel operation

operation: Get User List

Input parameters

Note: All the input parameters are optional. However, if you do not specify any parameter, then no filter criteria is applied and an unfiltered list is returned.

Parameter Description
Maximum Records Maximum number of records you want this operation to return.
By default, this is set as 0.
Cursor Set this parameter to a next_cursor attribute returned by a previous request's response_metadata.

Output

The JSON output contains a list of all members along with their profile details, such as last name, phone number, id, and team id, present in a Slack team, retrieved from your configured Slack cloud.

Following image displays a sample output:

Sample output of the Get User List operation

operation: Get User Information

Input parameters

Parameter Description
User ID Unique ID of the users whose details you want to retrieve from your configured Slack cloud.
Include Locale Select this option, i.e., set it as true to include locale information for the user.
By default, this is set as false.

Output

The JSON output contains detailed information of the user such as name, real name, profile details, and team id, retrieved from your configured Slack cloud, based on the user ID that you have specified.

Following image displays a sample output:

Sample output of the Get User Information operation

operation: Send Message

Input parameters

Parameter Description
Channel ID Unique ID of the channel to which you want to send the message on your configured Slack cloud.
Message Message that you want to send to the channel that you have specified on your configured Slack cloud.
Attachments JSON-based array of structured attachments.
For example:
[
{
"fallback": "ReferenceError - UI is not defined",
"text": "ReferenceError - UI is not defined",
"fields": [
{
"title": "Project",
"value": "Awesome Project",
"short": true
},
{
"title": "Environment",
"value": "production",
"short": true
}
],
"color": "#F35A00"
}
]
Note: For more information on how to set attachments, see https://api.slack.com/docs/message-attachments.

Output

The JSON output contains details of the message sent to the Slack channel that you have specified. Message details such as bot id, type, text, and attachment details, are included in the JSON output.

Following image displays a sample output:

Sample output of the Send Message operation

operation: Upload File

Input parameters

Note: You can only upload files to the Slack channels on your configured Slack cloud from the FortiSOAR™ Attachment module.

Parameter Description
Channel ID Comma-separated list of channel names or IDs to which you want to upload the file on your configured Slack cloud.
Title Title of the file that you want to upload to the specified Slack channels.
File Name Name of the file that you want to upload to the specified Slack channels.
File Type Type of the file that you want to upload to the specified Slack channels.
File Reference Type of file reference that you will be providing for the file that you want to upload to the specified Slack channels.
You can choose from the following options: Attachment IRI or File IRI.
Reference ID Reference ID that is used to access the file directly from the FortiSOAR™ Attachments module. This should be the file that you want to upload to the specified Slack channels.
In the playbook, this defaults to the {{vars.attachment_id}} if you have selected Attachment IRI as the file reference or the {{vars.file_iri}} value if you have selected File IRI as the file reference.
Comment Initial comment to add to the file that you want to upload to the specified Slack channels.

Output

The JSON output contains details of the file uploaded to the Slack channel that you have specified. File details such as file name, file type, timestamp, groups, and comments count, are included in the JSON output.

Following image displays a sample output:

Sample output of the Upload File operation

Included playbooks

The Sample - Slack - 1.0.0 playbook collection comes bundled with the Slack connector. This playbook contains steps using which you can perform all supported actions. You can see the bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Slack connector.

  • Get Channels List
  • Get User Information
  • Get User List
  • Search Channel
  • Send Message
  • Upload File

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Previous
Next

About the connector

Slack is a cloud-based set of proprietary team collaboration tools and services. Slack creates alignment and shared understanding across your team, making you more productive and less stressed. It brings all your team's communication together, giving everyone a shared workspace where conversations are organized and accessible.

This document provides information about the Slack connector, which facilitates automated interactions, with Slack using FortiSOAR™ playbooks. Add the Slack connector as a step in FortiSOAR™ playbooks and perform automated operations, such as retrieving a list of all channels and users configured in your Slack cloud, retrieving information about a user that is configured in your Slack cloud and sending a message to a channel configured in your Slack cloud.

Version information

Connector Version: 1.0.0

Compatibility with FortiSOAR™ Versions: 4.10.3-161 and later

Installing the connector

For the procedure to install a connector, click here.

Prerequisites to configuring the connector

Configuring the connector

For the procedure to configure a connector, click here.

Configuration parameters

In FortiSOAR™, on the Connectors page, select the Slack connector and click Configure to configure the following parameters:

Parameter Description
Server URL URL of the Slack cloud to which you will connect and perform automated operations.
Token Authentication Token that contains required scopes that are configured for your account for the Slack cloud to which you will connect and perform the automated operations.
For information on how to get an authentication token, see https://get.slack.help/hc/en-us/articles/215770388-Create-and-regenerate-API-tokens.
Verify SSL Specifies whether the SSL certificate for the server is to be verified or not.
Defaults to True.

Actions supported by the connector

The following automated operations can be included in playbooks and you can also use the annotations to access operations from FortiSOAR™ release 4.10.0 onwards:

Function Description Annotation and Category
Get Channels List Retrieves a list of channels and their details, available in a slack team, from your configured Slack cloud. get_channels
Investigation
Search Channel Retrieves detailed information about a specific channel, based on the channel name that you have specified, from your configured Slack cloud. get_channel
Investigation
Get User List Retrieves a list of users and their details, available in a slack team, from your configured Slack cloud. get_users
Investigation
Get User Information Retrieves detailed information about a specific user, based on the User ID that you have specified, from your configured Slack cloud. get_user
Investigation
Send Message Sends a message to a specific channel configured Slack cloud, based on the Channel ID and other input parameters that you have specified. send_message
Investigation
Upload File Uploads a file to a specific channel configured Slack cloud, based on the Channel ID and other input parameters that you have specified. upload_file
Miscellaneous

operation: Get Channels List

Input parameters

Note: All the input parameters are optional. However, if you do not specify any parameter, then no filter criteria is applied and an unfiltered list is returned.

Parameter Description
Exclude Archived Select this option, i.e., set it as true, to exclude archived channels from the list of channels retrieved from your configured Slack cloud.
By default, this is set as false.
Maximum Records Maximum number of records you want this operation to return.
By default, this is set as 0.
Cursor Set this parameter to a next_cursor attribute returned by a previous request's response_metadata.

Output

The JSON output contains a list of all channels along with their details, such as id, creator name, and purpose, present in a Slack team, retrieved from your configured Slack cloud.

Following image displays a sample output:

Sample output of the Get Channels List operation

operation: Search Channel

Input parameters

Parameter Description
Channel to Search Name of the channel whose details you want to retrieve from your configured Slack cloud.
Type of Search Type of filter option that you want to apply to the search operation.
You can choose from the following options: Exact, Contains, Starts With, or Ends With.

Output

The JSON output contains detailed information of a channel such as id, creator name and purpose, retrieved from your configured Slack cloud, based on the channel name that you have specified.

Following image displays a sample output:

Sample output of the Search Channel operation

operation: Get User List

Input parameters

Note: All the input parameters are optional. However, if you do not specify any parameter, then no filter criteria is applied and an unfiltered list is returned.

Parameter Description
Maximum Records Maximum number of records you want this operation to return.
By default, this is set as 0.
Cursor Set this parameter to a next_cursor attribute returned by a previous request's response_metadata.

Output

The JSON output contains a list of all members along with their profile details, such as last name, phone number, id, and team id, present in a Slack team, retrieved from your configured Slack cloud.

Following image displays a sample output:

Sample output of the Get User List operation

operation: Get User Information

Input parameters

Parameter Description
User ID Unique ID of the users whose details you want to retrieve from your configured Slack cloud.
Include Locale Select this option, i.e., set it as true to include locale information for the user.
By default, this is set as false.

Output

The JSON output contains detailed information of the user such as name, real name, profile details, and team id, retrieved from your configured Slack cloud, based on the user ID that you have specified.

Following image displays a sample output:

Sample output of the Get User Information operation

operation: Send Message

Input parameters

Parameter Description
Channel ID Unique ID of the channel to which you want to send the message on your configured Slack cloud.
Message Message that you want to send to the channel that you have specified on your configured Slack cloud.
Attachments JSON-based array of structured attachments.
For example:
[
{
"fallback": "ReferenceError - UI is not defined",
"text": "ReferenceError - UI is not defined",
"fields": [
{
"title": "Project",
"value": "Awesome Project",
"short": true
},
{
"title": "Environment",
"value": "production",
"short": true
}
],
"color": "#F35A00"
}
]
Note: For more information on how to set attachments, see https://api.slack.com/docs/message-attachments.

Output

The JSON output contains details of the message sent to the Slack channel that you have specified. Message details such as bot id, type, text, and attachment details, are included in the JSON output.

Following image displays a sample output:

Sample output of the Send Message operation

operation: Upload File

Input parameters

Note: You can only upload files to the Slack channels on your configured Slack cloud from the FortiSOAR™ Attachment module.

Parameter Description
Channel ID Comma-separated list of channel names or IDs to which you want to upload the file on your configured Slack cloud.
Title Title of the file that you want to upload to the specified Slack channels.
File Name Name of the file that you want to upload to the specified Slack channels.
File Type Type of the file that you want to upload to the specified Slack channels.
File Reference Type of file reference that you will be providing for the file that you want to upload to the specified Slack channels.
You can choose from the following options: Attachment IRI or File IRI.
Reference ID Reference ID that is used to access the file directly from the FortiSOAR™ Attachments module. This should be the file that you want to upload to the specified Slack channels.
In the playbook, this defaults to the {{vars.attachment_id}} if you have selected Attachment IRI as the file reference or the {{vars.file_iri}} value if you have selected File IRI as the file reference.
Comment Initial comment to add to the file that you want to upload to the specified Slack channels.

Output

The JSON output contains details of the file uploaded to the Slack channel that you have specified. File details such as file name, file type, timestamp, groups, and comments count, are included in the JSON output.

Following image displays a sample output:

Sample output of the Upload File operation

Included playbooks

The Sample - Slack - 1.0.0 playbook collection comes bundled with the Slack connector. This playbook contains steps using which you can perform all supported actions. You can see the bundled playbooks in the Automation > Playbooks section in FortiSOAR™ after importing the Slack connector.

Note: If you are planning to use any of the sample playbooks in your environment, ensure that you clone those playbooks and move them to a different collection since the sample playbook collection gets deleted during connector upgrade and delete.

Previous
Next