Ir para o conteúdo

Slack Send Message activity

Introduction

A Slack Send Message activity, using its Slack connection, sends a message to a user, multiple users, conversation, or channel in Slack and is intended to be used as a target to consume data in an operation.

Create a Slack Send Message activity

An instance of a Slack Send Message activity is created from a Slack connection using its Send Message activity type.

To create an instance of an activity, drag the activity type to the design canvas or copy the activity type and paste it on the design canvas. For details, see Create an activity or tool instance in Component reuse.

An existing Slack Send Message activity can be edited from these locations:

Configure a Slack Send Message activity

Follow these steps to configure a Slack Send Message activity:

Step 1: Enter a name and configure message routing

In this step, provide a name for the activity and configure how messages will be routed to recipients. Each user interface element of this step is described below.

  • Endpoint menu: If you have multiple endpoints of the same connector type configured, a menu at the top of the screen displays the current endpoint name. Click the menu to switch to a different endpoint. For more information, see Change the assigned endpoint in Configuration screens.

    • Edit endpoint: Appears when you hover over the current endpoint name. Click to edit the currently selected endpoint's connection configuration.
  • Name: Enter a name to identify the activity. The name must be unique for each Slack Send Message activity and must not contain forward slashes / or colons :.

  • Message type: Select how to route the message:

    • Direct or Multi-Person: Send a direct message to one user or a group direct message to multiple users (up to 8).

    • Channel: Send a message to an existing Slack channel.

  • Conversation Type: This field appears when you select Direct or Multi-Person for the Message type. Select how you want to identify or create the conversation:

    • Create New Conversation: Create a new direct message or group direct message conversation.

    • Use Existent Conversation: Select from existing conversations.

  • Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Step 2: Select message recipients

In this step, select the users or conversation to receive the message. The interface displayed depends on the selections made in step 1.

Direct or Multi-Person message routing

When you set Message Type to Direct or Multi-Person, select up to 8 users to receive the message.

  • Users List (Select 1 up to 8): Select the users who will receive the direct message.

    • Available users: Lists all users available in your Slack workspace. Use the search box to filter the list by entering a username. Click the refresh icon to reload the user list from Slack.

    • Selected Users: Displays the users who have been selected to receive the message. Use the arrow buttons to move users between the Available users and Selected Users lists.

      • Click the right arrow to add a selected user from the Available users list to the Selected Users list.

      • Click the left arrow to remove a selected user from the Selected Users list.

Channel message routing

When you set Message Type to Channel, select an existing channel.

  • Select Slack Channel: Choose the Slack channel where the message will be sent. Use the search box to filter the list of conversations. Click the refresh icon to reload conversations from Slack.

    • Selected Slack Channel: After a Slack channel is selected, it is listed here.

    • Search: Enter any column's value into the search box to filter the list of channels. The search is not case-sensitive. If channels are already displayed within the table, the table results are filtered in real time with each keystroke. To reload channels from the endpoint when searching, enter search criteria and then refresh, as described below.

    • Refresh: Click the refresh icon or the word Refresh to reload channels from the Slack endpoint. This may be useful if channels have been added to Slack. This action refreshes all metadata used to build the table of channels displayed in the configuration.

    • Selecting a Slack Channel: Within the table, click anywhere on a row to select a Slack channel. Only one Slack channel can be selected. The information available for each Slack channel is fetched from the Slack endpoint.

    Tip

    If the table does not populate with available channels, the Slack connection may not be successful. Ensure you are connected by reopening the connection and retesting the credentials.

  • Back: Click to temporarily store the configuration for this step and return to the previous step.

  • Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Step 3: Configure message content

In this step, provide the message content to send. Each user interface element of this step is described below.

  • Message content: Enter the text content of the message to send to the selected recipients. This field supports plain text and Slack Markdown formatting.

  • Continue on error: Select to continue the activity execution if an error is encountered for a dataset in a batch request. If any errors are encountered, they are written to the operation log.

  • Back: Click to temporarily store the configuration for this step and return to the previous step.

  • Next: Click to temporarily store the configuration for this step and continue to the next step. The configuration will not be saved until you click the Finished button on the last step.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Step 4: Review the data schemas

Any request or response schemas are displayed. Each user interface element of this step is described below.

  • Data Schemas: These data schemas are inherited by adjacent transformations and are displayed again during transformation mapping.

    Note

    Data supplied in a transformation takes precedence over the activity configuration.

    The Slack connector uses the Slack REST API. Refer to the API documentation for information on the schema nodes and fields.

  • Refresh: Click the refresh icon or the word Refresh to regenerate schemas from the Slack endpoint. This action also regenerates a schema in other locations throughout the project where the same schema is referenced, such as in an adjacent transformation.

  • Back: Click to temporarily store the configuration for this step and return to the previous step.

  • Finished: Click to save the configuration for all steps and close the activity configuration.

  • Discard Changes: After making changes, click to close the configuration without saving changes made to any step. A message asks you to confirm that you want to discard changes.

Next steps

After configuring a Slack Send Message activity, complete the configuration of the operation by adding and configuring other activities or tools as operation steps. You can also configure the operation settings, which include the ability to chain operations together that are in the same or different workflows.

Menu actions for an activity are accessible from the project pane and the design canvas. For details, see Activity actions menu in Connector basics.

Slack Send Message activities can be used as a target with these operation patterns:

To use the activity with scripting functions, write the data to a temporary location and then use that temporary location in the scripting function.

When ready, deploy and run the operation and validate behavior by checking the operation logs.