Search code examples
slackslack-apislack-block-kit

trigger an action (or slash command) from a link


I'm trying to use a link (in a mrkdwn) to work similar to a button, for design purposes (can integrate it better with text). So when the user clicks that link, I want it to trigger an action or a slash command (along with auth data), so I can open a dialog that shows more info.

I'm wondering if there's any way to achieve this, or if we can create a link for a slash command.


Solution


  • What you are trying to achieve is called interactivity in Slack.

    Following are the interactivity entry points :
    1. Shortcuts
    2. Slash Commands
    3. Interactive Components
    https://api.slack.com/interactivity/entry-points

    Unfortunately, Links are not valid interactivity component.
    https://api.slack.com/block-kit/interactivity#components