Skip to content

Instantly share code, notes, and snippets.

@felixheck
Last active September 13, 2019 11:33
Show Gist options
  • Save felixheck/89342c16fc4264c34652f7c2541a1524 to your computer and use it in GitHub Desktop.
Save felixheck/89342c16fc4264c34652f7c2541a1524 to your computer and use it in GitHub Desktop.
Action Example
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Hiya, it's me, *Erna*. The next lunch date will be next Thursday.\nThat's a tiny reminder 😉.\n\nWanna join and get to know new people?:curry:"
}
},
{
"type": "actions",
"elements": [
{
"action_id": "notify.prompt",
"type": "button",
"text": {
"type": "plain_text",
"text": "Join lunch dates",
"emoji": true
},
"value": "hi"
}
]
}
]
{
"type": "block_actions",
"team": {
"id": <ID>,
"domain": "daheq"
},
"user": {
"id": <ID>,
"username": "felix",
"name": "felix",
"team_id": <TEAM_ID>
},
"api_app_id": <API_APP_ID>,
"token": <TOKEN>,
"container": {
"type": "message",
"message_ts": "1568371037.000700",
"channel_id": <CHANNEL_ID>,
"is_ephemeral": false
},
"trigger_id": <TRIGGER_ID>,
"channel": {
"id": <ID>,
"name": "directmessage"
},
"message": {
"type": "message",
"subtype": "bot_message",
"text": "Hiya, it's Erna!",
"ts": "1568371037.000700",
"username": "erna",
"icons": {
"emoji": ":knife_fork_plate:",
"image_64": "https://a.slack-edge.com/80588/img/emoji_2017_12_06/apple/1f37d-fe0f.png"
},
"bot_id": <BOT_ID>,
"blocks": [
{
"type": "section",
"block_id": "Lhs",
"text": {
"type": "mrkdwn",
"text": "Hiya, it's me, *Erna*. The next lunch date will be today at 10:00am.\nThat's a tiny reminder :wink:.\n\nWanna join and get to know new people?:curry:",
"verbatim": false
}
},
{
"type": "actions",
"block_id": "E5RN",
"elements": [
{
"type": "button",
"action_id": "notify.prompt",
"text": {
"type": "plain_text",
"text": "Join lunch dates",
"emoji": true
},
"value": "hi"
}
]
}
]
},
"response_url": <RESPONSE_URL>,
"actions": [
{
"action_id": "notify.prompt",
"block_id": "E5RN",
"text": {
"type": "plain_text",
"text": "Join lunch dates",
"emoji": true
},
"value": "hi",
"type": "button",
"action_ts": "1568371348.485715"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment