From 86867a3e8ed1fef8fddd4579974d32f4cb7bd424 Mon Sep 17 00:00:00 2001 From: Shahaf Ben Yakir <44666568+ShahafBenYakir@users.noreply.github.com> Date: Wed, 15 May 2024 10:35:17 +0300 Subject: [PATCH] Slack logger exception (#34085) * remove version from description * Added debug Added exception to slacklogger * rn * removed log * Added disclaimer to readme --- Packs/Slack/Integrations/SlackV3/README.md | 358 ++++++++++---------- Packs/Slack/Integrations/SlackV3/SlackV3.py | 4 + Packs/Slack/ReleaseNotes/3_4_13.md | 6 + Packs/Slack/pack_metadata.json | 2 +- 4 files changed, 198 insertions(+), 172 deletions(-) create mode 100644 Packs/Slack/ReleaseNotes/3_4_13.md diff --git a/Packs/Slack/Integrations/SlackV3/README.md b/Packs/Slack/Integrations/SlackV3/README.md index 4157ea5de9f0..300439dc8f42 100644 --- a/Packs/Slack/Integrations/SlackV3/README.md +++ b/Packs/Slack/Integrations/SlackV3/README.md @@ -15,31 +15,31 @@ to learn about configuring SlackV3 using the app manifest. 2. Search for SlackV3. 3. Click **Add instance** to create and configure a new integration instance. - | **Parameter** | **Description** | **Required** | - |---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| - | `bot_token` | Slack API bot token. | False | - | `user_token` | Slack API user token. | False | - | `app_token` | Slack API app token. | False | - | `incidentNotificationChannel` | Dedicated Slack channel to receive notifications. | False | - | `min_severity` | Minimum incident severity by which to send messages to Slack. | False | - | `incidentType` | Type of incidents created in Slack. | False | - | `allow_incidents` | Allow external users to create incidents via direct messages. | False | - | `proxy` | Use system proxy settings. | False | - | `unsecure` | Trust any certificate (not secure). Make sure to mark this parameter if you want the SlackBlockBuilder script to send a response back to the incident context. | False | - | `longRunning` | Long running instance. Required for investigation mirroring and direct messages. | False | - | `bot_name` | Bot display name in Slack (Cortex XSOAR by default). | False | - | `bot_icon` | Bot icon in Slack - Image URL (Cortex XSOAR icon by default). | False | - | `max_limit_time` | Maximum time to wait for a rate limiting call in seconds. | False | - | `paginated_count` | Number of objects to return in each paginated call. | False | - | `proxy_url` | Proxy URL to use in Slack API calls. | False | - | `filtered_tags` | Comma-separated list of tags by which to filter the messages sent from Cortex XSOAR. Only supported in Cortex XSOAR V6.1 and above. | False | - | `permitted_notifications` | Types of notifications to send (to individual users and to the dedicated Slack channel, if specified). | False | - | `common_channels` | For workspaces where a handful of channels are consistently being used, you may add them as a CSV in the format ChannelName:ChannelID. | False | - | `disable_caching` | When configured, Disable Caching will prevent the integration from paginating to search for Users or Conversations. Additionally, it will prevent excess data from being stored to the integration context. If this parameter is disabled, the instance may create high memory usage. | False | - | `mirroring` | Enable Incident Mirroring. | False | - | `enable_outbound_file_mirroring` | Enable Outbound File Mirroring. Whether to enable mirroring from xsoar to slack, mark it file mirroring is required in investigations. | False | - | `ignore_event_retries` | In some cases, events may not be processed fast enough. If you wish to attempt to retry the event, select `false`. Note that this can result in some responses being double-posted. Default is `True`. | False | - | `extensive_logging` | Extensive Logging. This parameter will write additional data to the logs and should only be used when you are directed to by XSOAR support. | False | + | **Parameter** | **Description** | **Required** | + |---|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---| + | `bot_token` | Slack API bot token. | False | + | `user_token` | Slack API user token. | False | + | `app_token` | Slack API app token. | False | + | `incidentNotificationChannel` | Dedicated Slack channel to receive notifications. | False | + | `min_severity` | Minimum incident severity by which to send messages to Slack. | False | + | `incidentType` | Type of incidents created in Slack. | False | + | `allow_incidents` | Allow external users to create incidents via direct messages. | False | + | `proxy` | Use system proxy settings. | False | + | `unsecure` | Trust any certificate (not secure). Make sure to mark this parameter if you want the SlackBlockBuilder script to send a response back to the incident context. | False | + | `longRunning` | Long running instance. Required for investigation mirroring and direct messages. | False | + | `bot_name` | Bot display name in Slack (Cortex XSOAR by default). | False | + | `bot_icon` | Bot icon in Slack - Image URL (Cortex XSOAR icon by default). | False | + | `max_limit_time` | Maximum time to wait for a rate limiting call in seconds. | False | + | `paginated_count` | Number of objects to return in each paginated call. | False | + | `proxy_url` | Proxy URL to use in Slack API calls. | False | + | `filtered_tags` | Comma-separated list of tags by which to filter the messages sent from Cortex XSOAR. Only supported in Cortex XSOAR V6.1 and above. | False | + | `permitted_notifications` | Types of notifications to send (to individual users and to the dedicated Slack channel, if specified). | False | + | `common_channels` | For workspaces where a handful of channels are consistently being used, you may add them as a CSV in the format ChannelName:ChannelID. | False | + | `disable_caching` | When configured, Disable Caching will prevent the integration from paginating to search for Users or Conversations. Additionally, it will prevent excess data from being stored to the integration context. If this parameter is disabled, the instance may create high memory usage. | False | + | `mirroring` | Enable Incident Mirroring. | False | + | `enable_outbound_file_mirroring` | Enable Outbound File Mirroring. Whether to enable mirroring from xsoar to slack, mark it file mirroring is required in investigations. | False | + | `ignore_event_retries` | In some cases, events may not be processed fast enough. If you wish to attempt to retry the event, select `false`. Note that this can result in some responses being double-posted. Default is `True`. | False | + | `extensive_logging` | Extensive Logging. This parameter will write additional data to the logs and should only be used when you are directed to by XSOAR support. | False | 5. Click **Test** to validate the URLs, token, and connection. @@ -137,6 +137,12 @@ This will bring up a page which confirms that you are installing the app to your ![install-app-8](../../doc_files/SlackDocs_install_workspace8.png) +:::note +When utilizing long-running features such as mirroring or SlackAsk, each integration instance must have a dedicated bot +and tokens that should not be used elsewhere. Failure to comply with this requirement may result in issues with incoming +messages and the steady flow of the integration. +::: + ### Testing the Bot 1. Once you have configured the *Dedicated Slack channel to receive notifications* parameter, open Slack and invite your @@ -169,15 +175,15 @@ Mirrors the investigation between Slack and the Cortex XSOAR War Room. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| type | The mirroring type. Can be "all", which mirrors everything, "chat", which mirrors only chats (not commands), or "none", which stops all mirroring. Possible values are: all, chat, none. Default is all. | Optional | -| autoclose | Whether the channel is auto-closed when an investigation is closed. Can be "true" or "false". Default is "true". | Optional | -| direction | The mirroring direction. Can be "FromDemisto", "ToDemisto", or "Both". Default value is "Both". | Optional | -| mirrorTo | The channel type. Can be "channel" or "group". The default value is "group". | Optional | -| channelName | The name of the channel. The default is "incident-<incidentID>". | Optional | -| channelTopic | The topic of the channel. | Optional | -| kickAdmin | Whether to remove the Slack administrator (channel creator) from the mirrored channel. Possible values are: true, false. Default is false. | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| type | The mirroring type. Can be "all", which mirrors everything, "chat", which mirrors only chats (not commands), or "none", which stops all mirroring. Possible values are: all, chat, none. Default is all. | Optional | +| autoclose | Whether the channel is auto-closed when an investigation is closed. Can be "true" or "false". Default is "true". | Optional | +| direction | The mirroring direction. Can be "FromDemisto", "ToDemisto", or "Both". Default value is "Both". | Optional | +| mirrorTo | The channel type. Can be "channel" or "group". The default value is "group". | Optional | +| channelName | The name of the channel. The default is "incident-<incidentID>". | Optional | +| channelTopic | The topic of the channel. | Optional | +| kickAdmin | Whether to remove the Slack administrator (channel creator) from the mirrored channel. Possible values are: true, false. Default is false. | Optional | #### Context Output @@ -204,22 +210,22 @@ Sends a message to a user, group, or channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| message | The message content. When mentioning another Slack user, make sure to do so in the following format: <@user_name>. | Optional | -| to | The user to whom to send the message. Can be either the username or email address. | Optional | -| channel | The name of the Slack channel to which to send the message. | Optional | -| channel_id | The ID of the Slack channel to which to send the message. | Optional | -| entry | An entry ID to send as a link. | Optional | -| ignoreAddURL | Whether to include a URL to the relevant component in Cortex XSOAR. Can be "true" or "false". Default value is "false". | Optional | -| threadID | The ID of the thread to which to reply. Can be retrieved from a previous send-notification command. | Optional | -| blocks | A JSON string of Slack blocks to send in the message. | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|--------------------------------------------------------------------------------------------------------------------------|--------------| +| message | The message content. When mentioning another Slack user, make sure to do so in the following format: <@user_name>. | Optional | +| to | The user to whom to send the message. Can be either the username or email address. | Optional | +| channel | The name of the Slack channel to which to send the message. | Optional | +| channel_id | The ID of the Slack channel to which to send the message. | Optional | +| entry | An entry ID to send as a link. | Optional | +| ignoreAddURL | Whether to include a URL to the relevant component in Cortex XSOAR. Can be "true" or "false". Default value is "false". | Optional | +| threadID | The ID of the thread to which to reply. Can be retrieved from a previous send-notification command. | Optional | +| blocks | A JSON string of Slack blocks to send in the message. | Optional | #### Context Output -| **Path** | **Type** | **Description** | -| --- | --- | --- | -| Slack.Thread.ID | String | The Slack thread ID. | +| **Path** | **Type** | **Description** | +|-----------------|----------|----------------------| +| Slack.Thread.ID | String | The Slack thread ID. | #### Command Example @@ -229,11 +235,11 @@ Sends a message to a user, group, or channel. ```json { - "Slack": { - "Thread": { - "ID": "1624272821.000700" + "Slack": { + "Thread": { + "ID": "1624272821.000700" + } } - } } ``` @@ -253,10 +259,10 @@ Archives a Slack channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel | The name of the channel to archive. If not provided, the mirrored investigation channel is archived (if the channel exists). | Optional | -| channel_id | The ID of the channel to archive. If not provided, the mirrored investigation channel is archived (if the channel exists). | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|------------------------------------------------------------------------------------------------------------------------------|--------------| +| channel | The name of the channel to archive. If not provided, the mirrored investigation channel is archived (if the channel exists). | Optional | +| channel_id | The ID of the channel to archive. If not provided, the mirrored investigation channel is archived (if the channel exists). | Optional | #### Context Output @@ -284,15 +290,15 @@ the channel exists). #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| file | The ID of the file entry to send. | Required | -| to | The user to whom to send the file. Can be the username or the email address. | Optional | -| group | The name of the Slack group (private channel) to which to send the file. | Optional | -| channel | The name of the Slack channel to which to send the file. | Optional | -| channel_id | The ID of the Slack channel to which to send the file. | Optional | -| threadID | The ID of the thread to which to reply. Can be retrieved from a previous send-notification command. | Optional | -| comment | A comment to add to the file. | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|-----------------------------------------------------------------------------------------------------|--------------| +| file | The ID of the file entry to send. | Required | +| to | The user to whom to send the file. Can be the username or the email address. | Optional | +| group | The name of the Slack group (private channel) to which to send the file. | Optional | +| channel | The name of the Slack channel to which to send the file. | Optional | +| channel_id | The ID of the Slack channel to which to send the file. | Optional | +| threadID | The ID of the thread to which to reply. Can be retrieved from a previous send-notification command. | Optional | +| comment | A comment to add to the file. | Optional | #### Context Output @@ -319,11 +325,11 @@ Sets the topic for a channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel | The channel name. If not specified, the topic of the mirrored investigation channel is set (if the channel exists). | Optional | -| channel_id | The ID of the channel. If not specified, the topic of the mirrored investigation channel is set (if the channel exists). | Optional | -| topic | The topic for the channel. | Required | +| **Argument Name** | **Description** | **Required** | +|-------------------|--------------------------------------------------------------------------------------------------------------------------|--------------| +| channel | The channel name. If not specified, the topic of the mirrored investigation channel is set (if the channel exists). | Optional | +| channel_id | The ID of the channel. If not specified, the topic of the mirrored investigation channel is set (if the channel exists). | Optional | +| topic | The topic for the channel. | Required | #### Context Output @@ -350,29 +356,29 @@ Creates a channel in Slack. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| type | The channel type. Can be "private" or "public". Default is private. | Optional | -| name | The name of the channel. | Required | -| users | A CSV list of user names or email addresses to invite to the channel. For example: "user1, user2...". | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|-------------------------------------------------------------------------------------------------------|--------------| +| type | The channel type. Can be "private" or "public". Default is private. | Optional | +| name | The name of the channel. | Required | +| users | A CSV list of user names or email addresses to invite to the channel. For example: "user1, user2...". | Optional | #### Context Output -| **Path** | **Type** | **Description** | -| --- | --- | --- | -| Slack.Channel.ID | String | The ID of the channel. | -| Slack.Channel.Name | String | The name of the channel. | +| **Path** | **Type** | **Description** | +|--------------------|----------|--------------------------| +| Slack.Channel.ID | String | The ID of the channel. | +| Slack.Channel.Name | String | The name of the channel. | #### Context Example ```json { - "Slack": { - "Channel": { - "ID": "C0R2D2C3PO", - "Name": "random" + "Slack": { + "Channel": { + "ID": "C0R2D2C3PO", + "Name": "random" + } } - } } ``` @@ -397,11 +403,11 @@ Invites users to join a channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| users | A CSV list of usernames or email addresses to invite to join the channel. For example: "user1, user2...". | Required | -| channel | The name of the channel to which to invite the users. If the name of the channel is not specified, the name of the mirrored investigation channel is used (if the channel exists). | Optional | -| channel_id | The ID of the channel to which to invite the users. If the ID of the channel is not specified, the name of the mirrored investigation channel is used (if the channel exists). | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| users | A CSV list of usernames or email addresses to invite to join the channel. For example: "user1, user2...". | Required | +| channel | The name of the channel to which to invite the users. If the name of the channel is not specified, the name of the mirrored investigation channel is used (if the channel exists). | Optional | +| channel_id | The ID of the channel to which to invite the users. If the ID of the channel is not specified, the name of the mirrored investigation channel is used (if the channel exists). | Optional | #### Context Output @@ -428,11 +434,11 @@ Removes users from the specified channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| users | A CSV list of usernames or email addresses to remove from the a channel. For example: "user1, user2...". | Required | -| channel | The name of the channel from which to remove the users. If the name of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | -| channel_id | The ID of the channel from which to remove the users. If the ID of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| users | A CSV list of usernames or email addresses to remove from the a channel. For example: "user1, user2...". | Required | +| channel | The name of the channel from which to remove the users. If the name of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | +| channel_id | The ID of the channel from which to remove the users. If the ID of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | #### Context Output @@ -459,11 +465,11 @@ Renames a channel in Slack. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| name | The new name of the channel. | Required | -| channel | The current name of the channel. If the name of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | -| channel_id | The current ID of the channel. If the ID of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| name | The new name of the channel. | Required | +| channel | The current name of the channel. If the name of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | +| channel_id | The current ID of the channel. If the ID of the channel is not specified, the mirrored investigation channel is used (if the channel exists). | Optional | #### Context Output @@ -490,19 +496,19 @@ Get details about a specified user. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| user | The Slack user (username or email). | Required | +| **Argument Name** | **Description** | **Required** | +|-------------------|-------------------------------------|--------------| +| user | The Slack user (username or email). | Required | #### Context Output -| **Path** | **Type** | **Description** | -| --- | --- | --- | -| Slack.User.ID | String | The ID of the user. | -| Slack.User.Username | String | The username of the user. | -| Slack.User.Name | String | The actual name of the user. | -| Slack.User.DisplayName | String | The display name of the user. | -| Slack.User.Email | String | The email address of the user. | +| **Path** | **Type** | **Description** | +|------------------------|----------|--------------------------------| +| Slack.User.ID | String | The ID of the user. | +| Slack.User.Username | String | The username of the user. | +| Slack.User.Name | String | The actual name of the user. | +| Slack.User.DisplayName | String | The display name of the user. | +| Slack.User.Email | String | The email address of the user. | #### Command Example @@ -512,13 +518,13 @@ Get details about a specified user. ```json { - "Slack": { - "User": { - "ID": "U0XXXXXXXX", - "Name": "cortex_xsoar", - "Username": "demisto_integration" + "Slack": { + "User": { + "ID": "U0XXXXXXXX", + "Name": "cortex_xsoar", + "Username": "demisto_integration" + } } - } } ``` @@ -540,22 +546,22 @@ Edit an existing Slack message. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel | The channel the message is posted in. | Optional | -| channel_id | The ID of the channel the message is posted in. | Optional | -| threadID | The ID of the thread of which to edit. Can be retrieved from a previous send-notification command. | Required | -| message | The updated message. | Optional | -| blocks | A JSON string of the block to send. | Optional | -| ignore_add_url | Whether to include a URL to the relevant component in XSOAR. Can be "true" or "false". Default value is "false". | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|------------------------------------------------------------------------------------------------------------------|--------------| +| channel | The channel the message is posted in. | Optional | +| channel_id | The ID of the channel the message is posted in. | Optional | +| threadID | The ID of the thread of which to edit. Can be retrieved from a previous send-notification command. | Required | +| message | The updated message. | Optional | +| blocks | A JSON string of the block to send. | Optional | +| ignore_add_url | Whether to include a URL to the relevant component in XSOAR. Can be "true" or "false". Default value is "false". | Optional | #### Context Output -| **Path** | **Type** | **Description** | -| --- | --- | --- | -| Slack.Thread.ID | String | The timestamp identifier for the message. | -| Slack.Thread.Channel | String | The channel ID the message was posted in. | -| Slack.Thread.Text | String | The text the message was updated with. | +| **Path** | **Type** | **Description** | +|----------------------|----------|-------------------------------------------| +| Slack.Thread.ID | String | The timestamp identifier for the message. | +| Slack.Thread.Channel | String | The channel ID the message was posted in. | +| Slack.Thread.Text | String | The text the message was updated with. | #### Command Example @@ -565,13 +571,13 @@ Edit an existing Slack message. ```json { - "Slack": { - "Thread": { - "ID": "1629281551.001000", - "Channel": "C0XXXXXXXX", - "Text": "Eyy" + "Slack": { + "Thread": { + "ID": "1629281551.001000", + "Channel": "C0XXXXXXXX", + "Text": "Eyy" + } } - } } ``` @@ -590,11 +596,11 @@ Pins a selected message to the given channel. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel | The channel the message is posted in. | Optional | -| channel_id | The ID of the channel the message is posted in. | Optional | -| threadID | The ID of the thread of which to pin. Can be retrieved from a previous send-notification command. | Required | +| **Argument Name** | **Description** | **Required** | +|-------------------|---------------------------------------------------------------------------------------------------|--------------| +| channel | The channel the message is posted in. | Optional | +| channel_id | The ID of the channel the message is posted in. | Optional | +| threadID | The ID of the thread of which to pin. Can be retrieved from a previous send-notification command. | Required | #### Context Output @@ -608,7 +614,6 @@ There is no context output for this command. > The message was successfully pinned. - ### slack-get-integration-context *** @@ -637,17 +642,20 @@ Reset user session token in Slack. #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| user_id | The user id of the user. | Required | +| **Argument Name** | **Description** | **Required** | +|-------------------|--------------------------|--------------| +| user_id | The user id of the user. | Required | #### Context Output There is no context output for this command. + ### slack-list-channels *** -List all of the channels in the organization workspace. This command required scopes depend on the type of channel-like object you're working with. To use the command, you'll need at least one of the channels:, groups:, im: or mpim: scopes corresponding to the conversation type you're working with. +List all of the channels in the organization workspace. This command required scopes depend on the type of channel-like +object you're working with. To use the command, you'll need at least one of the channels:, groups:, im: or mpim: scopes +corresponding to the conversation type you're working with. #### Base Command @@ -655,23 +663,24 @@ List all of the channels in the organization workspace. This command required sc #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| name_filter | Supply this argument to only return channels with this name . | Optional | -| channel_types | Default is "public_channel". You can provide a comma separated list of other channels to include in your results. Possible options are: "public_channel", "private_channel", "mpim", and "im". Including these options may require changes to your Bot's OAuth scopes in order to read channels like private, group message, or personal messages. | Optional | -| exclude_archived | Default is true (exclude archived channels). This setting allows the command to read channels that have been archived. | Optional | -| limit | Default is 100. Set this argument to specify how many results to return. If you have more results than the limit you set, you will need to use the cursor argument to paginate your results. | Optional | -| cursor | Default is the first page of results. If you have more results than your limit, you need to paginate your results with this argument. This is found with the next_cursor attribute returned by a previous request's response_metadata . | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| name_filter | Supply this argument to only return channels with this name . | Optional | +| channel_types | Default is "public_channel". You can provide a comma separated list of other channels to include in your results. Possible options are: "public_channel", "private_channel", "mpim", and "im". Including these options may require changes to your Bot's OAuth scopes in order to read channels like private, group message, or personal messages. | Optional | +| exclude_archived | Default is true (exclude archived channels). This setting allows the command to read channels that have been archived. | Optional | +| limit | Default is 100. Set this argument to specify how many results to return. If you have more results than the limit you set, you will need to use the cursor argument to paginate your results. | Optional | +| cursor | Default is the first page of results. If you have more results than your limit, you need to paginate your results with this argument. This is found with the next_cursor attribute returned by a previous request's response_metadata . | Optional | #### Context Output -| **Path** | **Type** | **Description** | -| --- | --- | --- | -| Slack.Channels.ID | string | The ID for the channel | -| Slack.Channels.Name | string | Name of the channel | -| Slack.Channels.Created | number | Epoch timestamp when the channel was created | -| Slack.Channels.Creator | string | ID for the creator of the channel | -| Slack.Channels.Purpose | string | The purpose, or description, of the channel | +| **Path** | **Type** | **Description** | +|------------------------|----------|----------------------------------------------| +| Slack.Channels.ID | string | The ID for the channel | +| Slack.Channels.Name | string | Name of the channel | +| Slack.Channels.Created | number | Epoch timestamp when the channel was created | +| Slack.Channels.Creator | string | ID for the creator of the channel | +| Slack.Channels.Purpose | string | The purpose, or description, of the channel | + ### slack-get-conversation-history *** @@ -683,19 +692,21 @@ Fetches a conversation's history of messages and events #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel_id | The channel ID associated with the Slack channel. | Required | -| limit | Default is 100. Set this argument to specify how many results to return. If you have more results than the limit you set, you will need to use the cursor argument to paginate your results. | Optional | -| conversation_id | Conversation id. | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------| +| channel_id | The channel ID associated with the Slack channel. | Required | +| limit | Default is 100. Set this argument to specify how many results to return. If you have more results than the limit you set, you will need to use the cursor argument to paginate your results. | Optional | +| conversation_id | Conversation id. | Optional | #### Context Output There is no context output for this command. + ### slack-get-conversation-replies *** -Retrieves replies to specific messages, regardless of whether it's from a public or private channel, direct message, or otherwise. +Retrieves replies to specific messages, regardless of whether it's from a public or private channel, direct message, or +otherwise. #### Base Command @@ -703,11 +714,11 @@ Retrieves replies to specific messages, regardless of whether it's from a public #### Input -| **Argument Name** | **Description** | **Required** | -| --- | --- | --- | -| channel_id | ID of the channel. | Required | -| thread_id | ID of the thread. | Required | -| limit | limit. | Optional | +| **Argument Name** | **Description** | **Required** | +|-------------------|--------------------|--------------| +| channel_id | ID of the channel. | Required | +| thread_id | ID of the thread. | Required | +| limit | limit. | Optional | #### Context Output @@ -728,12 +739,17 @@ There is no context output for this command. channel" error. - Note: If a dedicated channel is configured, however there are no notifications being sent, verify that the *Types of Notifications* to send parameter is populated. -- ***mirror-investigation*** will only mirror chat messages between Cortex XSOAR and Slack. Images, threads, and files are not supported at this tme. +- ***mirror-investigation*** will only mirror chat messages between Cortex XSOAR and Slack. Images, threads, and files + are not supported at this tme. ## Troubleshooting -**Issue**: The survey sent from SlackBlockBuilder is sent to Slack and submitted successfully, but the response does not show up in context data in Cortex XSOAR. +**Issue**: The survey sent from SlackBlockBuilder is sent to Slack and submitted successfully, but the response does not +show up in context data in Cortex XSOAR. -**Resolution**: The most likely cause is that there is no API key entered into the Slack v3 integration instance settings, or the API key was not created by the default admin user. Ensure that an API key created by a default admin user is entered into the Slack v3 integration instance settings. Also, make sure to mark the **Trust any certificate (not secure)** integration parameter. +**Resolution**: The most likely cause is that there is no API key entered into the Slack v3 integration instance +settings, or the API key was not created by the default admin user. Ensure that an API key created by a default admin +user is entered into the Slack v3 integration instance settings. Also, make sure to mark the **Trust any certificate ( +not secure)** integration parameter. diff --git a/Packs/Slack/Integrations/SlackV3/SlackV3.py b/Packs/Slack/Integrations/SlackV3/SlackV3.py index 7bbf21773c71..3a38b2f17bab 100644 --- a/Packs/Slack/Integrations/SlackV3/SlackV3.py +++ b/Packs/Slack/Integrations/SlackV3/SlackV3.py @@ -1030,6 +1030,10 @@ def error(self, message): text = self.encode(message) self.messages.append(text) + def exception(self, message): + text = self.encode(message) + self.messages.append(text) + def warning(self, message): text = self.encode(message) self.messages.append(text) diff --git a/Packs/Slack/ReleaseNotes/3_4_13.md b/Packs/Slack/ReleaseNotes/3_4_13.md new file mode 100644 index 000000000000..01846153b91d --- /dev/null +++ b/Packs/Slack/ReleaseNotes/3_4_13.md @@ -0,0 +1,6 @@ + +#### Integrations + +##### Slack v3 + +Improved the integration error handling. diff --git a/Packs/Slack/pack_metadata.json b/Packs/Slack/pack_metadata.json index b6bebbd0cc53..fd586e14379d 100644 --- a/Packs/Slack/pack_metadata.json +++ b/Packs/Slack/pack_metadata.json @@ -2,7 +2,7 @@ "name": "Slack", "description": "Interact with Slack API - collect logs, send messages and notifications to your Slack team.", "support": "xsoar", - "currentVersion": "3.4.12", + "currentVersion": "3.4.13", "author": "Cortex XSOAR", "url": "https://www.paloaltonetworks.com/cortex", "email": "",