This Processor is more difficult to configure than necessary, and exposes intricate nuances of the Slack API that need not be exposed. Additionally, it lacks some capabilities, such as responding to messages in threads. It interacts directly with the Slack API instead of making use of the Slack-provided SDK, which makes the Processor much more brittle. Additionally, it does not make clear the differences between PutSlack and PostSlack. Each provides slightly different capabilities. PublishSlack combines the capabilities of both Processors in a simpler configuration that makes use of Slack's standard REST API.
Please consider using one the following alternatives: PublishSlack
Sends a message on Slack. The FlowFile content (e.g. an image) can be uploaded and attached to the message.
slack, post, notify, upload, message
In the list below, the names of required properties appear in bold. Any other properties (not in bold) are considered optional. The table also indicates any default values, and whether a property supports the NiFi Expression Language.
Display Name | API Name | Default Value | Allowable Values | Description |
---|---|---|---|---|
Post Message URL | post-message-url | https://slack.com/api/chat.postMessage | Slack Web API URL for posting text messages to channels. It only needs to be changed if Slack changes its API URL. | |
File Upload URL | file-upload-url | https://slack.com/api/files.upload | Slack Web API URL for uploading files to channels. It only needs to be changed if Slack changes its API URL. | |
Access Token | access-token | OAuth Access Token used for authenticating/authorizing the Slack request sent by NiFi. Sensitive Property: true | ||
Channel | channel | Slack channel, private group, or IM channel to send the message to. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
Text | text | Text of the Slack message to send. Only required if no attachment has been specified and 'Upload File' has been set to 'No'. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
Upload FlowFile | upload-flowfile | No |
| Whether or not to upload and attach the FlowFile content to the Slack message. |
File Title | file-title | Title of the file displayed in the Slack message. The property value will only be used if 'Upload FlowFile' has been set to 'Yes'. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | ||
File Name | file-name | ${filename} | Name of the file to be uploaded. The property value will only be used if 'Upload FlowFile' has been set to 'Yes'. If the property evaluated to null or empty string, then the file name will be set to 'file' in the Slack message. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | |
File Mime Type | file-mime-type | ${mime.type} | Mime type of the file to be uploaded. The property value will only be used if 'Upload FlowFile' has been set to 'Yes'. If the property evaluated to null or empty string, then the mime type will be set to 'application/octet-stream' in the Slack message. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) | |
SSL Context Service | SSL Context Service | Controller Service API: SSLContextService Implementations: StandardRestrictedSSLContextService StandardSSLContextService | Specifies an optional SSL Context Service that, if provided, will be used to create connections |
Supports Sensitive Dynamic Properties: No
Dynamic Properties allow the user to specify both the name and value of a property.
Name | Value | Description |
---|---|---|
<Arbitrary name> | JSON snippet specifying a Slack message "attachment" | The property value will be converted to JSON and will be added to the array of attachments in the JSON payload being sent to Slack. The property name will not be used by the processor. Supports Expression Language: true (will be evaluated using flow file attributes and variable registry) |
Name | Description |
---|---|
success | FlowFiles are routed to success after being successfully sent to Slack |
failure | FlowFiles are routed to failure if unable to be sent to Slack |
Name | Description |
---|---|
slack.file.url | The Slack URL of the uploaded file. It will be added if 'Upload FlowFile' has been set to 'Yes'. |