Send Ephemeral Message

Send an ephemeral message to a Slack channel. An ephemeral message is temporary and appears to only one user. While an ephemeral message is similar to other messages in conversations in Slack, only one user within a conversation will see it, and it does not persist across reloads, between desktop and mobile apps, or across sessions.

Both the sender and the recipient of the message must be members of the channel. You can send the message as a bot or from your own ID.

When sending messages as a bot, you will trigger any Okta Workflows that look for a New Message in Channel event. If you are subscribed to channel notifications, you will receive a notification when you send messages as a bot. Sending from your own ID will not trigger Okta Workflows or notifications.

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 TRUE
Send as bot? Indicates whether to send a message from a bot; options are Yes to send the message from a bot or No to send it from your own ID. Dropdown TRUE
Field Type Choose whether to send ephemeral message to user by User ID or Username.

Organizations with a large number of users may experience long execution times when selecting Username. Instead, select User ID to reduce execution time.

Dropdown TRUE
Message Type Format of the message; options are Plain Text and Blocks; see Layout blocks. Dropdown TRUE

Input

Field Definition Type Required
Channel (if Enter Channel ID is selected for Channel)
Channel ID or Name Unique identifier or assigned name of the Slack channel.
Caution

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 an error will be returned.

String TRUE
Channel Type Indicates the type of channel selected; options are Public or Private.

If you want to send a message to a private channel as a bot, the Okta Workflows Slack app (for Preview or Production orgs) must be invited to the private channel. Otherwise, a 400 - Channel Not Found error will be returned.

Dropdown FALSE
User
User ID

Unique identifier of the user.

This field appears if Field Type is User ID.
String TRUE
Username Username of the Slack user. This field appears if Field Type is Username. String TRUE
Message (if Message Type is Plain Text)
Text

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

String 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.

String FALSE
Message (if Message Type is Blocks)
Blocks Blocks that comprise the message. Add a block by clicking + click to add item. See Layout blocks. String TRUE
Notification Message A fallback string to display in notifications. String FALSE
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.

String FALSE
Slackbot (if Send as Bot? is True)
Name Name to specify as the sender of the message. String FALSE
Icon Emoji An emoji to use as the profile photo for the message, specified using a colon shortcode. For example, :owl: String FALSE
Icon URL A URL to an icon image 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 String FALSE

Output

Field Definition Type
Timestamp Timestamp when the message was sent. String

Related topics

Slack connector

Workflow elements

Slack API