I am using Python and it's Slacker
API to post messages to a slack channel and it's posting the messages nicely.
Now what I want to do is create a button that says, More Info and when it's clicked, I want to show a list of items.
But when the button is clicked, slackbot
says oh no, something weng wrong, Please try that again
Here is an example: link
Below is my json and the code
msg = "<!here> Hello guys! "
moreInfo = ['person', 'person2', 'person3']
message = [{
"title": "Lunch time has been decided",
"text": "You will also be joining",
"actions": [
{
"name": "buttonName",
"text": "More Info",
"type": "button",
"value": moreInfo
}]
}]
slack.chat.post_message('#teamChannel', msg, username='my_username', attachments=message)
And this is the what it looks like in Slack when I click on More info button.
Any help is appreciated! Thanks :)