Skip to content

Instantly share code, notes, and snippets.

@liborvanc
Last active May 7, 2019 05:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save liborvanc/787cfe57968f801d460bfed9ec41bf1f to your computer and use it in GitHub Desktop.
Save liborvanc/787cfe57968f801d460bfed9ec41bf1f to your computer and use it in GitHub Desktop.
Payloads
/* /wulu or /wulu list */
[
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Recent active polls:*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Kudos*\nCreated by: @username, @zelda"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Start"
},
"value": "click_me_123"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*What's YOUR Breather week?*\nCreated by: @iris, @zelda"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Start"
},
"value": "click_me_123"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*State of Olark*\nCreated by: @iris"
},
"accessory": {
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Start"
},
"value": "click_me_123"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*<fakelink.ToMoreTimes.com|Show more polls>*"
}
}
]
/* Success message - JSON */
[
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":sparkles: *Kudos submitted!*"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*To:* @alicia\n\n*Kudos:*\nGreat work on all the front-end work!\n\n*Company values:*\nAssume\n\n*Note:*\nYour Kudos is now visable to everyone in the _#kudos_ channel."
},
"accessory": {
"type": "image",
"image_url": "https://api.slack.com/img/blocks/bkb_template_images/approvalsNewDevice.png",
"alt_text": "computer thumbnail"
}
},
{
"type": "actions",
"elements": [
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Add Another?"
},
"style": "primary",
"value": "click_me_123"
},
{
"type": "button",
"text": {
"type": "plain_text",
"emoji": true,
"text": "Nope, That's Enough"
},
"value": "click_me_123"
}
]
}
]
/* Success message - Payload */
{
"type": "block_actions",
"team": {
"id": "T0CAG",
"domain": "acme-creamery"
},
"user": {
"id": "U0CA5",
"username": "Amy McGee",
"name": "Amy McGee",
"team_id": "T3MDE"
},
"api_app_id": "A0CA5",
"token": "Shh_its_a_seekrit",
"container": {
"type": "message",
"text": "The contents of the original message where the action originated"
},
"trigger_id": "12466734323.1395872398",
"response_url": "https://www.postresponsestome.com/T123567/1509734234",
"actions": [
{
"type": "button",
"block_id": "FxWig",
"action_id": "Bbx9",
"text": {
"type": "plain_text",
"text": "Farmhouse",
"emoji": true
},
"value": "click_me_123",
"action_ts": "1555960781.231062"
}
]
}
/* Kudos list - JSON */
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*@alicia* Great work on the front-end!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":innocent: Assume"
}
},
{
"type": "context",
"elements": [
{
"type": "plain_text",
"emoji": true,
"text": "From: @libor"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*@nickc* Thanks for some pipeline dirty work, which will make the help center migration a worthwhile endeavour!"
}
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": ":seedling: help"
}
},
{
"type": "context",
"elements": [
{
"type": "plain_text",
"emoji": true,
"text": "From: @joe"
}
]
},
{
"type": "divider"
},
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*@bens* Thanks for some pipeline dirty work, which will make the help center migration a worthwhile endeavour!"
}
},
{
"type": "context",
"elements": [
{
"type": "plain_text",
"emoji": true,
"text": "From: @joe"
}
]
},
{
"type": "divider"
}
]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment