Slack (v2) connector
The Slack (v2) connector enables workflow-driven Slack automation: search Slack messages, resolve public channel IDs, send messages, create channels, and invite users to Slack channels using the Slack Web API. It authenticates using OAuth Authorization Code (Slack OAuth v2).
You can create connectors in Stack Management > Connectors.
Slack (v2) connectors use OAuth Authorization Code authentication. When creating the connector, you will be prompted to authorize access to your Slack workspace. No additional configuration properties are required beyond the OAuth credentials.
You can test connectors when you create or edit the connector in Kibana. The test verifies connectivity by calling Slack auth.test.
The Slack (v2) connector has the following actions:
- Search messages
-
Search for messages in Slack.
query(required): Slack search query string.inChannel(optional): Addsin:<channel_name>to the query.fromUser(optional): Addsfrom:<@UserID>orfrom:usernameto the query.after(optional): Addsafter:<date>to the query (for example,2026-02-10).before(optional): Addsbefore:<date>to the query (for example,2026-02-10).sort(optional): Sort order,scoreortimestamp.sortDir(optional): Sort direction,ascordesc.count(optional): Results to return (1 to 20). Slack returns up to 20 results per page.cursor(optional): Pagination cursor (useresponse_metadata.next_cursorfrom a previous call).includeContextMessages(optional): Include contextual messages. Defaults totrue.includeBots(optional): Include bot messages. Defaults tofalse.includeMessageBlocks(optional): Include Block Kit blocks. Defaults totrue.raw(optional): Iftrue, returns the full raw Slack response (verbose).
- Resolve channel ID
-
Resolve a Slack conversation ID (
C...for public channels,G...for private channels) from a human channel name (for example,#general).name(required): Channel name (with or without#).types(optional): Conversation types to search. Defaults topublic_channel.match(optional):exact(default) orcontains.excludeArchived(optional): Exclude archived channels. Defaults totrue.cursor(optional): Pagination cursor to resume a previous scan.limit(optional): Channels per page (1 to 1000). Defaults to1000.maxPages(optional): Maximum pages to scan before giving up. Defaults to10.
- Create conversation
-
Create a new Slack channel (public or private).
name(required): Channel name. Must contain only lowercase letters, numbers, hyphens, and underscores (80 characters or fewer).isPrivate(optional): Whether to create a private channel. Defaults tofalse.
- Invite to conversation
-
Invite users to a Slack channel.
channel(required): The channel ID to invite users to (for example,C123...orG456...).users(required): Comma-separated list of user IDs to invite (for example,U01PWE77HD2,U02ABC1234).
- Send message
-
Send a message to a Slack conversation ID.
channel(required): Conversation ID (for example,C123...). Use Resolve channel ID first if you only have a channel name.text(required): Message text.threadTs(optional): Reply in a thread (timestamp of the parent message).unfurlLinks(optional): Turn on unfurling of primarily text-based content.unfurlMedia(optional): Turn on unfurling of media content.
Use the Action configuration settings to customize connector networking, such as proxies, certificates, or TLS settings. If you use xpack.actions.allowedHosts, include slack.com in the list.
To use the Slack (v2) connector, you need a Slack app configured for OAuth.
- Go to Slack API: Your Apps and select Create New App.
- Choose From scratch, give it a name (for example, "Kibana Slack Connector"), and select your workspace.
- Under OAuth & Permissions, add the following User Token Scopes:
channels:read— resolve public channel IDschat:write— send messagesfiles:read— access shared filesgroups:read— list private channelsim:read— list direct messagesmpim:read— list group direct messagessearch:read.files— search filessearch:read.im— search direct messagessearch:read.mpim— search group direct messagessearch:read.private— search private channelssearch:read.public— search public channelsusers:read— look up user information
- Set the Redirect URL to your Kibana OAuth redirect URI.
- Under Basic Information, copy the Client ID and Client Secret.
- In Kibana, enter the Client ID and Client Secret when creating the Slack (v2) connector. You will be redirected to Slack to authorize access to your workspace.
Additional scopes may be required for certain actions. For example, groups:write is needed to create private channels or invite users. Add scopes as needed under User Token Scopes in your Slack app configuration.