Skip to content

Commit

Permalink
[DOCS] Add block kit messages in Slack connector (elastic#177677)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0fcc69f)
  • Loading branch information
lcawl committed Mar 8, 2024
1 parent fe65d07 commit 2876403
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 8 deletions.
11 changes: 8 additions & 3 deletions docs/management/connectors/action-types/slack.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,19 @@ For Slack setup details, go to <<configuring-slack>>.
=== Test connectors

You can test connectors as you're creating or editing the connector in {kib}.
For example:
For the webhook type of connector, its message text cannot contain Markdown, images, or other advanced formatting:

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

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.
For the web API type of connector, you must choose one of the channel IDs.
You can then test either plain text or block kit messages:

[role="screenshot"]
image::management/connectors/images/slack-api-connector-test.png[Slack web API connector test]

After you add block kit messages you can click a link to preview them in the Slack block kit builder.

[float]
[[slack-connector-networking-configuration]]
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/management/connectors/images/slack-webhook-params.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions x-pack/plugins/actions/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -6102,7 +6102,7 @@
},
"text": {
"type": "string",
"description": "The Slack message text, which cannot contain Markdown, images, or other advanced formatting.",
"description": "The Slack message text. If it is a Slack webhook connector, the text cannot contain Markdown, images, or other advanced formatting. If it is a Slack web API connector, it can contain either plain text or block kit messages.\n",
"minLength": 1
}
}
Expand Down Expand Up @@ -7063,4 +7063,4 @@
}
}
}
}
}
3 changes: 2 additions & 1 deletion x-pack/plugins/actions/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4278,7 +4278,8 @@ components:
type: string
text:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
description: |
The Slack message text. If it is a Slack webhook connector, the text cannot contain Markdown, images, or other advanced formatting. If it is a Slack web API connector, it can contain either plain text or block kit messages.
minLength: 1
run_connector_subaction_validchannelid:
title: The validChannelId subaction
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4418,4 +4418,4 @@
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ properties:
type: string
text:
type: string
description: The Slack message text, which cannot contain Markdown, images, or other advanced formatting.
description: >
The Slack message text.
If it is a Slack webhook connector, the text cannot contain Markdown, images, or other advanced formatting.
If it is a Slack web API connector, it can contain either plain text or block kit messages.
minLength: 1

0 comments on commit 2876403

Please sign in to comment.