Skip to content

[Slack] Add Slack workflow template enhancements for threaded messages and message editing #568

@lucasoares

Description

@lucasoares

Description:
We would like to request enhancements to the Slack workflow template to allow the following functionalities:

  1. Send messages in a thread.
  2. Edit messages once they are sent.

These features would significantly improve the flexibility and use cases of the Slack workflow template. For example, in a promotion flow that promotes across multiple clusters, we want to achieve the following:

  • Initially send a message indicating that the promotion flow has started.
  • For each cluster in the pre-action, create a message as a reply (thread) to the initial message indicating the status of the migration for that specific cluster.
  • In the post-action of each cluster, we should be able to edit the status message for that specific cluster with the updated status.
  • The next clusters would follow the same pattern, adding messages to the thread.

Additionally, when workflow hooks are available, we could use the same strateegy to keep the status of the promotion flow up to date directly in Slack.

API Reference:
We recommend using the following Slack API to facilitate this:

Slack API - chat.postMessage

Key parameters to focus on:

  • reply_broadcast (boolean)
    Used in conjunction with thread_ts to determine whether the reply should be visible to everyone in the channel. Default is false.
    Example: true

  • thread_ts (string)
    The ts value of another message, to make this message a reply in a thread. Avoid using the reply's ts value; always use the parent message's ts instead.

Use Case Example:
In a promotion flow involving multiple clusters:

  1. Pre-action of each cluster: Post a message in the thread to indicate the migration status.
  2. Post-action of each cluster: Edit the corresponding message with updated status.

This approach would provide clear and continuous updates on the status of each cluster in the promotion process.

We believe these enhancements would greatly improve the workflow and help users achieve more streamlined communication within Slack.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions