Slack StopStream

Slack StopStream

Certified

Stop a Slack stream

Finalizes a streaming message started with StartStream; no further appends are allowed after this. Optional final markdown, blocks, or metadata can be included. Requires chat: write.

yaml
type: io.kestra.plugin.slack.app.chats.StopStream

Stop a stream with final message

yaml
id: slack_stop_stream
namespace: company.team

tasks:
  - id: start_stream
    type: io.kestra.plugin.slack.app.chats.StartStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "#general"
    markdownText: "Processing workflow..."

  - id: append_stream
    type: io.kestra.plugin.slack.app.chats.AppendStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "{{ outputs.start_stream.channel }}"
    timestamp: "{{ outputs.start_stream.timestamp }}"
    markdownText: "\\nStep completed"

  - id: stop_stream
    type: io.kestra.plugin.slack.app.chats.StopStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "{{ outputs.start_stream.channel }}"
    timestamp: "{{ outputs.start_stream.timestamp }}"
    markdownText: "\\nāœ… All done!"

Complete stream workflow

yaml
id: slack_complete_stream
namespace: company.team

tasks:
  - id: start_stream
    type: io.kestra.plugin.slack.app.chats.StartStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "#general"
    markdownText: "Starting data processing"

  - id: process_data
    type: io.kestra.plugin.core.flow.Sleep
    duration: PT5S

  - id: append_result
    type: io.kestra.plugin.slack.app.chats.AppendStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "{{ outputs.start_stream.channel }}"
    timestamp: "{{ outputs.start_stream.timestamp }}"
    markdownText: "\\nProcessed 1000 records"

  - id: stop_stream
    type: io.kestra.plugin.slack.app.chats.StopStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "{{ outputs.start_stream.channel }}"
    timestamp: "{{ outputs.start_stream.timestamp }}"
    markdownText: "\\nProcessing completed at {{ now() }}"

Stop stream with blocks

yaml
id: slack_stop_stream_blocks
namespace: company.team

tasks:
  - id: start_stream
    type: io.kestra.plugin.slack.app.chats.StartStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "#general"
    markdownText: "Running workflow..."

  - id: stop_stream
    type: io.kestra.plugin.slack.app.chats.StopStream
    token: "{{ secret('SLACK_TOKEN') }}"
    channel: "{{ outputs.start_stream.channel }}"
    timestamp: "{{ outputs.start_stream.timestamp }}"
    markdownText: "\\nWorkflow completed"
    blocks: |
      [
        {
          "type": "section",
          "text": {
            "type": "mrkdwn",
            "text": "*Status:* :white_check_mark: Completed"
          }
        }
      ]
Properties

Stream channel

Channel ID or name where the stream was started.

Stream message timestamp

Slack ts returned by StartStream.

Slack token

Final Block Kit blocks

JSON array string of blocks appended before closing.

Final markdown content

Optional markdown appended before closing the stream.

Final message metadata

JSON object string attached to the closing message.

Reference (ref) of the pluginDefaults to apply to this task.

Stream channel

May be null if not returned by the Slack API.

Stream message timestamp

May be null if not returned by the Slack API.