Skip to content

Use new slack "blocks" instead of "attachments" #166

Description

@cognifloyd

"attachments" is now legacy. I'm filing this issue so that this is on the radar to figure out what that means for our hubot.

https://api.slack.com/reference/messaging/blocks
https://api.slack.com/reference/messaging/attachments#legacy_fields

Playing around, I can use do something like:

extra:
  slack:
    text: some msg
    attachments:
      - blocks:
          - type: section
            text:
              type: plain_text
              text: section header
          - type: divider

however, this failed

extra:
  slack:
    text: some msg
    attachments:
      - blocks:
          - type: section
            text:
              type: plain_text
              text: section header
          - type: divider
          - type: actions
            elements:
              type: button
              text: windows link to file on NAS
              url: "file://///nas_server/share/path/filename.csv"

Other stuff might be broken as well.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions