Description:

PublishSlack allows for the ability to send messages to Slack using Slack's chat.postMessage API. This Processor should be preferred over the deprecated PutSlack and PostSlack Processors, as it aims to incorporate the capabilities of both of those Processors, improve the maintainability, and ease the configuration for the user.

Slack Setup

In order use this Processor, it requires that a Slack App be created and installed in your Slack workspace. An OAuth User or Bot Token must be created for the App. The token must have the chat:write Token Scope. Please see Slack's documentation for the latest information on how to create an Application and install it into your workspace.

Depending on the Processor's configuration, you may also require additional Scopes. For example, if configured to upload the contents of the FlowFile as a message attachment, the files:write User Token Scope or Bot Token Scope must be granted. Additionally, the Channels to consume from may be listed either as a Channel ID or (for public Channels) a Channel Name. However, if a name, such as #general is used, the token must be provided the channels:read scope in order to determine the Channel ID for you.

Rather than requiring the channels:read Scope, you may alternatively supply only Channel IDs for the "Channel" property. To determine the ID of a Channel, navigate to the desired Channel in Slack. Click the name of the Channel at the top of the screen. This provides a popup that provides information about the Channel. Scroll to the bottom of the popup, and you will be shown the Channel ID with the ability to click a button to Copy the ID to your clipboard.

At the time of this writing, the following steps may be used to create a Slack App with the necessary scope of chat:write scope. However, these instructions are subject to change at any time, so it is best to read through Slack's Quickstart Guide.