Send Message to Channel

Send a message to a Slack channel. You must be a member of the channel. You can send the message as a bot or from your own ID.

Sending messages as a bot also triggers any Okta Workflows that look for a New Message in Channel event. If you're subscribed to channel notifications, you'll receive a notification when you send messages as a bot. However, sending a message from your own ID doesn't trigger Okta Workflows or notifications.

If your workspace has a large number of channels, this card may exceed the 60 second time limit while trying to populate the Channel dropdown list. This timeout can also occur when testing a card.

Options

Field Definition Type Required

Channel

List of available channels. The member must be able to post a message.

This field shows a maximum of 200 public channels and 200 private channels. Even if the number of public or private channels is fewer than 200, API limitations may prevent some channels from appearing in the Channel dropdown list.

The dropdown displays only unarchived channels where the user who created the Slack connection is a member. To specify an unlisted public or private channel, select the Enter Channel ID option and enter the Channel ID.

If a failure occurs and no channels are listed in the dropdown, then only the Enter Channel ID option appears.

Dropdown

FALSE

Send as bot?

Indicates whether to send a message from a bot.

Select Yes to send the message from a bot or No to send it from your own ID.

Dropdown

FALSE

Unfurl URLs?

Select Yes if Slack should scan links found in messages and create attachments based on the link contents.

Dropdown

FALSE

Message Type

The format of the message, either Plain Text or Blocks. See Layout blocks.

Dropdown

FALSE

To send a message to a channel as a bot, the bot must be a member of that channel.

To determine the user ID for a bot, you can use the Read User action card. See Read User.

Invite the bot to the channel using the Invite User to Channel action card. Use the unique user ID for the bot, for example: U01TFSL6JQY. Don't use the handle or display name. Enter the unique ID in the User ID input field of the Invite User to Channel card.

For additional information on Slack bots, see Enabling interactions with bots.

Input

Field Definition Type Required

Channel

Appears if you select Enter Channel ID for Channel.

Channel ID or Name

A unique identifier or assigned name of the Slack channel.

If you want to send a message to a private channel as a bot, you must provide the channel ID. If you only know the channel name, manually invite the bot to the channel before sending this message, otherwise the card returns an error.

Text

TRUE

Channel Type

Indicates the type of channel: Public or Private.

If you want to send a message to a private channel as a bot, the Okta Workflows Slack app must be invited to the private channel. Otherwise the card returns a 400 - Channel Not Found error.

Dropdown

FALSE

Message

Text

Appears if you select Plain Text for the Message Type.

The text of the message. You can include the following in a message:

  • emojis as :owl:

  • channel names as #channelname

  • group names as @slack_owners

  • specific users as <@slack_user_id>

  • commands as /command

Text

TRUE

Blocks

Appears if you select Blocks for the Message Type.

Blocks that comprise the message. Add a block by clicking + click to add item. See Layout blocks.

Text

TRUE

Notification Message

A fallback string to display in notifications.

Text

TRUE

Thread Timestamp

Timestamp of another message's ts value. See Retrieving individual messages.

Note: Never use the ts value from a reply. Use the ts value of the reply's parent instead.

Text

FALSE

Slackbot

Appears if Send as Bot? is True.

Name

Name to use as the message sender.

Text

FALSE

Icon Emoji

An emoji to use as the profile photo for the message, specified using a colon short code, for example, :owl:.

Text

FALSE

Icon URL

A URL pointing to an icon to use as the profile photo for the message.

If no URL is provided, the default bot icon is used.

If any value is specified in Icon Emoji, then that value overrides any URL set in this field.

Text

FALSE

Output

Field Definition Type

Timestamp

The timestamp when the message was sent.

Text

Related topics

Slack connector

Workflow elements

Slack API