Skip to content

Commit

Permalink
[8.11] [DOCS] Slack api allowed channels (#169706) (#170572)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.11`:
- [[DOCS] Slack api allowed channels
(#169706)](#169706)

<!--- Backport version: 8.9.8 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"[email protected]"},"sourceCommit":{"committedDate":"2023-11-03T18:37:56Z","message":"[DOCS]
Slack api allowed channels
(#169706)","sha":"8716f659227a60e468fa61a4dec4c38df4174039","branchLabelMapping":{"^v8.12.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Actions/ConnectorTypes","backport:prev-minor","v8.11.0","v8.12.0"],"number":169706,"url":"https://github.com/elastic/kibana/pull/169706","mergeCommit":{"message":"[DOCS]
Slack api allowed channels
(#169706)","sha":"8716f659227a60e468fa61a4dec4c38df4174039"}},"sourceBranch":"main","suggestedTargetBranches":["8.11"],"targetPullRequestStates":[{"branch":"8.11","label":"v8.11.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.12.0","labelRegex":"^v8.12.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/169706","number":169706,"mergeCommit":{"message":"[DOCS]
Slack api allowed channels
(#169706)","sha":"8716f659227a60e468fa61a4dec4c38df4174039"}}]}]
BACKPORT-->
  • Loading branch information
lcawl authored Nov 6, 2023
1 parent 3b87810 commit 1dfec34
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 18 deletions.
23 changes: 10 additions & 13 deletions docs/management/connectors/action-types/slack.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,35 +21,31 @@ You can choose to use a webhook URL that's specific to a single channel. For exa
image::management/connectors/images/slack-webhook-connector.png[Slack connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

Alternatively, you can create a connector that supports multiple channels. For example:
Alternatively, you can create a connector that supports multiple channels.
For example:

[role="screenshot"]
image::management/connectors/images/slack-api-connector.png[Slack API connector]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

If you use the latter method, you choose your channel when you create a rule action.
Thus a connector can be used in multiple rules and actions to communicate with different channels.
If you use the latter method, you must provide a valid list of Slack channel IDs.
When you create a rule, each action can communicate with one of these channels.

For Slack setup details, go to <<configuring-slack>>.

[float]
[[slack-action-configuration]]
=== Test connectors

You can test connectors with the <<execute-connector-api,run connector API>> or
as you're creating or editing the connector in {kib}. For example:
You can test connectors as you're creating or editing the connector in {kib}.
For example:

[role="screenshot"]
image::management/connectors/images/slack-api-params.png[Slack API connector test]
image::management/connectors/images/slack-webhook-params.png[Slack webhook connector test]
// NOTE: This is an autogenerated screenshot. Do not edit it directly.

Slack actions have the following properties:

Channels::
One or more channels that your Slack app has access to.
This option is available only in the web API type of connector.

Message:: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
Slack connector actions have message text, which cannot contain Markdown, images, or other advanced formatting.
For the web API type of connector, you must also choose one of the channel IDs.

[float]
[[slack-connector-networking-configuration]]
Expand Down Expand Up @@ -83,3 +79,4 @@ Before you can create a Slack connector, you must configure your account and obt
. Copy the `Bot User OAuth Token` so you can paste it into your Slack connector form.
. If you need to send messages to a private channel, you need to write `/invite @App_name` in it.
Putting "@" triggers Slack to start auto-suggesting, which is why it then becomes easy to find your app name in the list.
. To find a channel ID (for example, `C123ABC456`), view the channel details.
Binary file modified docs/management/connectors/images/slack-api-connector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,7 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
await testSubjects.setValue('nameInput', 'Slack api test connector');
await testSubjects.setValue('secrets.token-input', 'xoxb-XXXX-XXXX-XXXX');
await commonScreenshots.takeScreenshot('slack-api-connector', screenshotDirectories);
await testSubjects.click('create-connector-flyout-save-test-btn');
await testSubjects.click('toastCloseButton');
await pageObjects.common.closeToast();
await commonScreenshots.takeScreenshot('slack-api-params', screenshotDirectories);
await testSubjects.click('euiFlyoutCloseButton');
await testSubjects.click('create-connector-flyout-back-btn');
});

it('slack webhook connector screenshots', async () => {
Expand Down

0 comments on commit 1dfec34

Please sign in to comment.