The PostSlack processor sends messages on Slack, a team-oriented messaging service. The message can be a simple text message, furthermore Slack attachments can also be specified or the FlowFile content (e.g. an image) can be uploaded and attached to the message too.
This processor uses Slack Web API methods to post messages to a specific channel. Before using PostSlack, you need to create a Slack App, to add a Bot User to the app, and to install the app in your Slack workspace. After the app installed, you can get the Bot User's OAuth Access Token that will be needed to authenticate and authorize your PostSlack processor to Slack.
You can send the following types of messages with PostSlack:
Slack content and link attachments can be added to the message through dynamic properties. Please note that this kind of Slack message attachments does not involve the file upload itself, but rather contain links to external resources (or internal resources already uploaded to Slack). Please also note that this functionality does not work together with file upload (so it can only be used when 'Upload FlowFile' has been set to 'No').
The Dynamic Properties can be used to specify these Slack message attachments as JSON snippets. Each property value will be converted to JSON and will be added to the array of attachments in the JSON payload being sent to Slack.
Example JSON snippets to define Slack attachments:
{ "text": "Text that appears within the attachment", "image_url": "http://some-website.com/path/to/image.jpg" }
{ "title": "Title of the attachment", "image_url": "http://some-website.com/path/to/image.jpg" }