mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
# Backport This will backport the following commits from `main` to `8.8`: - [[RAM] Docs for slack improvements (#153885)](https://github.com/elastic/kibana/pull/153885) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Julia","email":"iuliia.guskova@elastic.co"},"sourceCommit":{"committedDate":"2023-05-05T07:32:45Z","message":"[RAM] Docs for slack improvements (#153885)\n\n## Summary\r\n\r\nDocs for new Slack connector\r\n\r\n### Preview\r\n\r\n\r\nhttps://kibana_153885.docs-preview.app.elstc.co/guide/en/kibana/master/slack-action-type.html\r\n\r\n---------\r\n\r\nCo-authored-by: lcawl <lcawley@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4dd6d1a277953098b4f308253a889ab50f0c4ef5","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","docs","Feature:Actions/ConnectorTypes","ui-copy","backport:prev-minor","v8.8.0","v8.9.0"],"number":153885,"url":"https://github.com/elastic/kibana/pull/153885","mergeCommit":{"message":"[RAM] Docs for slack improvements (#153885)\n\n## Summary\r\n\r\nDocs for new Slack connector\r\n\r\n### Preview\r\n\r\n\r\nhttps://kibana_153885.docs-preview.app.elstc.co/guide/en/kibana/master/slack-action-type.html\r\n\r\n---------\r\n\r\nCo-authored-by: lcawl <lcawley@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4dd6d1a277953098b4f308253a889ab50f0c4ef5"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/153885","number":153885,"mergeCommit":{"message":"[RAM] Docs for slack improvements (#153885)\n\n## Summary\r\n\r\nDocs for new Slack connector\r\n\r\n### Preview\r\n\r\n\r\nhttps://kibana_153885.docs-preview.app.elstc.co/guide/en/kibana/master/slack-action-type.html\r\n\r\n---------\r\n\r\nCo-authored-by: lcawl <lcawley@elastic.co>\r\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>","sha":"4dd6d1a277953098b4f308253a889ab50f0c4ef5"}}]}] BACKPORT--> --------- Co-authored-by: Julia <iuliia.guskova@elastic.co> Co-authored-by: Lisa Cawley <lcawley@elastic.co>
This commit is contained in:
parent
acc1e2ca63
commit
4a7d2b3211
27 changed files with 516 additions and 67 deletions
|
@ -46,7 +46,9 @@ Any modifications made to this file will be overwritten.
|
|||
<div class="field-items">
|
||||
<div class="param">spaceId (required)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div>
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — An identifier for the space. If <code>/s/</code> and the identifier are omitted from the path, the default space is used. default: null </div><div class="param">id (required)</div>
|
||||
|
||||
<div class="param-desc"><span class="param-type">Path Parameter</span> — An UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated. default: null </div>
|
||||
</div> <!-- field-items -->
|
||||
|
||||
<h3 class="field-label">Consumes</h3>
|
||||
|
@ -951,7 +953,8 @@ Any modifications made to this file will be overwritten.
|
|||
<li><a href="#connector_response_properties_servicenow"><code>connector_response_properties_servicenow</code> - Connector response properties for a ServiceNow ITSM connector</a></li>
|
||||
<li><a href="#connector_response_properties_servicenow_itom"><code>connector_response_properties_servicenow_itom</code> - Connector response properties for a ServiceNow ITOM connector</a></li>
|
||||
<li><a href="#connector_response_properties_servicenow_sir"><code>connector_response_properties_servicenow_sir</code> - Connector response properties for a ServiceNow SecOps connector</a></li>
|
||||
<li><a href="#connector_response_properties_slack"><code>connector_response_properties_slack</code> - Connector response properties for a Slack connector</a></li>
|
||||
<li><a href="#connector_response_properties_slack_api"><code>connector_response_properties_slack_api</code> - Connector response properties for a Slack connector</a></li>
|
||||
<li><a href="#connector_response_properties_slack_webhook"><code>connector_response_properties_slack_webhook</code> - Connector response properties for a Slack connector</a></li>
|
||||
<li><a href="#connector_response_properties_swimlane"><code>connector_response_properties_swimlane</code> - Connector response properties for a Swimlane connector</a></li>
|
||||
<li><a href="#connector_response_properties_teams"><code>connector_response_properties_teams</code> - Connector response properties for a Microsoft Teams connector</a></li>
|
||||
<li><a href="#connector_response_properties_tines"><code>connector_response_properties_tines</code> - Connector response properties for a Tines connector</a></li>
|
||||
|
@ -969,7 +972,8 @@ Any modifications made to this file will be overwritten.
|
|||
<li><a href="#create_connector_request_servicenow"><code>create_connector_request_servicenow</code> - Create ServiceNow ITSM connector request</a></li>
|
||||
<li><a href="#create_connector_request_servicenow_itom"><code>create_connector_request_servicenow_itom</code> - Create ServiceNow ITOM connector request</a></li>
|
||||
<li><a href="#create_connector_request_servicenow_sir"><code>create_connector_request_servicenow_sir</code> - Create ServiceNow SecOps connector request</a></li>
|
||||
<li><a href="#create_connector_request_slack"><code>create_connector_request_slack</code> - Create Slack connector request</a></li>
|
||||
<li><a href="#create_connector_request_slack_api"><code>create_connector_request_slack_api</code> - Create Slack connector request</a></li>
|
||||
<li><a href="#create_connector_request_slack_webhook"><code>create_connector_request_slack_webhook</code> - Create Slack connector request</a></li>
|
||||
<li><a href="#create_connector_request_swimlane"><code>create_connector_request_swimlane</code> - Create Swimlane connector request</a></li>
|
||||
<li><a href="#create_connector_request_teams"><code>create_connector_request_teams</code> - Create Microsoft Teams connector request</a></li>
|
||||
<li><a href="#create_connector_request_tines"><code>create_connector_request_tines</code> - Create Tines connector request</a></li>
|
||||
|
@ -1015,6 +1019,8 @@ Any modifications made to this file will be overwritten.
|
|||
<li><a href="#secrets_properties_opsgenie"><code>secrets_properties_opsgenie</code> - Connector secrets properties for an Opsgenie connector</a></li>
|
||||
<li><a href="#secrets_properties_resilient"><code>secrets_properties_resilient</code> - Connector secrets properties for IBM Resilient connector</a></li>
|
||||
<li><a href="#secrets_properties_servicenow"><code>secrets_properties_servicenow</code> - Connector secrets properties for ServiceNow ITOM, ServiceNow ITSM, and ServiceNow SecOps connectors</a></li>
|
||||
<li><a href="#secrets_properties_slack_api"><code>secrets_properties_slack_api</code> - Connector secrets properties for a Web API Slack connector</a></li>
|
||||
<li><a href="#secrets_properties_slack_webhook"><code>secrets_properties_slack_webhook</code> - Connector secrets properties for a Webhook Slack connector</a></li>
|
||||
<li><a href="#secrets_properties_swimlane"><code>secrets_properties_swimlane</code> - Connector secrets properties for a Swimlane connector</a></li>
|
||||
<li><a href="#updateConnector_400_response"><code>updateConnector_400_response</code> - </a></li>
|
||||
<li><a href="#update_connector_request_cases_webhook"><code>update_connector_request_cases_webhook</code> - Update Webhook - Case Managment connector request</a></li>
|
||||
|
@ -1025,6 +1031,8 @@ Any modifications made to this file will be overwritten.
|
|||
<li><a href="#update_connector_request_serverlog"><code>update_connector_request_serverlog</code> - Update server log connector request</a></li>
|
||||
<li><a href="#update_connector_request_servicenow"><code>update_connector_request_servicenow</code> - Update ServiceNow ITSM connector or ServiceNow SecOps request</a></li>
|
||||
<li><a href="#update_connector_request_servicenow_itom"><code>update_connector_request_servicenow_itom</code> - Create ServiceNow ITOM connector request</a></li>
|
||||
<li><a href="#update_connector_request_slack_api"><code>update_connector_request_slack_api</code> - Update Slack connector request</a></li>
|
||||
<li><a href="#update_connector_request_slack_webhook"><code>update_connector_request_slack_webhook</code> - Update Slack connector request</a></li>
|
||||
<li><a href="#update_connector_request_swimlane"><code>update_connector_request_swimlane</code> - Update Swimlane connector request</a></li>
|
||||
</ol>
|
||||
|
||||
|
@ -1543,7 +1551,21 @@ Any modifications made to this file will be overwritten.
|
|||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="connector_response_properties_slack"><code>connector_response_properties_slack</code> - Connector response properties for a Slack connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<h3><a name="connector_response_properties_slack_api"><code>connector_response_properties_slack_api</code> - Connector response properties for a Slack connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
<div class="field-items">
|
||||
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The type of connector. </div>
|
||||
<div class="param-enum-header">Enum:</div>
|
||||
<div class="param-enum">.slack_api</div>
|
||||
<div class="param">id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the connector. </div>
|
||||
<div class="param">is_deprecated </div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether the connector type is deprecated. </div>
|
||||
<div class="param">is_missing_secrets (optional)</div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether secrets are missing for the connector. Secrets configuration properties vary depending on the connector type. </div>
|
||||
<div class="param">is_preconfigured </div><div class="param-desc"><span class="param-type"><a href="#boolean">Boolean</a></span> Indicates whether it is a preconfigured connector. If true, the <code>config</code> and <code>is_missing_secrets</code> properties are omitted from the response. </div>
|
||||
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="connector_response_properties_slack_webhook"><code>connector_response_properties_slack_webhook</code> - Connector response properties for a Slack connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
<div class="field-items">
|
||||
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The type of connector. </div>
|
||||
|
@ -1766,14 +1788,25 @@ Any modifications made to this file will be overwritten.
|
|||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="create_connector_request_slack"><code>create_connector_request_slack</code> - Create Slack connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<h3><a name="create_connector_request_slack_api"><code>create_connector_request_slack_api</code> - Create Slack connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>The Slack connector uses Slack Incoming Webhooks.</div>
|
||||
<div class="field-items">
|
||||
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The type of connector. </div>
|
||||
<div class="param-enum-header">Enum:</div>
|
||||
<div class="param-enum">.slack_api</div>
|
||||
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
|
||||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#secrets_properties_slack_api">secrets_properties_slack_api</a></span> </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="create_connector_request_slack_webhook"><code>create_connector_request_slack_webhook</code> - Create Slack connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>The Slack connector uses Slack Incoming Webhooks.</div>
|
||||
<div class="field-items">
|
||||
<div class="param">connector_type_id </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The type of connector. </div>
|
||||
<div class="param-enum-header">Enum:</div>
|
||||
<div class="param-enum">.slack</div>
|
||||
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
|
||||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#AnyType">map[String, oas_any_type_not_mapped]</a></span> Defines secrets for connectors when type is <code>.slack</code>. </div>
|
||||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#secrets_properties_slack_webhook">secrets_properties_slack_webhook</a></span> </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
|
@ -2220,6 +2253,20 @@ Any modifications made to this file will be overwritten.
|
|||
<div class="param">username (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The username for HTTP basic authentication. This property is required when <code>isOAuth</code> is <code>false</code>. </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="secrets_properties_slack_api"><code>secrets_properties_slack_api</code> - Connector secrets properties for a Web API Slack connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>Defines secrets for connectors when type is <code>.slack</code>.</div>
|
||||
<div class="field-items">
|
||||
<div class="param">token </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Slack bot user OAuth token. </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="secrets_properties_slack_webhook"><code>secrets_properties_slack_webhook</code> - Connector secrets properties for a Webhook Slack connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>Defines secrets for connectors when type is <code>.slack</code>.</div>
|
||||
<div class="field-items">
|
||||
<div class="param">webhookUrl </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> Slack webhook url. </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="secrets_properties_swimlane"><code>secrets_properties_swimlane</code> - Connector secrets properties for a Swimlane connector</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'>Defines secrets for connectors when type is <code>.swimlane</code>.</div>
|
||||
|
@ -2305,6 +2352,22 @@ Any modifications made to this file will be overwritten.
|
|||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#secrets_properties_servicenow">secrets_properties_servicenow</a></span> </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="update_connector_request_slack_api"><code>update_connector_request_slack_api</code> - Update Slack connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
<div class="field-items">
|
||||
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
|
||||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#">secrets_properties_slack_api</a></span> </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="update_connector_request_slack_webhook"><code>update_connector_request_slack_webhook</code> - Update Slack connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
<div class="field-items">
|
||||
<div class="param">name </div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The display name for the connector. </div>
|
||||
<div class="param">secrets </div><div class="param-desc"><span class="param-type"><a href="#">secrets_properties_slack_webhook</a></span> </div>
|
||||
</div> <!-- field-items -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<h3><a name="update_connector_request_swimlane"><code>update_connector_request_swimlane</code> - Update Swimlane connector request</a> <a class="up" href="#__Models">Up</a></h3>
|
||||
<div class='model-description'></div>
|
||||
|
|
|
@ -4,26 +4,29 @@
|
|||
<titleabbrev>Slack</titleabbrev>
|
||||
++++
|
||||
|
||||
The Slack connector uses https://api.slack.com/incoming-webhooks[Slack Incoming Webhooks].
|
||||
The Slack connector uses incoming webhooks or an API method to send Slack messages.
|
||||
|
||||
[float]
|
||||
[[define-slack-ui]]
|
||||
=== Create connectors in {kib}
|
||||
|
||||
You can create connectors in *{stack-manage-app} > {connectors-ui}*
|
||||
or as needed when you're creating a rule. For example:
|
||||
You can create connectors in *{stack-manage-app} > {connectors-ui}* or as needed when you're creating a rule.
|
||||
You can choose to use a webhook URL that's specific to a single channel. For example:
|
||||
|
||||
[role="screenshot"]
|
||||
image::management/connectors/images/slack-connector.png[Slack connector]
|
||||
image::management/connectors/images/slack-webhook-connector.png[Slack connector]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
[float]
|
||||
[[slack-connector-configuration]]
|
||||
==== Connector configuration
|
||||
Alternatively, you can create a connector that supports multiple channels. For example:
|
||||
|
||||
Slack connectors have the following configuration properties:
|
||||
[role="screenshot"]
|
||||
image::management/connectors/images/slack-api-connector.png[Slack API connector]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
Name:: The name of the connector.
|
||||
Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messaging/webhooks#getting_started[Slack Incoming Webhooks] for instructions on generating this URL. If you are using the <<action-settings, `xpack.actions.allowedHosts`>> setting, make sure the hostname is added to the allowed hosts.
|
||||
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.
|
||||
|
||||
For Slack setup details, go to <<configuring-slack>>.
|
||||
|
||||
[float]
|
||||
[[preconfigured-slack-configuration]]
|
||||
|
@ -31,21 +34,30 @@ Webhook URL:: The URL of the incoming webhook. See https://api.slack.com/messa
|
|||
|
||||
If you are running {kib} on-prem, you can define connectors by
|
||||
adding `xpack.actions.preconfigured` settings to your `kibana.yml` file.
|
||||
For example:
|
||||
|
||||
.Example Slack connector with webhook
|
||||
[source,text]
|
||||
--
|
||||
xpack.actions.preconfigured:
|
||||
my-slack:
|
||||
name: preconfigured-slack-connector-type
|
||||
name: preconfigured-slack-webhook-connector-type
|
||||
actionTypeId: .slack
|
||||
secrets:
|
||||
webhookUrl: 'https://hooks.slack.com/services/abcd/efgh/ijklmnopqrstuvwxyz'
|
||||
webhookUrl: 'https://hooks.slack.com/services/xxxx/xxxx/xxxx' <1>
|
||||
--
|
||||
<1> To obtain this value, go to <<configuring-slack-webhook>>.
|
||||
|
||||
Secrets defines sensitive information for the connector type.
|
||||
|
||||
`webhookUrl`:: A string that corresponds to *Webhook URL*.
|
||||
.Example Slack connector with web API
|
||||
[source,text]
|
||||
--
|
||||
xpack.actions.preconfigured:
|
||||
my-slack:
|
||||
name: preconfigured-slack-api-connector-type
|
||||
actionTypeId: .slack_api
|
||||
secrets:
|
||||
token: 'xoxb-xxxx-xxxx-xxxx' <1>
|
||||
--
|
||||
<1> To obtain this value, go to <<configuring-slack-web-api>>.
|
||||
|
||||
[float]
|
||||
[[slack-action-configuration]]
|
||||
|
@ -55,30 +67,46 @@ 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:
|
||||
|
||||
[role="screenshot"]
|
||||
image::management/connectors/images/slack-params-test.png[Slack params test]
|
||||
image::management/connectors/images/slack-api-params.png[Slack API connector test]
|
||||
// NOTE: This is an autogenerated screenshot. Do not edit it directly.
|
||||
|
||||
Slack actions have the following properties:
|
||||
|
||||
Message:: The message text, converted to the `text` field in the Webhook JSON payload. Currently only the text field is supported. Markdown, images, and other advanced formatting are not yet supported.
|
||||
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.
|
||||
|
||||
[float]
|
||||
[[slack-connector-networking-configuration]]
|
||||
=== Connector networking configuration
|
||||
|
||||
Use the <<action-settings,Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings. You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.
|
||||
Use the <<action-settings,Action configuration settings>> to customize connector networking configurations, such as proxies, certificates, or TLS settings.
|
||||
You can set configurations that apply to all your connectors or use `xpack.actions.customHostSettings` to set per-host configurations.
|
||||
|
||||
[float]
|
||||
[[configuring-slack]]
|
||||
==== Configure a Slack account
|
||||
=== Configure a Slack account
|
||||
|
||||
You need a https://api.slack.com/incoming-webhooks[Slack webhook URL] to
|
||||
configure a Slack account. To create a webhook
|
||||
URL, set up an an **Incoming Webhook Integration** through the Slack console:
|
||||
Before you can create a Slack connector, you must configure your account and obtain the necessary URL or token.
|
||||
|
||||
[float]
|
||||
[[configuring-slack-webhook]]
|
||||
==== Configure a Slack account for incoming webhooks
|
||||
|
||||
. Log in to http://slack.com[slack.com] as a team administrator.
|
||||
. Go to https://my.slack.com/services/new/incoming-webhook.
|
||||
. Select a default channel for the integration.
|
||||
+
|
||||
image::images/slack-add-webhook-integration.png[]
|
||||
. Click *Add Incoming Webhook Integration*.
|
||||
. Create a Slack app, enable incoming webhooks, then create an incoming webhook. Refer to https://api.slack.com/messaging/webhooks.
|
||||
. Copy the generated webhook URL so you can paste it into your Slack connector form.
|
||||
. If you are using the <<action-settings,`xpack.actions.allowedHosts`>> setting, make sure the hostname from the URL is added to the allowed hosts.
|
||||
|
||||
[float]
|
||||
[[configuring-slack-web-api]]
|
||||
==== Configure a Slack account for Web API
|
||||
|
||||
. Create a Slack app. Refer to https://api.slack.com/authentication/basics#creating.
|
||||
. Add scope: `channels:read`, `groups:read`, `chat:write` and `chat:write.public`. Refer to https://api.slack.com/authentication/basics#scopes.
|
||||
. Install the app to a workspace. Refer to https://api.slack.com/authentication/basics#installing.
|
||||
. 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.
|
||||
|
|
BIN
docs/management/connectors/images/slack-api-connector.png
Normal file
BIN
docs/management/connectors/images/slack-api-connector.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 126 KiB |
BIN
docs/management/connectors/images/slack-api-params.png
Normal file
BIN
docs/management/connectors/images/slack-api-params.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 113 KiB |
Binary file not shown.
Before Width: | Height: | Size: 121 KiB |
Binary file not shown.
Before Width: | Height: | Size: 107 KiB |
BIN
docs/management/connectors/images/slack-webhook-connector.png
Normal file
BIN
docs/management/connectors/images/slack-webhook-connector.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 146 KiB |
|
@ -39,6 +39,16 @@
|
|||
},
|
||||
{
|
||||
"$ref": "#/components/parameters/space_id"
|
||||
},
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"description": "An UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.\n",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"example": "ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74"
|
||||
}
|
||||
}
|
||||
],
|
||||
"requestBody": {
|
||||
|
@ -83,7 +93,10 @@
|
|||
"$ref": "#/components/schemas/create_connector_request_servicenow_sir"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/create_connector_request_slack"
|
||||
"$ref": "#/components/schemas/create_connector_request_slack_api"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/create_connector_request_slack_webhook"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/create_connector_request_swimlane"
|
||||
|
@ -317,6 +330,12 @@
|
|||
{
|
||||
"$ref": "#/components/schemas/update_connector_request_servicenow_itom"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/update_connector_request_slack_api"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/update_connector_request_slack_webhook"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/update_connector_request_swimlane"
|
||||
}
|
||||
|
@ -1945,13 +1964,63 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"secrets_properties_slack": {
|
||||
"title": "Connector secrets properties for a Slack connector",
|
||||
"secrets_properties_slack_api": {
|
||||
"title": "Connector secrets properties for a Web API Slack connector",
|
||||
"description": "Defines secrets for connectors when type is `.slack`.",
|
||||
"required": [
|
||||
"token"
|
||||
],
|
||||
"type": "object",
|
||||
"additionalProperties": true
|
||||
"properties": {
|
||||
"token": {
|
||||
"type": "string",
|
||||
"description": "Slack bot user OAuth token."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create_connector_request_slack": {
|
||||
"create_connector_request_slack_api": {
|
||||
"title": "Create Slack connector request",
|
||||
"description": "The Slack connector uses Slack Incoming Webhooks.",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"connector_type_id",
|
||||
"name",
|
||||
"secrets"
|
||||
],
|
||||
"properties": {
|
||||
"connector_type_id": {
|
||||
"type": "string",
|
||||
"description": "The type of connector.",
|
||||
"enum": [
|
||||
".slack_api"
|
||||
],
|
||||
"example": ".slack_api"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The display name for the connector.",
|
||||
"example": "my-connector"
|
||||
},
|
||||
"secrets": {
|
||||
"$ref": "#/components/schemas/secrets_properties_slack_api"
|
||||
}
|
||||
}
|
||||
},
|
||||
"secrets_properties_slack_webhook": {
|
||||
"title": "Connector secrets properties for a Webhook Slack connector",
|
||||
"description": "Defines secrets for connectors when type is `.slack`.",
|
||||
"required": [
|
||||
"webhookUrl"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"webhookUrl": {
|
||||
"type": "string",
|
||||
"description": "Slack webhook url."
|
||||
}
|
||||
}
|
||||
},
|
||||
"create_connector_request_slack_webhook": {
|
||||
"title": "Create Slack connector request",
|
||||
"description": "The Slack connector uses Slack Incoming Webhooks.",
|
||||
"type": "object",
|
||||
|
@ -1975,7 +2044,7 @@
|
|||
"example": "my-connector"
|
||||
},
|
||||
"secrets": {
|
||||
"$ref": "#/components/schemas/secrets_properties_slack"
|
||||
"$ref": "#/components/schemas/secrets_properties_slack_webhook"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -2894,7 +2963,44 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"connector_response_properties_slack": {
|
||||
"connector_response_properties_slack_api": {
|
||||
"title": "Connector response properties for a Slack connector",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"connector_type_id",
|
||||
"id",
|
||||
"is_deprecated",
|
||||
"is_preconfigured",
|
||||
"name"
|
||||
],
|
||||
"properties": {
|
||||
"connector_type_id": {
|
||||
"type": "string",
|
||||
"description": "The type of connector.",
|
||||
"enum": [
|
||||
".slack_api"
|
||||
]
|
||||
},
|
||||
"id": {
|
||||
"type": "string",
|
||||
"description": "The identifier for the connector."
|
||||
},
|
||||
"is_deprecated": {
|
||||
"$ref": "#/components/schemas/is_deprecated"
|
||||
},
|
||||
"is_missing_secrets": {
|
||||
"$ref": "#/components/schemas/is_missing_secrets"
|
||||
},
|
||||
"is_preconfigured": {
|
||||
"$ref": "#/components/schemas/is_preconfigured"
|
||||
},
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The display name for the connector."
|
||||
}
|
||||
}
|
||||
},
|
||||
"connector_response_properties_slack_webhook": {
|
||||
"title": "Connector response properties for a Slack connector",
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
@ -3170,7 +3276,10 @@
|
|||
"$ref": "#/components/schemas/connector_response_properties_servicenow_sir"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/connector_response_properties_slack"
|
||||
"$ref": "#/components/schemas/connector_response_properties_slack_api"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/connector_response_properties_slack_webhook"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/connector_response_properties_swimlane"
|
||||
|
@ -3348,6 +3457,44 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"update_connector_request_slack_api": {
|
||||
"title": "Update Slack connector request",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"secrets"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The display name for the connector."
|
||||
},
|
||||
"secrets": {
|
||||
"type": "object",
|
||||
"description": "The secrets object containing the necessary fields for authentication.",
|
||||
"$ref": "#/components/schemas/secrets_properties_slack_api"
|
||||
}
|
||||
}
|
||||
},
|
||||
"update_connector_request_slack_webhook": {
|
||||
"title": "Update Slack connector request",
|
||||
"type": "object",
|
||||
"required": [
|
||||
"name",
|
||||
"secrets"
|
||||
],
|
||||
"properties": {
|
||||
"name": {
|
||||
"type": "string",
|
||||
"description": "The display name for the connector."
|
||||
},
|
||||
"secrets": {
|
||||
"type": "object",
|
||||
"description": "The secrets object containing the necessary fields for authentication.",
|
||||
"$ref": "#/components/schemas/secrets_properties_slack_webhook"
|
||||
}
|
||||
}
|
||||
},
|
||||
"update_connector_request_swimlane": {
|
||||
"title": "Update Swimlane connector request",
|
||||
"type": "object",
|
||||
|
|
|
@ -26,6 +26,14 @@ paths:
|
|||
parameters:
|
||||
- $ref: '#/components/parameters/kbn_xsrf'
|
||||
- $ref: '#/components/parameters/space_id'
|
||||
- in: path
|
||||
name: id
|
||||
description: |
|
||||
An UUID v1 or v4 identifier for the connector. If you omit this parameter, an identifier is randomly generated.
|
||||
required: true
|
||||
schema:
|
||||
type: string
|
||||
example: ac4e6b90-6be7-11eb-ba0d-9b1c1f912d74
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
|
@ -45,7 +53,8 @@ paths:
|
|||
- $ref: '#/components/schemas/create_connector_request_servicenow'
|
||||
- $ref: '#/components/schemas/create_connector_request_servicenow_itom'
|
||||
- $ref: '#/components/schemas/create_connector_request_servicenow_sir'
|
||||
- $ref: '#/components/schemas/create_connector_request_slack'
|
||||
- $ref: '#/components/schemas/create_connector_request_slack_api'
|
||||
- $ref: '#/components/schemas/create_connector_request_slack_webhook'
|
||||
- $ref: '#/components/schemas/create_connector_request_swimlane'
|
||||
- $ref: '#/components/schemas/create_connector_request_teams'
|
||||
- $ref: '#/components/schemas/create_connector_request_tines'
|
||||
|
@ -174,6 +183,8 @@ paths:
|
|||
- $ref: '#/components/schemas/update_connector_request_serverlog'
|
||||
- $ref: '#/components/schemas/update_connector_request_servicenow'
|
||||
- $ref: '#/components/schemas/update_connector_request_servicenow_itom'
|
||||
- $ref: '#/components/schemas/update_connector_request_slack_api'
|
||||
- $ref: '#/components/schemas/update_connector_request_slack_webhook'
|
||||
- $ref: '#/components/schemas/update_connector_request_swimlane'
|
||||
examples:
|
||||
updateIndexConnectorRequest:
|
||||
|
@ -1297,12 +1308,48 @@ components:
|
|||
example: my-connector
|
||||
secrets:
|
||||
$ref: '#/components/schemas/secrets_properties_servicenow'
|
||||
secrets_properties_slack:
|
||||
title: Connector secrets properties for a Slack connector
|
||||
secrets_properties_slack_api:
|
||||
title: Connector secrets properties for a Web API Slack connector
|
||||
description: Defines secrets for connectors when type is `.slack`.
|
||||
required:
|
||||
- token
|
||||
type: object
|
||||
additionalProperties: true
|
||||
create_connector_request_slack:
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
description: Slack bot user OAuth token.
|
||||
create_connector_request_slack_api:
|
||||
title: Create Slack connector request
|
||||
description: The Slack connector uses Slack Incoming Webhooks.
|
||||
type: object
|
||||
required:
|
||||
- connector_type_id
|
||||
- name
|
||||
- secrets
|
||||
properties:
|
||||
connector_type_id:
|
||||
type: string
|
||||
description: The type of connector.
|
||||
enum:
|
||||
- .slack_api
|
||||
example: .slack_api
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
example: my-connector
|
||||
secrets:
|
||||
$ref: '#/components/schemas/secrets_properties_slack_api'
|
||||
secrets_properties_slack_webhook:
|
||||
title: Connector secrets properties for a Webhook Slack connector
|
||||
description: Defines secrets for connectors when type is `.slack`.
|
||||
required:
|
||||
- webhookUrl
|
||||
type: object
|
||||
properties:
|
||||
webhookUrl:
|
||||
type: string
|
||||
description: Slack webhook url.
|
||||
create_connector_request_slack_webhook:
|
||||
title: Create Slack connector request
|
||||
description: The Slack connector uses Slack Incoming Webhooks.
|
||||
type: object
|
||||
|
@ -1322,7 +1369,7 @@ components:
|
|||
description: The display name for the connector.
|
||||
example: my-connector
|
||||
secrets:
|
||||
$ref: '#/components/schemas/secrets_properties_slack'
|
||||
$ref: '#/components/schemas/secrets_properties_slack_webhook'
|
||||
config_properties_swimlane:
|
||||
title: Connector request properties for a Swimlane connector
|
||||
required:
|
||||
|
@ -2010,7 +2057,34 @@ components:
|
|||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
connector_response_properties_slack:
|
||||
connector_response_properties_slack_api:
|
||||
title: Connector response properties for a Slack connector
|
||||
type: object
|
||||
required:
|
||||
- connector_type_id
|
||||
- id
|
||||
- is_deprecated
|
||||
- is_preconfigured
|
||||
- name
|
||||
properties:
|
||||
connector_type_id:
|
||||
type: string
|
||||
description: The type of connector.
|
||||
enum:
|
||||
- .slack_api
|
||||
id:
|
||||
type: string
|
||||
description: The identifier for the connector.
|
||||
is_deprecated:
|
||||
$ref: '#/components/schemas/is_deprecated'
|
||||
is_missing_secrets:
|
||||
$ref: '#/components/schemas/is_missing_secrets'
|
||||
is_preconfigured:
|
||||
$ref: '#/components/schemas/is_preconfigured'
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
connector_response_properties_slack_webhook:
|
||||
title: Connector response properties for a Slack connector
|
||||
type: object
|
||||
required:
|
||||
|
@ -2199,7 +2273,8 @@ components:
|
|||
- $ref: '#/components/schemas/connector_response_properties_servicenow'
|
||||
- $ref: '#/components/schemas/connector_response_properties_servicenow_itom'
|
||||
- $ref: '#/components/schemas/connector_response_properties_servicenow_sir'
|
||||
- $ref: '#/components/schemas/connector_response_properties_slack'
|
||||
- $ref: '#/components/schemas/connector_response_properties_slack_api'
|
||||
- $ref: '#/components/schemas/connector_response_properties_slack_webhook'
|
||||
- $ref: '#/components/schemas/connector_response_properties_swimlane'
|
||||
- $ref: '#/components/schemas/connector_response_properties_teams'
|
||||
- $ref: '#/components/schemas/connector_response_properties_tines'
|
||||
|
@ -2318,6 +2393,34 @@ components:
|
|||
description: The display name for the connector.
|
||||
secrets:
|
||||
$ref: '#/components/schemas/secrets_properties_servicenow'
|
||||
update_connector_request_slack_api:
|
||||
title: Update Slack connector request
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- secrets
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
secrets:
|
||||
type: object
|
||||
description: The secrets object containing the necessary fields for authentication.
|
||||
$ref: '#/components/schemas/secrets_properties_slack_api'
|
||||
update_connector_request_slack_webhook:
|
||||
title: Update Slack connector request
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- secrets
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
secrets:
|
||||
type: object
|
||||
description: The secrets object containing the necessary fields for authentication.
|
||||
$ref: '#/components/schemas/secrets_properties_slack_webhook'
|
||||
update_connector_request_swimlane:
|
||||
title: Update Swimlane connector request
|
||||
type: object
|
||||
|
|
|
@ -12,7 +12,8 @@ oneOf:
|
|||
- $ref: 'connector_response_properties_servicenow.yaml'
|
||||
- $ref: 'connector_response_properties_servicenow_itom.yaml'
|
||||
- $ref: 'connector_response_properties_servicenow_sir.yaml'
|
||||
- $ref: 'connector_response_properties_slack.yaml'
|
||||
- $ref: 'connector_response_properties_slack_api.yaml'
|
||||
- $ref: 'connector_response_properties_slack_webhook.yaml'
|
||||
- $ref: 'connector_response_properties_swimlane.yaml'
|
||||
- $ref: 'connector_response_properties_teams.yaml'
|
||||
- $ref: 'connector_response_properties_tines.yaml'
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
title: Connector response properties for a Slack connector
|
||||
type: object
|
||||
required:
|
||||
- connector_type_id
|
||||
- id
|
||||
- is_deprecated
|
||||
- is_preconfigured
|
||||
- name
|
||||
properties:
|
||||
connector_type_id:
|
||||
type: string
|
||||
description: The type of connector.
|
||||
enum:
|
||||
- .slack_api
|
||||
id:
|
||||
type: string
|
||||
description: The identifier for the connector.
|
||||
is_deprecated:
|
||||
$ref: 'is_deprecated.yaml'
|
||||
is_missing_secrets:
|
||||
$ref: 'is_missing_secrets.yaml'
|
||||
is_preconfigured:
|
||||
$ref: 'is_preconfigured.yaml'
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
|
@ -16,7 +16,7 @@ properties:
|
|||
type: string
|
||||
description: The identifier for the connector.
|
||||
is_deprecated:
|
||||
$ref: 'is_deprecated.yaml'
|
||||
$ref: 'is_deprecated.yaml'
|
||||
is_missing_secrets:
|
||||
$ref: 'is_missing_secrets.yaml'
|
||||
is_preconfigured:
|
|
@ -0,0 +1,20 @@
|
|||
title: Create Slack connector request
|
||||
description: The Slack connector uses Slack Incoming Webhooks.
|
||||
type: object
|
||||
required:
|
||||
- connector_type_id
|
||||
- name
|
||||
- secrets
|
||||
properties:
|
||||
connector_type_id:
|
||||
type: string
|
||||
description: The type of connector.
|
||||
enum:
|
||||
- .slack_api
|
||||
example: .slack_api
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
example: my-connector
|
||||
secrets:
|
||||
$ref: 'secrets_properties_slack_api.yaml'
|
|
@ -17,4 +17,4 @@ properties:
|
|||
description: The display name for the connector.
|
||||
example: my-connector
|
||||
secrets:
|
||||
$ref: 'secrets_properties_slack.yaml'
|
||||
$ref: 'secrets_properties_slack_webhook.yaml'
|
|
@ -1,5 +0,0 @@
|
|||
title: Connector secrets properties for a Slack connector
|
||||
description: Defines secrets for connectors when type is `.slack`.
|
||||
type: object
|
||||
additionalProperties: true
|
||||
# TO-DO: Add the properties for this connector.
|
|
@ -0,0 +1,9 @@
|
|||
title: Connector secrets properties for a Web API Slack connector
|
||||
description: Defines secrets for connectors when type is `.slack`.
|
||||
required:
|
||||
- token
|
||||
type: object
|
||||
properties:
|
||||
token:
|
||||
type: string
|
||||
description: Slack bot user OAuth token.
|
|
@ -0,0 +1,9 @@
|
|||
title: Connector secrets properties for a Webhook Slack connector
|
||||
description: Defines secrets for connectors when type is `.slack`.
|
||||
required:
|
||||
- webhookUrl
|
||||
type: object
|
||||
properties:
|
||||
webhookUrl:
|
||||
type: string
|
||||
description: Slack webhook url.
|
|
@ -8,4 +8,6 @@ properties:
|
|||
type: string
|
||||
description: The display name for the connector.
|
||||
secrets:
|
||||
$ref: 'secrets_properties_slack.yaml'
|
||||
type: object
|
||||
description: The secrets object containing the necessary fields for authentication.
|
||||
$ref: 'secrets_properties_slack_api.yaml'
|
|
@ -0,0 +1,13 @@
|
|||
title: Update Slack connector request
|
||||
type: object
|
||||
required:
|
||||
- name
|
||||
- secrets
|
||||
properties:
|
||||
name:
|
||||
type: string
|
||||
description: The display name for the connector.
|
||||
secrets:
|
||||
type: object
|
||||
description: The secrets object containing the necessary fields for authentication.
|
||||
$ref: 'secrets_properties_slack_webhook.yaml'
|
|
@ -36,7 +36,8 @@ post:
|
|||
- $ref: '../components/schemas/create_connector_request_servicenow.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_servicenow_itom.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_servicenow_sir.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_slack.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_slack_api.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_slack_webhook.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_swimlane.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_teams.yaml'
|
||||
- $ref: '../components/schemas/create_connector_request_tines.yaml'
|
||||
|
|
|
@ -104,7 +104,8 @@ put:
|
|||
- $ref: '../components/schemas/update_connector_request_serverlog.yaml'
|
||||
- $ref: '../components/schemas/update_connector_request_servicenow.yaml'
|
||||
- $ref: '../components/schemas/update_connector_request_servicenow_itom.yaml'
|
||||
# - $ref: '../components/schemas/update_connector_request_slack.yaml'
|
||||
- $ref: '../components/schemas/update_connector_request_slack_api.yaml'
|
||||
- $ref: '../components/schemas/update_connector_request_slack_webhook.yaml'
|
||||
- $ref: '../components/schemas/update_connector_request_swimlane.yaml'
|
||||
# - $ref: '../components/schemas/update_connector_request_teams.yaml'
|
||||
# - $ref: '../components/schemas/update_connector_request_tines.yaml'
|
||||
|
|
|
@ -172,6 +172,6 @@ describe('ActionForm - Slack API Connector', () => {
|
|||
</IntlProvider>
|
||||
);
|
||||
|
||||
expect(await screen.findByText('Selected channel is required.')).toBeInTheDocument();
|
||||
expect(await screen.findByText('Channel is required.')).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
|
|
@ -36,7 +36,7 @@ export function getConnectorType(): ConnectorTypeModel<unknown, SlackSecrets, Sl
|
|||
modalWidth: 675,
|
||||
iconClass: 'logoSlack',
|
||||
selectMessage: i18n.translate('xpack.stackConnectors.components.slack.selectMessageText', {
|
||||
defaultMessage: 'Send a message to a Slack channel or user.',
|
||||
defaultMessage: 'Send messages to Slack channels.',
|
||||
}),
|
||||
actionTypeTitle: i18n.translate('xpack.stackConnectors.components.slack.connectorTypeTitle', {
|
||||
defaultMessage: 'Send to Slack',
|
||||
|
|
|
@ -53,7 +53,7 @@ describe('Slack action params validation', () => {
|
|||
expect(await connectorTypeModel.validateParams(actionParams)).toEqual({
|
||||
errors: {
|
||||
text: [],
|
||||
channels: ['Selected channel is required.'],
|
||||
channels: ['Channel is required.'],
|
||||
},
|
||||
});
|
||||
});
|
||||
|
|
|
@ -16,7 +16,7 @@ export const MESSAGE_REQUIRED = i18n.translate(
|
|||
export const CHANNEL_REQUIRED = i18n.translate(
|
||||
'xpack.stackConnectors.components.slack.error.requiredSlackChannel',
|
||||
{
|
||||
defaultMessage: 'Selected channel is required.',
|
||||
defaultMessage: 'Channel is required.',
|
||||
}
|
||||
);
|
||||
export const TOKEN_LABEL = i18n.translate(
|
||||
|
@ -31,7 +31,7 @@ export const WEB_API = i18n.translate('xpack.stackConnectors.components.slack.we
|
|||
export const SELECT_MESSAGE = i18n.translate(
|
||||
'xpack.stackConnectors.components.slack.selectMessageText',
|
||||
{
|
||||
defaultMessage: 'Send a message to a Slack channel or user.',
|
||||
defaultMessage: 'Send messages to Slack channels.',
|
||||
}
|
||||
);
|
||||
export const ACTION_TYPE_TITLE = i18n.translate(
|
||||
|
|
|
@ -978,7 +978,7 @@ export function getActionType(): ActionTypeModel {
|
|||
selectMessage: i18n.translate(
|
||||
'xpack.triggersActionsUI.components.builtinActionTypes.slackAction.selectMessageText',
|
||||
{
|
||||
defaultMessage: 'Send a message to a Slack channel or user.',
|
||||
defaultMessage: 'Send messages to Slack channels.',
|
||||
}
|
||||
),
|
||||
actionTypeTitle: i18n.translate(
|
||||
|
|
|
@ -83,6 +83,37 @@ export default function ({ getService, getPageObjects }: FtrProviderContext) {
|
|||
await flyOutCancelButton.click();
|
||||
});
|
||||
|
||||
it('slack api connector screenshots', async () => {
|
||||
await pageObjects.common.navigateToApp('connectors');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await actions.common.openNewConnectorForm('slack');
|
||||
await testSubjects.click('.slack_apiButton');
|
||||
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');
|
||||
});
|
||||
|
||||
it('slack webhook connector screenshots', async () => {
|
||||
await pageObjects.common.navigateToApp('connectors');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
await actions.common.openNewConnectorForm('slack');
|
||||
await testSubjects.setValue('nameInput', 'Slack webhook test connector');
|
||||
await testSubjects.setValue(
|
||||
'slackWebhookUrlInput',
|
||||
'https://hooks.slack.com/services/abcd/ljklmnopqrstuvwxz'
|
||||
);
|
||||
await commonScreenshots.takeScreenshot('slack-webhook-connector', screenshotDirectories);
|
||||
await testSubjects.click('create-connector-flyout-save-test-btn');
|
||||
await testSubjects.click('toastCloseButton');
|
||||
await commonScreenshots.takeScreenshot('slack-webhook-params', screenshotDirectories);
|
||||
await testSubjects.click('euiFlyoutCloseButton');
|
||||
});
|
||||
|
||||
it('email connector screenshots', async () => {
|
||||
await pageObjects.common.navigateToApp('connectors');
|
||||
await pageObjects.header.waitUntilLoadingHasFinished();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue