Skip to content

feat(message): Add mrkdwn parameter for Slack formatting#1025

Closed
bob-bot wants to merge 1 commit intodevelopfrom
feat/message-mrkdwn
Closed

feat(message): Add mrkdwn parameter for Slack formatting#1025
bob-bot wants to merge 1 commit intodevelopfrom
feat/message-mrkdwn

Conversation

@bob-bot
Copy link
Copy Markdown

@bob-bot bob-bot commented Jan 15, 2026

Summary

Adds an optional mrkdwn boolean parameter to the message step that enables Slack mrkdwn formatting when sending messages via Slack notifiers.

Closes #1024

Problem

Currently, the message step sends plain text to Slack using plain_text block type, which means formatting like *bold*, _italic_, and <url|text> links don't render. Users who rely on notifiers cannot send formatted messages.

Solution

Added an optional mrkdwn parameter that switches the Slack text block type from plain_text to mrkdwn, enabling Slack's markdown-like formatting.

Changes

File Description
internal/resources/flowpipe_pipeline_step_message.go Added Mrkdwn field, updated Equals, GetInputs2, SetAttributes
internal/resources/flowpipe_pipeline_schema.go Added mrkdwn to message step schema
internal/primitive/message.go Extract mrkdwn flag, conditionally use MarkdownType
internal/primitive/message_test.go Added 3 new test functions with 10 sub-tests

Usage

step "message" "alert" {
    notifier = notifier.slack_ops
    text     = "*Bold* and _italic_ with <https://example.com|links>"
    mrkdwn   = true
}

Block JSON Comparison

Without mrkdwn (default):

{"type": "section", "text": {"type": "plain_text", "text": "*bold*"}}

With mrkdwn=true:

{"type": "section", "text": {"type": "mrkdwn", "text": "*bold*"}}

Test Plan

  • Unit tests added and passing (12 total message tests)
  • Functional test with real Slack webhook confirms formatting difference
  • Backward compatible - existing pipelines work unchanged
=== RUN   TestMessageStepSlackMessagePlainText
--- PASS: TestMessageStepSlackMessagePlainText (0.00s)
=== RUN   TestMessageStepSlackMessageMrkdwn
--- PASS: TestMessageStepSlackMessageMrkdwn (0.00s)
=== RUN   TestMessageStepSlackMessageMrkdwnComparison
--- PASS: TestMessageStepSlackMessageMrkdwnComparison (0.00s)

Supported Formatting

Syntax Result
*bold* bold
_italic_ italic
~strike~ strikethrough
`code` inline code
<https://url|text> clickable link

Notes

  • The mrkdwn parameter only affects Slack integrations
  • Email and MS Teams integrations ignore this parameter
  • Testing revealed Slack mobile partially formats plain_text (bold/italic/code) but not links - using mrkdwn=true ensures consistent cross-platform behavior

🤖 Generated with Claude Code

Add optional `mrkdwn` boolean parameter to the message step that enables
Slack mrkdwn formatting when sending messages via Slack notifiers.

Changes:
- Add Mrkdwn field to PipelineStepMessage struct
- Update MessageStepMessageCreator to conditionally use MarkdownType
- Add schema attribute for message step
- Add comprehensive unit tests (3 test functions, 10 sub-tests)

When mrkdwn=true, the message step uses Slack's `mrkdwn` block type
instead of `plain_text`, enabling formatting like *bold*, _italic_,
`code`, and <url|clickable links>.

Closes #1024

Co-Authored-By: Claude <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown

This PR is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions Bot added the stale label Mar 17, 2026
@github-actions
Copy link
Copy Markdown

This PR was closed because it has been stalled for 90 days with no activity.

@github-actions github-actions Bot closed this Apr 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(message): Add mrkdwn parameter for Slack formatting in message step

1 participant