Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Sends a message to a Slack workspace. This operation takes a few inputs that will build a simple message along with a bearer token Slack Account Code and sends a message to the channel based on the input given. The operation also requires the user to create an app in the slack workspace. You can see more about this in the special considerations section below. 

Info

All Slack operations require a Slack Messaging Account.

Environment/Instance Properties

...

No
Property NameProperty CodeRequiredDescription
FDSLACK_INP_CLOUD_BEARERACCT_TOKENCODEYesBearer token generated by slack after adding app to workspace. Your token will most likely start with xoxp. (String)Slack account code from Topology->Integrations->Messaging 
Channel Name or IdFDSLACK_INP_CHANNELYesName or Id of channel that the notification will be sent. For example, "random". Use user channel Id to send direct messages (String)FDSLACK_INP_AS_USEREnter true if you would like to send the slack notification as the authorized user. (Boolean)
Bot UsernameFDSLACK_INP_USERNAMENoUsername for the bot that sends the notification. For example "FlexDeploy". (String)
FDSLACK_INP_ICON_EMOJINoThe emoji that will be used as the icon for the bot. An example is ":chart_with_upwards_trend:" . A list of some of the emojis can be found here. If using this Send as Authed User input must be false. (String)
Icon URLFDSLACK_INP_ICON_URLNoThe URL for the image that will be used as the icon for the bot. An example is " https://s3-us-west-2.amazonaws.com/slack-files2/bot_icons/2019-12-27/874826668114_48.png". If using this Send as Authed User input must be false. (String)
FDSLACK_INP_TEXTYesText for the message that will be sent. (String)

...

This operations delegates the execution to the workflow developer to decide

Special Considerations

This operation requires the user to create an app in the Slack workspace. This is very easy and can be done here. You will need to add the OAuth scope for chat:write:bot. After installing the app to your workspace, the bearer token can be found on the OAuth & Permissions page.

The message JSON must be formatted based on what the Slack API. To learn more about the formatting of the message payload you can find information here. If you want to learn about the different things you can add to your message you can find information here. You can also see the Slack API we use here

Examples

First we will need to create an app in our workspace by going here

Image Removed

We will then select the workspace and go to the OAuth & Permissions page.

Image Removed Image Removed

On the OAuth & Permissions page you will add the chat:write:bot OAuth scope and chat:write:user if you would like to send the messages as the authorized user that installed the app.

Image Removed

You will then go to the top of this page and install the app to your workspace. You will have to allow the app to send messages to your workspace. After doing that the bearer token can be found at the top of the OAuth & Permissions page.

Image Removed Image Removed Image Removed

You will then add that bearer token to the input for the plugin operation in your workflow.

Below is an example. This will send a message to a channel called flexdeploy-demo.

Image RemovedImage Added

Below is the final result in the flexdeploy-demo channel.

...