My message actions looks like this
{
"channel": "",
"text": "button variable",
"replace_original": false,
"attachments": [
{
"fallback": "We're sorry, something went wrong with connection. Please try again.",
"callback_id": "url_buttons",
"attachment_type": "default",
"actions": [
...
{
"name": "333",
"text": "btn3 var",
"type": "button",
"value": "aaa"
}
]
}
],
"as_user": true
}
The message in bot looks fine:
But sometimes, after a button gets clicked, the message gets edited and replaced with "{}":
I'm not sending anything else after the button gets clicked that would replace the message. Not sure what happens, this happens most of the times when a button is clicked.
Thanks for the help!
I would also recommend using Block Kit. Here you have an example of the markdown and after clicking the button you can check how the payload looks, https://app.slack.com/block-kit-builder/TG4KUE8JV#%7B%22blocks%22:%5B%7B%22type%22:%22section%22,%22text%22:%7B%22type%22:%22mrkdwn%22,%22text%22:%22This%20is%20a%20section%20block%20with%20a%20button.%22%7D,%22accessory%22:%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Click%20Me%22%7D,%22value%22:%22click_me_123%22,%22action_id%22:%22button%22%7D%7D,%7B%22type%22:%22actions%22,%22block_id%22:%22actionblock789%22,%22elements%22:%5B%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Primary%20Button%22%7D,%22style%22:%22primary%22,%22value%22:%22click_me_456%22%7D,%7B%22type%22:%22button%22,%22text%22:%7B%22type%22:%22plain_text%22,%22text%22:%22Link%20Button%22%7D,%22url%22:%22https://api.slack.com/block-kit%22%7D%5D%7D%5D%7D