SlackConnector
Posts a message or uploads a file to the Slack group chat service.
Input Ports
This transformer accepts any feature. One message post or file upload will be performed for each feature that is received by the transformer.
Output Ports
Each input feature that results in a successful post is output unchanged via this port.
Each input feature whose post could not be made is output via this port. An fme_rejection_code attribute, having the value ERROR_DURING_PROCESSING, will be added, along with a more descriptive fme_rejection_message attribute which contains more specific details as to the reason for the failure. Common errors include attempting to post or upload to a channel that doesn’t exist, using an invalid Slack access token, or trying to upload a non-existent file.
Parameters
Token
The Slack API token that controls the permissions and identity of the sender. These tokens are generated at the Slack API page https://api.slack.com/docs/oauth-test-tokens
Note that in the future, a Web Connection will be used for authentication for this transformer.
Post
The target Slack channel for the message or file upload. The channel may be public or private. A leading # will be prefixed onto the channel name if it was not specified.
The kind of Slack post to make. Either a Message, or a File Upload may be performed. If a message is to be posted, then its contents and the identify of the poster need to be specified. If a file is to be uploaded, then a title, the filename, and an optional comment will be required.
Message
The content of the message post. Slack formatting can be included in the message as per the description at https://api.slack.com/docs/formatting and https://get.slack.help/hc/en-us/articles/202288908-Formatting-your-messages
A message may be posted as the user providing the authentication token for the transformer, or as a bot.
When posting as a bot, an arbitrary bot user name must be provided.
When posting as a bot, an emoji or URL must be specified as the icon to use for the message. The enclosing colons (:) for the emoji are optional.
For example, specifying clap would result in the :clap: emoji being used as the message icon. Specifying http://www.icon100.com/up/3048/64/412-nfl-denver-broncos.png would result in the logo of the Superbowl 50 champions being used as the message icon.
File Upload
The title of the file being uploaded. This will be displayed in bold above the file in the target Slack channel.
The name of an existing file on the host computer. The contents of this file will be uploaded.
An optional initial comment to add to the file. This will be displayed after the file snippet in the target Slack channel.
Usage Notes
This transformer is often used to notify recipients of translation status. It is often used downstream from the FeatureWriter to either send translation statistics or the entire translation output, to Slack. The TempPathnameCreator transformer may be useful in such workflows.
Editing Transformer Parameters
Using a set of menu options, transformer parameters can be assigned by referencing other elements in the workspace. More advanced functions, such as an advanced editor and an arithmetic editor, are also available in some transformers. To access a menu of these options, click beside the applicable parameter. For more information, see Transformer Parameter Menu Options.
Transformer Categories
Search FME Knowledge Center
Search for samples and information about this transformer on the FME Knowledge Center.