I want to have a slack button that will behave as a link, it will send user to my website when it clicked. Is that possible with slack new api?
Yes, it is possible by using block kit.
All you have to do is add a button
inside actions
and provide the url
. On click it will redirect to https://google.com and also sends a request to slack api.
Block Kit Code:
{
"blocks": [
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Click me"
},
"style": "primary",
"value": "click_me",
"url": "https://google.com"
}
]
}
]
}
Output:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With