├── .gitignore ├── README.md ├── app-home-opened ├── README.md ├── app-home-opened.gif ├── app-home-opened.mp4 ├── payload-help.json └── payload-welcome.json ├── app-mention ├── README.md ├── app-mention.gif ├── app-mention.mp4 └── payload-help.json ├── approval ├── README.md ├── approval-confirm.gif ├── approval-confirm.mp4 ├── approval-reject.gif ├── approval-reject.mp4 ├── payload-approval-confirm.json ├── payload-approval-reject-modal.json ├── payload-approval-reject.json └── payload-approval-request.json ├── details-ephemeral ├── README.md ├── details-ephemeral.gif ├── details-ephemeral.mp4 ├── payload-details.json └── payload-message.json ├── details-thread ├── README.md ├── details-thread.gif ├── details-thread.mp4 ├── payload-details.json └── payload-message.json ├── expand-collapse ├── README.md ├── expand-collapse.gif ├── expand-collapse.mp4 ├── payload-collapse.json └── payload-expand.json ├── hr ├── review │ ├── README.md │ ├── hr-review.gif │ ├── hr-review.mp4 │ ├── payload-confirmation.json │ ├── payload-help.json │ └── payload-modal.json ├── survey │ ├── README.md │ ├── hr-survey.gif │ ├── hr-survey.mp4 │ ├── payload-confirm.json │ ├── payload-question.json │ ├── payload-review.json │ └── payload-start.json └── timeoff │ ├── README.md │ ├── hr-timeoff.gif │ ├── hr-timeoff.mp4 │ ├── payload-confirm.json │ ├── payload-request-step-0.json │ └── payload-request-step-1.json ├── paging ├── README.md ├── paging.gif ├── payload-page-0.json └── payload-page-1.json ├── private-poll ├── README.md ├── payload-private-poll-confirm.json ├── payload-private-poll.json ├── private-poll.gif └── private-poll.mp4 ├── public-poll ├── README.md ├── payload-public-poll-confirm.json ├── payload-public-poll.json ├── public-poll.gif └── public-poll.mp4 ├── search ├── README.md ├── payload-edit-search.json ├── payload-results.json ├── payload-search.json ├── search.gif └── search.mp4 └── task-and-ticket-management ├── create-task-message-action ├── README.md ├── create-task.gif ├── payload-task-confirm.json └── payload-task-modal.json └── create-task-slash-command ├── README.md ├── create-task-slash-command.gif ├── create-task-slash-command.mp4 ├── payload-task-confirm.json └── payload-task-modal.json /.gitignore: -------------------------------------------------------------------------------- 1 | *.DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ARCHIVED 2 | 3 | This piece of sample code has been archived and is no longer maintained. The approaches used may no longer be relevant, or even work correctly. For more up to date samples, check out some of the other repositories on https://github.com/slackapi 4 | 5 | # App interaction patterns 6 | 7 | This is a collection of common workflows and interaction patterns for Slack apps. 8 | 9 | We also recommend to check out our other resources on building great Slack app experiences: 10 | 11 | * [Build - a guide to crafting Slack apps](https://slack.dev/guides/Build.pdf) 12 | * [App UI guidelines](https://slack.dev/guides/AppUIGuidelines.pdf) 13 | * [Block Kit message UI concepts](https://docs.google.com/presentation/d/10IGKfJzEFhOGRGzsng4SC8fyU8ASkb71SgE7Q6jnRyQ/edit?usp=sharing) 14 | 15 | ## Common workflows 16 | 17 | * [Onboarding (`app_home_opened` event)](./app-home-opened/README.md) 18 | * [Help menu (`app_mention` event)](./app-mention/README.md) 19 | * [Approval Notice](./approval/README.md) 20 | * [Paging](./paging/README.md) 21 | * [Private Poll](./private-poll/README.md) 22 | * [Public Poll](./public-poll/README.md) 23 | * [Search](./search/README.md) 24 | * [Details View in ephemeral message](./details-ephemeral/README.md) 25 | * [Details View in Thread](./details-thread/README.md) 26 | * [Expand & Collapse](./expand-collapse/README.md) 27 | 28 | ## Task & ticket management 29 | 30 | * [Create a task or ticket from Message Action](./task-and-ticket-management/create-task-message-action/README.md) 31 | * [Create a task or ticket from Slash Command](./task-and-ticket-management/create-task-slash-command/README.md) 32 | 33 | ## HR 34 | 35 | * [Perform a culture survey](./hr/survey/README.md) 36 | * [Requesting time off](./hr/timeoff/README.md) 37 | * [Peer review](./hr/review/README.md) 38 | 39 | ## Other 40 | 41 | * [List of common used emoji icons](https://gist.github.com/pichsenmeister/50639f68e8bbf9276efdb18fba9e13d2) 42 | -------------------------------------------------------------------------------- /app-home-opened/README.md: -------------------------------------------------------------------------------- 1 | # Onboarding (`app_home_opened` event) 2 | 3 | ![](app-home-opened.gif) 4 | *`app_home_opened` event example* 5 | 6 | 🎥 [High Resolution screencast](app-home-opened.mp4) 7 | 8 | 💻 [Check out code example on Glitch](https://glitch.com/~app-home-opened) 9 | 10 | ## Description 11 | 12 | Your Slack app lives in a virtual place called an App Home. Users find it by locating or adding your app in their channel sidebar, under the Apps heading. 13 | 14 | Your App Home is essentially a private, 1:1 conversation between a person and your bot user. It works just like a direct message between two users, using the same events and Web API methods. 15 | 16 | By enabling the `app_home_opened` event you are able to greet users with interactive, educational experiences and unlock the full potential of your App Home. 17 | 18 | More information around App Home can be found on our [API docs](https://api.slack.com/reference/app-home). 19 | 20 | _Please note that this event only works in your app's DM._ 21 | 22 | ### Examples 23 | 24 | * Onboarding new users once they open your App's DM for the first time 25 | * Send a help message with important Call-to-actions once they open your App's DM 26 | 27 | ## Required features 28 | 29 | * [Bot User](https://api.slack.com/bot-users) 30 | * [Interactive Components](https://api.slack.com/interactive-messages) 31 | * [Events API](https://api.slack.com/events-api) 32 | 33 | ## Required scopes 34 | 35 | * [`bot`](https://api.slack.com/scopes/bot) 36 | 37 | ## Required event subscriptions 38 | 39 | * [`app_home_opened`](https://api.slack.com/events/app_home_opened) 40 | 41 | ## Implementation overview 42 | 43 | ### 1. Show a welcome message once users open your App's DM for the first time 44 | 45 | * [payload.json](payload-welcome.json) 46 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22Hey%20there%20%F0%9F%91%8B%20I%27m%20TaskBot.%20I%27m%20here%20to%20help%20you%20create%20and%20manage%20tasks%20in%20Slack.%5CnThere%20are%20two%20ways%20to%20quickly%20create%20tasks%3A%22%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*1%EF%B8%8F%E2%83%A3%20Use%20the%20%60%2Ftask%60%20command*.%20Type%20%60%2Ftask%60%20followed%20by%20a%20short%20description%20of%20your%20tasks%20and%20I%27ll%20ask%20for%20a%20due%20date%20(if%20applicable).%20Try%20it%20out%20by%20using%20the%20%60%2Ftask%60%20command%20in%20this%20channel.%22%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*2%EF%B8%8F%E2%83%A3%20Use%20the%20_Create%20a%20Task_%20action.*%20If%20you%20want%20to%20create%20a%20task%20from%20a%20message%2C%20select%20%60Create%20a%20Task%60%20in%20a%20message%27s%20context%20menu.%20Try%20it%20out%20by%20selecting%20the%20_Create%20a%20Task_%20action%20for%20this%20message%20(shown%20below).%22%7D%7D%2C%7B%22type%22%3A%22image%22%2C%22title%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Create%20a%20task%22%2C%22emoji%22%3Atrue%7D%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FonboardingComplex.jpg%22%2C%22alt_text%22%3A%22image1%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%E2%9E%95%20To%20start%20tracking%20your%20team%27s%20tasks%2C%20*add%20me%20to%20a%20channel*%20and%20I%27ll%20introduce%20myself.%20I%27m%20usually%20added%20to%20a%20team%20or%20project%20channel.%20Type%20%60%2Finvite%20%40TaskBot%60%20from%20the%20channel%20or%20pick%20a%20channel%20on%20the%20right.%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22conversations_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Select%20a%20channel...%22%2C%22emoji%22%3Atrue%7D%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Create%20a%20new%20task%22%2C%22emoji%22%3Atrue%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20tasks%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Help%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me%22%7D%5D%7D%5D) 47 | 48 | #### Methods 49 | 50 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 51 | 52 | ### 2. Show a help message when a user opens your App's DM 53 | 54 | _Note: Only post a help message if there was some considerable time between the last interaction with the user and the last message wasn't a help message itself. Additionally give the user an option to opt-out of these messages by e.g. providing a "Don't show this again" button_ 55 | 56 | * [payload.json](payload-help.json) 57 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Awave%3A%20*Hi%20there!*%5Cn%5Cn%20Here%20are%20some%20actions%20you%20can%20take%20from%20here.%22%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%F0%9F%93%8B%20*List%20tasks*%20%5Cn%5Cn%20View%20a%20list%20of%20tasks%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%20task%20list%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Due%20today%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22My%20tasks%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-2%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22All%20tasks%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-2%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%E2%9A%99%EF%B8%8F%20*Settings*%20%5Cn%5Cn%20Edit%20your%20settings%20or%20notification%20preferences%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Edit%20settings%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Notifications%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Settings%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-2%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%F0%9F%93%A5%20*Send%20feedback*%20%5Cn%5Cn%20Give%20us%20feedback%20or%20ask%20for%20help%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Send%20feedback%22%7D%2C%22value%22%3A%22click_me_123%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Create%20a%20new%20task%22%2C%22emoji%22%3Atrue%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22FAQ%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me_123%22%7D%5D%7D%5D) 58 | 59 | #### Methods 60 | 61 | * [`chat.postMesssage`](https://api.slack.com/methods/chat.postMessage) 62 | -------------------------------------------------------------------------------- /app-home-opened/app-home-opened.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/app-home-opened/app-home-opened.gif -------------------------------------------------------------------------------- /app-home-opened/app-home-opened.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/app-home-opened/app-home-opened.mp4 -------------------------------------------------------------------------------- /app-home-opened/payload-help.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": ":wave: *Hi there!*\n\n Here are some actions you can take from here." 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "text": { 12 | "type": "mrkdwn", 13 | "text": "📋 *List tasks* \n\n View a list of tasks" 14 | }, 15 | "accessory": { 16 | "type": "static_select", 17 | "placeholder": { 18 | "type": "plain_text", 19 | "text": "Choose task list", 20 | "emoji": true 21 | }, 22 | "options": [ 23 | { 24 | "text": { 25 | "type": "plain_text", 26 | "text": "Due today", 27 | "emoji": true 28 | }, 29 | "value": "value-1" 30 | }, 31 | { 32 | "text": { 33 | "type": "plain_text", 34 | "text": "My tasks", 35 | "emoji": true 36 | }, 37 | "value": "value-2" 38 | }, 39 | { 40 | "text": { 41 | "type": "plain_text", 42 | "text": "All tasks", 43 | "emoji": true 44 | }, 45 | "value": "value-2" 46 | } 47 | ] 48 | } 49 | }, 50 | { 51 | "type": "section", 52 | "text": { 53 | "type": "mrkdwn", 54 | "text": "⚙️ *Settings* \n\n Edit your settings or notification preferences" 55 | }, 56 | "accessory": { 57 | "type": "static_select", 58 | "placeholder": { 59 | "type": "plain_text", 60 | "text": "Edit settings", 61 | "emoji": true 62 | }, 63 | "options": [ 64 | { 65 | "text": { 66 | "type": "plain_text", 67 | "text": "Notifications", 68 | "emoji": true 69 | }, 70 | "value": "value-1" 71 | }, 72 | { 73 | "text": { 74 | "type": "plain_text", 75 | "text": "Settings", 76 | "emoji": true 77 | }, 78 | "value": "value-2" 79 | } 80 | ] 81 | } 82 | }, 83 | { 84 | "type": "section", 85 | "text": { 86 | "type": "mrkdwn", 87 | "text": "📥 *Send feedback* \n\n Give us feedback or ask for help" 88 | }, 89 | "accessory": { 90 | "type": "button", 91 | "text": { 92 | "type": "plain_text", 93 | "text": "Send feedback" 94 | }, 95 | "value": "click_me_123" 96 | } 97 | }, 98 | { 99 | "type": "divider" 100 | }, 101 | { 102 | "type": "actions", 103 | "elements": [ 104 | { 105 | "type": "button", 106 | "text": { 107 | "type": "plain_text", 108 | "text": "Create a new task", 109 | "emoji": true 110 | }, 111 | "style": "primary", 112 | "value": "click_me" 113 | }, 114 | { 115 | "type": "button", 116 | "text": { 117 | "type": "plain_text", 118 | "text": "FAQ", 119 | "emoji": true 120 | }, 121 | "value": "click_me_123" 122 | } 123 | ] 124 | } 125 | ] -------------------------------------------------------------------------------- /app-home-opened/payload-welcome.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Hey there 👋 I'm TaskBot. I'm here to help you create and manage tasks in Slack.\nThere are two ways to quickly create tasks:" 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "text": { 12 | "type": "mrkdwn", 13 | "text": "*1️⃣ Use the `/task` command*. Type `/task` followed by a short description of your tasks and I'll ask for a due date (if applicable). Try it out by using the `/task` command in this channel." 14 | } 15 | }, 16 | { 17 | "type": "section", 18 | "text": { 19 | "type": "mrkdwn", 20 | "text": "*2️⃣ Use the _Create a Task_ action.* If you want to create a task from a message, select `Create a Task` in a message's context menu. Try it out by selecting the _Create a Task_ action for this message (shown below)." 21 | } 22 | }, 23 | { 24 | "type": "image", 25 | "title": { 26 | "type": "plain_text", 27 | "text": "Create a task", 28 | "emoji": true 29 | }, 30 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/onboardingComplex.jpg", 31 | "alt_text": "image1" 32 | }, 33 | { 34 | "type": "section", 35 | "text": { 36 | "type": "mrkdwn", 37 | "text": "➕ To start tracking your team's tasks, *add me to a channel* and I'll introduce myself. I'm usually added to a team or project channel. Type `/invite @TaskBot` from the channel or pick a channel on the right." 38 | }, 39 | "accessory": { 40 | "type": "conversations_select", 41 | "placeholder": { 42 | "type": "plain_text", 43 | "text": "Select a channel...", 44 | "emoji": true 45 | } 46 | } 47 | }, 48 | { 49 | "type": "divider" 50 | }, 51 | { 52 | "type": "actions", 53 | "elements": [ 54 | { 55 | "type": "button", 56 | "text": { 57 | "type": "plain_text", 58 | "text": "Create a new task", 59 | "emoji": true 60 | }, 61 | "style": "primary", 62 | "value": "click_me" 63 | }, 64 | { 65 | "type": "button", 66 | "text": { 67 | "type": "plain_text", 68 | "text": "View tasks", 69 | "emoji": true 70 | }, 71 | "value": "click_me" 72 | }, 73 | { 74 | "type": "button", 75 | "text": { 76 | "type": "plain_text", 77 | "text": "Help", 78 | "emoji": true 79 | }, 80 | "value": "click_me" 81 | } 82 | ] 83 | } 84 | ] -------------------------------------------------------------------------------- /app-mention/README.md: -------------------------------------------------------------------------------- 1 | # Help menu (`app_mention` event) 2 | 3 | ![](app-mention.gif) 4 | *`app_mention` event example* 5 | 6 | 🎥 [High Resolution screencast](app-mention.mp4) 7 | 8 | ## Description 9 | 10 | This event allows your app to subscribe to message events that directly mention your bot user in any channel or DM. This event contains the full text of the message in which your bot user was mentioned. You can both react to specific commands or respond with a general help message. 11 | 12 | More information around `app_mention` can be found on our [API docs](https://api.slack.com/events/app_mention). 13 | 14 | ### Examples 15 | 16 | * Offer a help menu when your App is mentioned in a channel 17 | 18 | ## Required features 19 | 20 | * [Bot User](https://api.slack.com/bot-users) 21 | * [Interactive Components](https://api.slack.com/interactive-messages) 22 | * [Events API](https://api.slack.com/events-api) 23 | 24 | ## Required scopes 25 | 26 | * [`bot`](https://api.slack.com/scopes/bot) 27 | 28 | ## Required event subscriptions 29 | 30 | * [`app_mention`](https://api.slack.com/events/app_mention) 31 | 32 | ## Implementation overview 33 | 34 | ### 1. Add a reaction to the user's message 35 | 36 | _Note: When sending the help message as an ephemeral message, only the user who mentioned your App can see this message. You can optionally add a reaction to the user's message so other users in this channel can see that your App is responding._ 37 | 38 | #### Methods 39 | 40 | * [`reactions.add`](https://api.slack.com/methods/reactions.add) 41 | 42 | ### 2. Show an ephemeral help message 43 | 44 | * [payload.json](payload-help.json) 45 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Awave%3A%20*Hi%20%3Cfakelink.toUser.com%7C%40David%3E!*%5Cn%20Here%27s%20a%20list%20of%20actions%20you%20can%20take%20from%20here%3A%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%F0%9F%93%8B%20*List%20tasks*%20%5Cn%5Cn%20View%20a%20list%20of%20tasks%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%20task%20list%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Due%20today%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22My%20tasks%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-2%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22All%20tasks%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-2%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%F0%9F%93%A5%20*Send%20feedback*%20%5Cn%5Cn%20Give%20us%20feedback%20or%20ask%20for%20help%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Send%20feedback%22%7D%2C%22value%22%3A%22click_me_123%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Create%20a%20new%20task%22%2C%22emoji%22%3Atrue%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22create_task%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22FAQ%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me_123%22%7D%5D%7D%5D) 46 | 47 | #### Methods 48 | 49 | * [`chat.postEphemeral`](https://api.slack.com/methods/chat.postEphemeral) 50 | 51 | -------------------------------------------------------------------------------- /app-mention/app-mention.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/app-mention/app-mention.gif -------------------------------------------------------------------------------- /app-mention/app-mention.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/app-mention/app-mention.mp4 -------------------------------------------------------------------------------- /app-mention/payload-help.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": ":wave: *Hi !*\n Here's a list of actions you can take from here:" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "📋 *List tasks* \n\n View a list of tasks" 17 | }, 18 | "accessory": { 19 | "type": "static_select", 20 | "placeholder": { 21 | "type": "plain_text", 22 | "text": "Choose task list", 23 | "emoji": true 24 | }, 25 | "options": [ 26 | { 27 | "text": { 28 | "type": "plain_text", 29 | "text": "Due today", 30 | "emoji": true 31 | }, 32 | "value": "value-1" 33 | }, 34 | { 35 | "text": { 36 | "type": "plain_text", 37 | "text": "My tasks", 38 | "emoji": true 39 | }, 40 | "value": "value-2" 41 | }, 42 | { 43 | "text": { 44 | "type": "plain_text", 45 | "text": "All tasks", 46 | "emoji": true 47 | }, 48 | "value": "value-2" 49 | } 50 | ] 51 | } 52 | }, 53 | { 54 | "type": "section", 55 | "text": { 56 | "type": "mrkdwn", 57 | "text": "📥 *Send feedback* \n\n Give us feedback or ask for help" 58 | }, 59 | "accessory": { 60 | "type": "button", 61 | "text": { 62 | "type": "plain_text", 63 | "text": "Send feedback" 64 | }, 65 | "value": "click_me_123" 66 | } 67 | }, 68 | { 69 | "type": "divider" 70 | }, 71 | { 72 | "type": "actions", 73 | "elements": [ 74 | { 75 | "type": "button", 76 | "text": { 77 | "type": "plain_text", 78 | "text": "Create a new task", 79 | "emoji": true 80 | }, 81 | "style": "primary", 82 | "value": "create_task" 83 | }, 84 | { 85 | "type": "button", 86 | "text": { 87 | "type": "plain_text", 88 | "text": "FAQ", 89 | "emoji": true 90 | }, 91 | "value": "click_me_123" 92 | } 93 | ] 94 | } 95 | ] -------------------------------------------------------------------------------- /approval/README.md: -------------------------------------------------------------------------------- 1 | # Approval 2 | 3 | ![](approval-confirm.gif) 4 | *Approval confirmation* 5 | 6 | 🎥 [High Resolution screencast](approval-confirm.mp4) 7 | 8 | ![](approval-reject.gif) 9 | *Approval rejection* 10 | 11 | 🎥 [High Resolution screencast](approval-reject.mp4) 12 | 13 | ### Examples 14 | 15 | * Confirmation of a reservation, booking or appointment 16 | * Action which requires manager's approval 17 | 18 | ## Required features 19 | 20 | * [Bot User](https://api.slack.com/bot-users) 21 | * [Interactive Components](https://api.slack.com/interactive-messages) 22 | 23 | ## Required scopes 24 | 25 | * [`bot`](https://api.slack.com/scopes/bot) 26 | 27 | ## Implementation overview 28 | 29 | ### 1. Approval request 30 | 31 | * [payload.json](payload-approval-request.json) 32 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22text%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%22text%22%3A%20%22You%20have%20a%20new%20request%3A%5Cn*%3CfakeLink.toEmployeeProfile.com%7CFred%20Enriquez%20-%20New%20device%20request%3E*%22%0A%09%09%7D%0A%09%7D%2C%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22fields%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Type%3A*%5CnComputer%20(laptop)%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*When%3A*%5CnSubmitted%20Aut%2010%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Last%20Update%3A*%5CnMar%2010%2C%202015%20(3%20years%2C%205%20months)%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Reason%3A*%5CnAll%20vowel%20keys%20aren%27t%20working.%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Specs%3A*%5Cn%5C%22Cheetah%20Pro%2015%5C%22%20-%20Fast%2C%20really%20fast%5C%22%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%2C%0A%09%7B%0A%09%09%22type%22%3A%20%22actions%22%2C%0A%09%09%22elements%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22button%22%2C%0A%09%09%09%09%22text%22%3A%20%7B%0A%09%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%09%22emoji%22%3A%20true%2C%0A%09%09%09%09%09%22text%22%3A%20%22Approve%22%0A%09%09%09%09%7D%2C%0A%09%09%09%09%22style%22%3A%20%22primary%22%2C%0A%09%09%09%09%22value%22%3A%20%22approve%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22button%22%2C%0A%09%09%09%09%22text%22%3A%20%7B%0A%09%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%09%22emoji%22%3A%20true%2C%0A%09%09%09%09%09%22text%22%3A%20%22Reject%22%0A%09%09%09%09%7D%2C%0A%09%09%09%09%22style%22%3A%20%22danger%22%2C%0A%09%09%09%09%22value%22%3A%20%22reject%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%0A%5D) 33 | 34 | #### Methods 35 | 36 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 37 | 38 | 39 | ### 2. Approval confirmation 40 | 41 | * [payload.json](payload-approval-confirm.json) 42 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22text%22%3A%20%7B%0A%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%22text%22%3A%20%22You%20have%20a%20new%20request%3A%5Cn*%3CfakeLink.toEmployeeProfile.com%7CFred%20Enriquez%20-%20New%20device%20request%3E*%22%0A%09%09%7D%0A%09%7D%2C%0A%09%7B%0A%09%09%22type%22%3A%20%22section%22%2C%0A%09%09%22fields%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Type%3A*%5CnComputer%20(laptop)%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*When%3A*%5CnSubmitted%20Aut%2010%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Last%20Update%3A*%5CnMar%2010%2C%202015%20(3%20years%2C%205%20months)%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Reason%3A*%5CnAll%20vowel%20keys%20aren%27t%20working.%22%0A%09%09%09%7D%2C%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22mrkdwn%22%2C%0A%09%09%09%09%22text%22%3A%20%22*Specs%3A*%5Cn%5C%22Cheetah%20Pro%2015%5C%22%20-%20Fast%2C%20really%20fast%5C%22%22%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%2C%0A%09%7B%0A%09%09%22type%22%3A%20%22context%22%2C%0A%09%09%22elements%22%3A%20%5B%0A%09%09%09%7B%0A%09%09%09%09%22type%22%3A%20%22plain_text%22%2C%0A%09%09%09%09%22text%22%3A%20%22%3Awhite_check_mark%3A%20You%20approved%20this%20request%20on%2003%2F14%2F2019%20at%2003%3A45pm%22%2C%0A%09%09%09%09%22emoji%22%3A%20true%0A%09%09%09%7D%0A%09%09%5D%0A%09%7D%0A%5D) 43 | 44 | #### Methods 45 | 46 | * [`chat.update`](https://api.slack.com/methods/chat.update) 47 | 48 | ### 3. Approval rejection modal 49 | 50 | * [payload.json](payload-approval-reject-modal.json) 51 | 52 | #### Methods 53 | 54 | * [`views.open`](https://api.slack.com/methods/views.open) 55 | 56 | ### 4. Approval rejection 57 | 58 | * [payload.json](payload-approval-reject.json) 59 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%22You%20have%20a%20new%20request%3A%5Cn*%3CfakeLink.toEmployeeProfile.com%7CFred%20Enriquez%20-%20New%20device%20request%3E*%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%22fields%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Type%3A*%5CnComputer%20(laptop)%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*When%3A*%5CnSubmitted%20Mar%2014%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Last%20Update%3A*%5CnMar%2010%2C%202015%20(3%20years%2C%205%20months)%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Reason%3A*%5CnAll%20vowel%20keys%20aren%27t%20working.%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Specs%3A*%5Cn%5C%22Cheetah%20Pro%2015%5C%22%20-%20Fast%2C%20really%20fast%5C%22%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Ax%3A%20You%20declined%20this%20request%20on%2003%2F14%2F2019%20at%2003%3A45pm%22%2C%0A%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Ainformation_source%3A%20Reason%3A%20Out%20of%20Policy%22%2C%0A%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Amemo%3A%20Comment%3A%20We%20don%27t%20approve%20this%20kind%20of%20device.%22%2C%0A%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%0A%5D) 60 | 61 | #### Methods 62 | 63 | * [`chat.update`](https://api.slack.com/methods/chat.update) 64 | 65 | ### Additional notes 66 | 67 | We recommend sending approval notices as a Direct Message to reduce noise in channels. 68 | -------------------------------------------------------------------------------- /approval/approval-confirm.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/approval/approval-confirm.gif -------------------------------------------------------------------------------- /approval/approval-confirm.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/approval/approval-confirm.mp4 -------------------------------------------------------------------------------- /approval/approval-reject.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/approval/approval-reject.gif -------------------------------------------------------------------------------- /approval/approval-reject.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/approval/approval-reject.mp4 -------------------------------------------------------------------------------- /approval/payload-approval-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "You have a new request:\n**" 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "fields": [ 12 | { 13 | "type": "mrkdwn", 14 | "text": "*Type:*\nComputer (laptop)" 15 | }, 16 | { 17 | "type": "mrkdwn", 18 | "text": "*When:*\nSubmitted Aut 10" 19 | }, 20 | { 21 | "type": "mrkdwn", 22 | "text": "*Last Update:*\nMar 10, 2015 (3 years, 5 months)" 23 | }, 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Reason:*\nAll vowel keys aren't working." 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Specs:*\n\"Cheetah Pro 15\" - Fast, really fast\"" 31 | } 32 | ] 33 | }, 34 | { 35 | "type": "context", 36 | "elements": [ 37 | { 38 | "type": "plain_text", 39 | "text": ":white_check_mark: You approved this request on 03/14/2019 at 03:45pm", 40 | "emoji": true 41 | } 42 | ] 43 | } 44 | ] -------------------------------------------------------------------------------- /approval/payload-approval-reject-modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "modal", 3 | "callback_id": "request:reject", 4 | "title": { 5 | "type": "plain_text", 6 | "text": "Reject request", 7 | "emoji": true 8 | }, 9 | "submit": { 10 | "type": "plain_text", 11 | "text": "Submit", 12 | "emoji": true 13 | }, 14 | "close": { 15 | "type": "plain_text", 16 | "text": "Cancel", 17 | "emoji": true 18 | }, 19 | "blocks": [ 20 | { 21 | "type": "input", 22 | "element": { 23 | "type": "static_select", 24 | "placeholder": { 25 | "type": "plain_text", 26 | "text": "Select a reason", 27 | "emoji": true 28 | }, 29 | "options": [ 30 | { 31 | "text": { 32 | "type": "plain_text", 33 | "text": "Out of policy" 34 | }, 35 | "value": "reject:out-of-policy" 36 | }, 37 | { 38 | "text": { 39 | "type": "plain_text", 40 | "text": "Invalid request" 41 | }, 42 | "value": "reject:invalid-request" 43 | }, 44 | { 45 | "text": { 46 | "type": "plain_text", 47 | "text": "Other" 48 | }, 49 | "value": "reject:other" 50 | } 51 | ] 52 | }, 53 | "label": { 54 | "type": "plain_text", 55 | "text": "Select a reason", 56 | "emoji": true 57 | } 58 | }, 59 | { 60 | "type": "input", 61 | "element": { 62 | "type": "plain_text_input", 63 | "multiline": true 64 | }, 65 | "label": { 66 | "type": "plain_text", 67 | "text": "Comment", 68 | "emoji": true 69 | }, 70 | "hint": { 71 | "type": "plain_text", 72 | "text": "Provide additional information." 73 | }, 74 | "optional": true 75 | } 76 | ] 77 | } -------------------------------------------------------------------------------- /approval/payload-approval-reject.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "You have a new request:\n**" 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "fields": [ 12 | { 13 | "type": "mrkdwn", 14 | "text": "*Type:*\nComputer (laptop)" 15 | }, 16 | { 17 | "type": "mrkdwn", 18 | "text": "*When:*\nSubmitted Mar 14" 19 | }, 20 | { 21 | "type": "mrkdwn", 22 | "text": "*Last Update:*\nMar 10, 2015 (3 years, 5 months)" 23 | }, 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Reason:*\nAll vowel keys aren't working." 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Specs:*\n\"Cheetah Pro 15\" - Fast, really fast\"" 31 | } 32 | ] 33 | }, 34 | { 35 | "type": "context", 36 | "elements": [ 37 | { 38 | "type": "plain_text", 39 | "text": ":x: You declined this request on 03/14/2019 at 03:45pm", 40 | "emoji": true 41 | } 42 | ] 43 | }, 44 | { 45 | "type": "context", 46 | "elements": [ 47 | { 48 | "type": "plain_text", 49 | "text": ":information_source: Reason: Out of Policy", 50 | "emoji": true 51 | } 52 | ] 53 | }, 54 | { 55 | "type": "context", 56 | "elements": [ 57 | { 58 | "type": "plain_text", 59 | "text": ":memo: Comment: We don't approve this kind of device.", 60 | "emoji": true 61 | } 62 | ] 63 | } 64 | ] -------------------------------------------------------------------------------- /approval/payload-approval-request.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "You have a new request:\n**" 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "fields": [ 12 | { 13 | "type": "mrkdwn", 14 | "text": "*Type:*\nComputer (laptop)" 15 | }, 16 | { 17 | "type": "mrkdwn", 18 | "text": "*When:*\nSubmitted Aut 10" 19 | }, 20 | { 21 | "type": "mrkdwn", 22 | "text": "*Last Update:*\nMar 10, 2015 (3 years, 5 months)" 23 | }, 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Reason:*\nAll vowel keys aren't working." 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Specs:*\n\"Cheetah Pro 15\" - Fast, really fast\"" 31 | } 32 | ] 33 | }, 34 | { 35 | "type": "actions", 36 | "elements": [ 37 | { 38 | "type": "button", 39 | "text": { 40 | "type": "plain_text", 41 | "emoji": true, 42 | "text": "Approve" 43 | }, 44 | "style": "primary", 45 | "value": "approve", 46 | "confirm": { 47 | "title": { 48 | "type": "plain_text", 49 | "text": "Approve" 50 | }, 51 | "text": { 52 | "type": "mrkdwn", 53 | "text": "You are about to approve this request." 54 | }, 55 | "confirm": { 56 | "type": "plain_text", 57 | "text": "Yes" 58 | }, 59 | "deny": { 60 | "type": "plain_text", 61 | "text": "Cancel" 62 | } 63 | } 64 | }, 65 | { 66 | "type": "button", 67 | "text": { 68 | "type": "plain_text", 69 | "emoji": true, 70 | "text": "Reject" 71 | }, 72 | "style": "danger", 73 | "value": "reject" 74 | } 75 | ] 76 | } 77 | ] -------------------------------------------------------------------------------- /details-ephemeral/README.md: -------------------------------------------------------------------------------- 1 | # Blueprint: Details View in ephemeral message 2 | 3 | ![](details-ephemeral.gif) 4 | *Details in ephemeral message* 5 | 6 | 🎥 [High Resolution screencast](details-ephemeral.mp4) 7 | 8 | ### Examples 9 | 10 | * Providing a more detailed view for a notification 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Message notification 24 | 25 | * [payload.json](payload-message.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Hey%20there!*%5CnWe%20captured%20a%20new%20lead%20for%20you.%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Name*%3A%20David%20Pichsenmeister%5Cn*Email*%3A%20%3Cfakelink.toUser.com%7Cdavidpichsenmeister%40example.com%3E%5Cn*Company*%3A%20Demo%20Corp%5Cn*Product%20Interest*%3A%20Marketing%20Automation%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20on%20Web%20%3Aarrow_upper_right%3A%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me_123%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Acalendar%3A%20*Date%3A*%20May%2017%2C%202019%203%3A14pm%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Aenvelope_with_arrow%3A%20*Inbound%3A*%20Website%22%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22users_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Assign%20to%22%2C%22emoji%22%3Atrue%7D%7D%2C%7B%22type%22%3A%22channels_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Post%20to%20channel%22%2C%22emoji%22%3Atrue%7D%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20details%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22show_details%22%7D%5D%7D%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | 33 | ### 2. Ephemeral details message 34 | 35 | * [payload.json](payload-details.json) 36 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Name*%5CnDavid%20Pichsenmeister%5Cn%5Cn*Email*%5Cn%3Cfakelink.toUser.com%7Cdavidpichsenmeister%40example.com%3E%5Cn%5Cn*Company*%5CnDemo%20Corp%5Cn%5Cn*Product%20Interest*%5CnMarketing%20Automation%5Cn%5Cn*What%27s%20your%20company%27s%20website%3F*%5Cn%3Cfakelink.toUser.com%7Cdemo-corp.com%3E%5Cn%5Cn*How%20many%20people%20are%20employed%20at%20your%20company%3F*%5Cn1500-2000%5Cn%5Cn*Which%20tools%20are%20you%20currently%20using%3F*%5CnSalesforce%2C%20Hubspot%5Cn%5Cn*Are%20you%20interested%20in%20a%20demo%3F*%5CnYes%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20on%20Web%20%3Aarrow_upper_right%3A%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me_123%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Acalendar%3A%20*Date%3A*%20May%2017%2C%202019%203%3A14pm%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Aenvelope_with_arrow%3A%20*Inbound%3A*%20Website%22%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22users_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Assign%20to%22%2C%22emoji%22%3Atrue%7D%7D%2C%7B%22type%22%3A%22channels_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Post%20to%20channel%22%2C%22emoji%22%3Atrue%7D%7D%5D%7D%5D) 37 | 38 | #### Methods 39 | 40 | * [`chat.postEphemeral`](https://api.slack.com/methods/chat.postEphemeral) 41 | 42 | 43 | -------------------------------------------------------------------------------- /details-ephemeral/details-ephemeral.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/details-ephemeral/details-ephemeral.gif -------------------------------------------------------------------------------- /details-ephemeral/details-ephemeral.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/details-ephemeral/details-ephemeral.mp4 -------------------------------------------------------------------------------- /details-ephemeral/payload-details.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Name*\nDavid Pichsenmeister\n\n*Email*\n\n\n*Company*\nDemo Corp\n\n*Product Interest*\nMarketing Automation\n\n*What's your company's website?*\n\n\n*How many people are employed at your company?*\n1500-2000\n\n*Which tools are you currently using?*\nSalesforce, Hubspot\n\n*Are you interested in a demo?*\nYes" 7 | }, 8 | "accessory": { 9 | "type": "button", 10 | "text": { 11 | "type": "plain_text", 12 | "text": "View on Web :arrow_upper_right:", 13 | "emoji": true 14 | }, 15 | "value": "click_me_123" 16 | } 17 | }, 18 | { 19 | "type": "context", 20 | "elements": [ 21 | { 22 | "type": "mrkdwn", 23 | "text": ":calendar: *Date:* May 17, 2019 3:14pm" 24 | }, 25 | { 26 | "type": "mrkdwn", 27 | "text": ":envelope_with_arrow: *Inbound:* Website" 28 | } 29 | ] 30 | }, 31 | { 32 | "type": "divider" 33 | }, 34 | { 35 | "type": "actions", 36 | "elements": [ 37 | { 38 | "type": "users_select", 39 | "placeholder": { 40 | "type": "plain_text", 41 | "text": "Assign to", 42 | "emoji": true 43 | } 44 | }, 45 | { 46 | "type": "channels_select", 47 | "placeholder": { 48 | "type": "plain_text", 49 | "text": "Post to channel", 50 | "emoji": true 51 | } 52 | } 53 | ] 54 | } 55 | ] -------------------------------------------------------------------------------- /details-ephemeral/payload-message.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Hey there!*\nWe captured a new lead for you." 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "*Name*: David Pichsenmeister\n*Email*: \n*Company*: Demo Corp\n*Product Interest*: Marketing Automation" 17 | }, 18 | "accessory": { 19 | "type": "button", 20 | "text": { 21 | "type": "plain_text", 22 | "text": "View on Web :arrow_upper_right:", 23 | "emoji": true 24 | }, 25 | "value": "click_me_123" 26 | } 27 | }, 28 | { 29 | "type": "context", 30 | "elements": [ 31 | { 32 | "type": "mrkdwn", 33 | "text": ":calendar: *Date:* May 17, 2019 3:14pm" 34 | }, 35 | { 36 | "type": "mrkdwn", 37 | "text": ":envelope_with_arrow: *Inbound:* Website" 38 | } 39 | ] 40 | }, 41 | { 42 | "type": "divider" 43 | }, 44 | { 45 | "type": "actions", 46 | "elements": [ 47 | { 48 | "type": "users_select", 49 | "placeholder": { 50 | "type": "plain_text", 51 | "text": "Assign to", 52 | "emoji": true 53 | } 54 | }, 55 | { 56 | "type": "channels_select", 57 | "placeholder": { 58 | "type": "plain_text", 59 | "text": "Post to channel", 60 | "emoji": true 61 | } 62 | }, 63 | { 64 | "type": "button", 65 | "text": { 66 | "type": "plain_text", 67 | "text": "Show details", 68 | "emoji": true 69 | }, 70 | "value": "show_details" 71 | } 72 | ] 73 | } 74 | ] -------------------------------------------------------------------------------- /details-thread/README.md: -------------------------------------------------------------------------------- 1 | # Blueprint: Details View in Thread 2 | 3 | ![](details-thread.gif) 4 | *Details in Thread* 5 | 6 | 🎥 [High Resolution screencast](details-thread.mp4) 7 | 8 | ### Examples 9 | 10 | * Providing a more detailed view for a notification 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Message notification 24 | 25 | * [payload.json](payload-message.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Hey%20there!*%5CnWe%20captured%20a%20new%20lead%20for%20you.%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Name*%3A%20David%20Pichsenmeister%5Cn*Email*%3A%20%3Cfakelink.toUser.com%7Cdavidpichsenmeister%40example.com%3E%5Cn*Company*%3A%20Demo%20Corp%5Cn*Product%20Interest*%3A%20Marketing%20Automation%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20on%20Web%20%3Aarrow_upper_right%3A%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22click_me_123%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Acalendar%3A%20*Date%3A*%20May%2017%2C%202019%203%3A14pm%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Aenvelope_with_arrow%3A%20*Inbound%3A*%20Website%22%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22users_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Assign%20to%22%2C%22emoji%22%3Atrue%7D%7D%2C%7B%22type%22%3A%22channels_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Post%20to%20channel%22%2C%22emoji%22%3Atrue%7D%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20details%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22show_details%22%7D%5D%7D%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | 33 | ### 2. Thread details message 34 | 35 | * [payload.json](payload-details.json) 36 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*What%27s%20your%20company%27s%20website%3F*%5Cn%3Cfakelink.toUser.com%7Cdemo-corp.com%3E%5Cn%5Cn*How%20many%20people%20are%20employed%20at%20your%20company%3F*%5Cn1500-2000%5Cn%5Cn*Which%20tools%20are%20you%20currently%20using%3F*%5CnSalesforce%2C%20Hubspot%5Cn%5Cn*Are%20you%20interested%20in%20a%20demo%3F*%5CnYes%22%7D%7D%5D) 37 | 38 | #### Methods 39 | 40 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 41 | 42 | 43 | -------------------------------------------------------------------------------- /details-thread/details-thread.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/details-thread/details-thread.gif -------------------------------------------------------------------------------- /details-thread/details-thread.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/details-thread/details-thread.mp4 -------------------------------------------------------------------------------- /details-thread/payload-details.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*What's your company's website?*\n\n\n*How many people are employed at your company?*\n1500-2000\n\n*Which tools are you currently using?*\nSalesforce, Hubspot\n\n*Are you interested in a demo?*\nYes" 7 | } 8 | } 9 | ] -------------------------------------------------------------------------------- /details-thread/payload-message.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Hey there!*\nWe captured a new lead for you." 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "*Name*: David Pichsenmeister\n*Email*: \n*Company*: Demo Corp\n*Product Interest*: Marketing Automation" 17 | }, 18 | "accessory": { 19 | "type": "button", 20 | "text": { 21 | "type": "plain_text", 22 | "text": "View on Web :arrow_upper_right:", 23 | "emoji": true 24 | }, 25 | "value": "click_me_123" 26 | } 27 | }, 28 | { 29 | "type": "context", 30 | "elements": [ 31 | { 32 | "type": "mrkdwn", 33 | "text": ":calendar: *Date:* May 17, 2019 3:14pm" 34 | }, 35 | { 36 | "type": "mrkdwn", 37 | "text": ":envelope_with_arrow: *Inbound:* Website" 38 | } 39 | ] 40 | }, 41 | { 42 | "type": "divider" 43 | }, 44 | { 45 | "type": "actions", 46 | "elements": [ 47 | { 48 | "type": "users_select", 49 | "placeholder": { 50 | "type": "plain_text", 51 | "text": "Assign to", 52 | "emoji": true 53 | } 54 | }, 55 | { 56 | "type": "channels_select", 57 | "placeholder": { 58 | "type": "plain_text", 59 | "text": "Post to channel", 60 | "emoji": true 61 | } 62 | }, 63 | { 64 | "type": "button", 65 | "text": { 66 | "type": "plain_text", 67 | "text": "Show details", 68 | "emoji": true 69 | }, 70 | "value": "show_details" 71 | } 72 | ] 73 | } 74 | ] -------------------------------------------------------------------------------- /expand-collapse/README.md: -------------------------------------------------------------------------------- 1 | # Expand & Collapse 2 | 3 | ![](expand-collapse.gif) 4 | *Expand & Collapse* 5 | 6 | 🎥 [High Resolution screencast](expand-collapse.mp4) 7 | 8 | ### Examples 9 | 10 | * Simple expand & collapse functionality by updating the message 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Post message to channel 24 | 25 | * [payload.json](payload-collapse.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22A%20build%20error%20was%20triggered%20for%20%3Cfakelink.toUrl.com%7Cbuild%20%23112%3E%5Cn%60%60%60ERROR%3A%20Invocation%20error%20for%20command%20%27%2Fbuild%2Fdesktop-app%2Fsetup.py%27%20(exited%20with%20code%201)%60%60%60%22%7D%2C%22fields%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Branch*%5Cndesktop-app%2Fmaster%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Author*%5Cn%3Cfakelink.toUser.com%7C%40David%3E%22%7D%5D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Ared_circle%3A%20Build%20failed%20at%20March%2014%20at%201%3A59PM%22%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Expand%22%7D%2C%22value%22%3A%22expand%22%7D%5D%7D%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | 33 | ### 2. Expand message via update 34 | 35 | * [payload.json](payload-expand.json) 36 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22A%20build%20error%20was%20triggered%20for%20%3Cfakelink.toUrl.com%7Cbuild%20%23112%3E%5Cn%60%60%60ERROR%3A%20Invocation%20error%20for%20command%20%27%2Fbuild%2Fdesktop-app%2Fsetup.py%27%20(exited%20with%20code%201)%60%60%60%22%7D%2C%22fields%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Branch*%5Cndesktop-app%2Fmaster%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Author*%5Cn%3Cfakelink.toUser.com%7C%40David%3E%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Version*%5Cn3.14.15%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Commit*%5Cn%3Cfakelink.toUrl.com%7Ccedbadc8550%3E%22%7D%5D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Stack%20trace*%5Cn%60%60%60During%20handling%20of%20the%20above%20exception%2C%20another%20exception%20occurred%3A%5Cn%5CnTraceback%20(most%20recent%20call%20last)%3A%5CnFile%20%27%3Cstring%3E%27%2C%20line%201%2C%20in%20%3Cmodule%3E%5CnFile%20%27%2Ftmp%2Fpip-install-w9661i00%2Fpycares%2Fsetup.py%27%2C%20line%2045%2C%20in%20%3Cmodule%3E%5Cnzip_safe%20%20%20%20%20%20%20%20%20%3D%20False%5CnFile%20%27%2Fusr%2Flocal%2Flib%2Fpython3.7%2Fsite-packages%2Fsetuptools%2F__init__.py%27%2C%20line%20144%2C%20in%20setup%5Cn_install_setup_requires(attrs)%5CnFile%20%27%2Fusr%2Flocal%2Flib%2Fpython3.7%2Fsite-packages%2Fsetuptools%2F__init__.py%27%2C%20line%20139%2C%20in%20_install_setup_requires%5Cndist.fetch_build_eggs(dist.setup_requires)%5CnFile%20%27%2Fusr%2Flocal%2Flib%2Fpython3.7%2Fsite-packages%2Fsetuptools%2Fdist.py%27%2C%20line%20717%2C%20in%20fetch_build_eggs%5Cnreplace_conflicting%3DTrue%2C%5CnFile%20%27%2Fusr%2Flocal%2Flib%2Fpython3.7%2Fsite-packages%2Fpkg_resources%2F__init__.py%27%2C%20line%20782%2C%20in%20resolve%5Cnreplace_conflicting%3Dreplace_conflicting%5CnFile%20%27%2Fusr%2Flocal%2Flib%2Fpython3.7%2Fsite-packages%2Fpkg_resources%2F__init__.py%27%2C%20line%201065%2C%20in%20best_match%5Cnreturn%20self.obtain(req%2C%20installer)%5Cndistutils.errors.DistutilsError%3A%20Setup%20script%20exited%20with%20error%3A%20command%20%27gcc%27%20failed%20with%20exit%20status%201%5Cn----------------------------------------%5Cn%5CnERROR%3A%20Command%20%27python%20setup.py%20egg_info%27%20failed%20with%20error%20code%201%20in%20%2Ftmp%2Fpip-install-w9661i00%2Fpycares%2F%60%60%60%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Ared_circle%3A%20Build%20failed%20at%20March%2014%20at%201%3A59PM%22%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Collapse%22%7D%2C%22value%22%3A%22collapse%22%7D%5D%7D%5D) 37 | 38 | #### Methods 39 | 40 | * [`chat.update`](https://api.slack.com/methods/chat.update) 41 | 42 | 43 | -------------------------------------------------------------------------------- /expand-collapse/expand-collapse.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/expand-collapse/expand-collapse.gif -------------------------------------------------------------------------------- /expand-collapse/expand-collapse.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/expand-collapse/expand-collapse.mp4 -------------------------------------------------------------------------------- /expand-collapse/payload-collapse.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "A build error was triggered for \n```ERROR: Invocation error for command '/build/desktop-app/setup.py' (exited with code 1)```" 7 | }, 8 | "fields": [ 9 | { 10 | "type": "mrkdwn", 11 | "text": "*Branch*\ndesktop-app/master" 12 | }, 13 | { 14 | "type": "mrkdwn", 15 | "text": "*Author*\n" 16 | } 17 | ] 18 | }, 19 | { 20 | "type": "context", 21 | "elements": [ 22 | { 23 | "type": "mrkdwn", 24 | "text": ":red_circle: Build failed at March 14 at 1:59PM" 25 | } 26 | ] 27 | }, 28 | { 29 | "type": "divider" 30 | }, 31 | { 32 | "type": "actions", 33 | "elements": [ 34 | { 35 | "type": "button", 36 | "text": { 37 | "type": "plain_text", 38 | "emoji": true, 39 | "text": "Expand" 40 | }, 41 | "value": "expand" 42 | } 43 | ] 44 | } 45 | ] -------------------------------------------------------------------------------- /expand-collapse/payload-expand.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "A build error was triggered for \n```ERROR: Invocation error for command '/build/desktop-app/setup.py' (exited with code 1)```" 7 | }, 8 | "fields": [ 9 | { 10 | "type": "mrkdwn", 11 | "text": "*Branch*\ndesktop-app/master" 12 | }, 13 | { 14 | "type": "mrkdwn", 15 | "text": "*Author*\n" 16 | }, 17 | { 18 | "type": "mrkdwn", 19 | "text": "*Version*\n3.14.15" 20 | }, 21 | { 22 | "type": "mrkdwn", 23 | "text": "*Commit*\n" 24 | } 25 | ] 26 | }, 27 | { 28 | "type": "section", 29 | "text": { 30 | "type": "mrkdwn", 31 | "text": "*Stack trace*\n```During handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\nFile '', line 1, in \nFile '/tmp/pip-install-w9661i00/pycares/setup.py', line 45, in \nzip_safe = False\nFile '/usr/local/lib/python3.7/site-packages/setuptools/__init__.py', line 144, in setup\n_install_setup_requires(attrs)\nFile '/usr/local/lib/python3.7/site-packages/setuptools/__init__.py', line 139, in _install_setup_requires\ndist.fetch_build_eggs(dist.setup_requires)\nFile '/usr/local/lib/python3.7/site-packages/setuptools/dist.py', line 717, in fetch_build_eggs\nreplace_conflicting=True,\nFile '/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py', line 782, in resolve\nreplace_conflicting=replace_conflicting\nFile '/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py', line 1065, in best_match\nreturn self.obtain(req, installer)\ndistutils.errors.DistutilsError: Setup script exited with error: command 'gcc' failed with exit status 1\n----------------------------------------\n\nERROR: Command 'python setup.py egg_info' failed with error code 1 in /tmp/pip-install-w9661i00/pycares/```" 32 | } 33 | }, 34 | { 35 | "type": "context", 36 | "elements": [ 37 | { 38 | "type": "mrkdwn", 39 | "text": ":red_circle: Build failed at March 14 at 1:59PM" 40 | } 41 | ] 42 | }, 43 | { 44 | "type": "divider" 45 | }, 46 | { 47 | "type": "actions", 48 | "elements": [ 49 | { 50 | "type": "button", 51 | "text": { 52 | "type": "plain_text", 53 | "emoji": true, 54 | "text": "Collapse" 55 | }, 56 | "value": "collapse" 57 | } 58 | ] 59 | } 60 | ] -------------------------------------------------------------------------------- /hr/review/README.md: -------------------------------------------------------------------------------- 1 | # Peer review 2 | 3 | ![](hr-review.gif) 4 | *Peer review* 5 | 6 | 🎥 [High Resolution screencast](hr-review.mp4) 7 | 8 | ### Examples 9 | 10 | * Peer review your coworkers 11 | * Give feedback 12 | 13 | ## Required features 14 | 15 | * [Bot User](https://api.slack.com/bot-users) 16 | * [Interactive Components](https://api.slack.com/interactive-messages) 17 | 18 | ## Required scopes 19 | 20 | * [`bot`](https://api.slack.com/scopes/bot) 21 | 22 | ## Implementation overview 23 | 24 | ### 1. Provide an entry point to give feedback in e.g. a help message 25 | 26 | * [payload.json](payload-help.json) 27 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Hi%20%3Cfakelink.toUser.com%7CDavid%3E!*%20Here%27s%20how%20I%20can%20help%20you%3A%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Adollar%3A%20*Pay*%5CnView%20latest%20pay%20info%2C%20history%20and%20summary%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Latest%20Pay%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22pay%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Summary%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Pay%20History%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Aspeaking_head_in_silhouette%3A%20*Peer%20reviews*%5CnGive%20and%20receive%20feedback%20from%20your%20colleagues%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Give%20feedback%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22give_feedback%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Request%20feedback%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Your%20reviews%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Aclock1%3A%20*Time%20off*%5CnManage%20and%20view%20your%20time%20off%20requests%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Request%20time%20off%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22pay%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22See%20requests%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Your%20reviews%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Agear%3A%20*Settings*%5CnNotifications%2C%20Account%20settings%20and%20more%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choose%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Notifications%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Choice%202%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%7D%5D) 28 | 29 | #### Methods 30 | 31 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 32 | 33 | ### 2. Open modal to collect feedback 34 | 35 | * [payload.json](payload-modal.json) 36 | 37 | #### Methods 38 | 39 | * [`views.open`](https://api.slack.com/methods/views.open) 40 | 41 | ### 3. Post confirmation back to App DM 42 | 43 | * [payload.json](payload-confirmation.json) 44 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3Amailbox_with_mail%3A%20*Your%20feedback%20has%20been%20sent%20to%20%3Cfakelink.toUser.com%7C%40John%3E%20and%20his%20manager%20%3Cfakelink.toUser.com%7C%40Ally%3E.*%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22%3E%3E%3E%20One%20of%20your%20most%20impactful%20moments%20were%20the%20insights%20you%20gleaned%20based%20on%20Project%20X.%20It%20showed%20the%20power%20of%20user%20testing%20in%20shaping%20a%20feature%20roadmap%20and%20increases%20the%20likelihood%20that%20we%20satisfy%20and%20delight%20our%20users.%20I%27d%20love%20to%20see%20you%20do%20more%20of%20this.%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fstatic.thenounproject.com%2Fpng%2F347639-200.png%22%2C%22alt_text%22%3A%22palm%20tree%22%7D%7D%5D) 45 | 46 | #### Methods 47 | 48 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 49 | -------------------------------------------------------------------------------- /hr/review/hr-review.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/review/hr-review.gif -------------------------------------------------------------------------------- /hr/review/hr-review.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/review/hr-review.mp4 -------------------------------------------------------------------------------- /hr/review/payload-confirmation.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": ":mailbox_with_mail: *Your feedback has been sent to and his manager .*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": ">>> One of your most impactful moments were the insights you gleaned based on Project X. It showed the power of user testing in shaping a feature roadmap and increases the likelihood that we satisfy and delight our users. I'd love to see you do more of this." 17 | }, 18 | "accessory": { 19 | "type": "image", 20 | "image_url": "https://static.thenounproject.com/png/347639-200.png", 21 | "alt_text": "palm tree" 22 | } 23 | } 24 | ] -------------------------------------------------------------------------------- /hr/review/payload-help.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Hi !* Here's how I can help you:" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": ":dollar: *Pay*\nView latest pay info, history and summary" 17 | }, 18 | "accessory": { 19 | "type": "static_select", 20 | "placeholder": { 21 | "type": "plain_text", 22 | "text": "Choose", 23 | "emoji": true 24 | }, 25 | "options": [ 26 | { 27 | "text": { 28 | "type": "plain_text", 29 | "text": "Latest Pay", 30 | "emoji": true 31 | }, 32 | "value": "pay" 33 | }, 34 | { 35 | "text": { 36 | "type": "plain_text", 37 | "text": "Summary", 38 | "emoji": true 39 | }, 40 | "value": "value-1" 41 | }, 42 | { 43 | "text": { 44 | "type": "plain_text", 45 | "text": "Pay History", 46 | "emoji": true 47 | }, 48 | "value": "value-1" 49 | } 50 | ] 51 | } 52 | }, 53 | { 54 | "type": "section", 55 | "text": { 56 | "type": "mrkdwn", 57 | "text": ":speaking_head_in_silhouette: *Peer reviews*\nGive and receive feedback from your colleagues" 58 | }, 59 | "accessory": { 60 | "type": "static_select", 61 | "placeholder": { 62 | "type": "plain_text", 63 | "text": "Choose", 64 | "emoji": true 65 | }, 66 | "options": [ 67 | { 68 | "text": { 69 | "type": "plain_text", 70 | "text": "Give feedback", 71 | "emoji": true 72 | }, 73 | "value": "give_feedback" 74 | }, 75 | { 76 | "text": { 77 | "type": "plain_text", 78 | "text": "Request feedback", 79 | "emoji": true 80 | }, 81 | "value": "value-1" 82 | }, 83 | { 84 | "text": { 85 | "type": "plain_text", 86 | "text": "Your reviews", 87 | "emoji": true 88 | }, 89 | "value": "value-1" 90 | } 91 | ] 92 | } 93 | }, 94 | { 95 | "type": "section", 96 | "text": { 97 | "type": "mrkdwn", 98 | "text": ":clock1: *Time off*\nManage and view your time off requests" 99 | }, 100 | "accessory": { 101 | "type": "static_select", 102 | "placeholder": { 103 | "type": "plain_text", 104 | "text": "Choose", 105 | "emoji": true 106 | }, 107 | "options": [ 108 | { 109 | "text": { 110 | "type": "plain_text", 111 | "text": "Request time off", 112 | "emoji": true 113 | }, 114 | "value": "pay" 115 | }, 116 | { 117 | "text": { 118 | "type": "plain_text", 119 | "text": "See requests", 120 | "emoji": true 121 | }, 122 | "value": "value-1" 123 | }, 124 | { 125 | "text": { 126 | "type": "plain_text", 127 | "text": "Your reviews", 128 | "emoji": true 129 | }, 130 | "value": "value-1" 131 | } 132 | ] 133 | } 134 | }, 135 | { 136 | "type": "section", 137 | "text": { 138 | "type": "mrkdwn", 139 | "text": ":gear: *Settings*\nNotifications, Account settings and more" 140 | }, 141 | "accessory": { 142 | "type": "static_select", 143 | "placeholder": { 144 | "type": "plain_text", 145 | "text": "Choose", 146 | "emoji": true 147 | }, 148 | "options": [ 149 | { 150 | "text": { 151 | "type": "plain_text", 152 | "text": "Notifications", 153 | "emoji": true 154 | }, 155 | "value": "value-0" 156 | }, 157 | { 158 | "text": { 159 | "type": "plain_text", 160 | "text": "Choice 2", 161 | "emoji": true 162 | }, 163 | "value": "value-1" 164 | } 165 | ] 166 | } 167 | } 168 | ] -------------------------------------------------------------------------------- /hr/review/payload-modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "callback_id": "feedback", 3 | "type": "modal", 4 | "title": { 5 | "type": "plain_text", 6 | "text": "Give feedback", 7 | "emoji": true 8 | }, 9 | "submit": { 10 | "type": "plain_text", 11 | "text": "Submit", 12 | "emoji": true 13 | }, 14 | "close": { 15 | "type": "plain_text", 16 | "text": "Cancel", 17 | "emoji": true 18 | }, 19 | "blocks": [ 20 | { 21 | "type": "input", 22 | "element": { 23 | "type": "users_select", 24 | "placeholder": { 25 | "type": "plain_text", 26 | "text": "Select your colleague", 27 | "emoji": true 28 | } 29 | }, 30 | "label": { 31 | "type": "plain_text", 32 | "text": "Select your colleague", 33 | "emoji": true 34 | } 35 | }, 36 | { 37 | "type": "input", 38 | "element": { 39 | "type": "plain_text_input", 40 | "multiline": true, 41 | "placeholder": { 42 | "type": "plain_text", 43 | "text": "Enter your feedback here.", 44 | "emoji": true 45 | } 46 | }, 47 | "label": { 48 | "type": "plain_text", 49 | "text": "What do you want to share?", 50 | "emoji": true 51 | } 52 | }, 53 | { 54 | "type": "input", 55 | "element": { 56 | "type": "static_select", 57 | "placeholder": { 58 | "type": "plain_text", 59 | "text": "Select an option", 60 | "emoji": true 61 | }, 62 | "options": [ 63 | { 64 | "text": { 65 | "type": "plain_text", 66 | "text": "Private" 67 | }, 68 | "value": "private" 69 | }, 70 | { 71 | "text": { 72 | "type": "plain_text", 73 | "text": "Private + Manager" 74 | }, 75 | "value": "private+manager" 76 | }, 77 | { 78 | "text": { 79 | "type": "plain_text", 80 | "text": "Manager only" 81 | }, 82 | "value": "manager" 83 | } 84 | ] 85 | }, 86 | "label": { 87 | "type": "plain_text", 88 | "text": "Visibility", 89 | "emoji": true 90 | } 91 | } 92 | ] 93 | } -------------------------------------------------------------------------------- /hr/survey/README.md: -------------------------------------------------------------------------------- 1 | # HR Culture survey 2 | 3 | ![](hr-survey.gif) 4 | *HR culture survey* 5 | 6 | 🎥 [High Resolution screencast](hr-survey.mp4) 7 | 8 | ### Example 9 | 10 | Performing a culture survey in Slack 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Start survey 24 | 25 | * [payload.json](payload-start.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%22Hi%20%3CfakeLink.toUser.com%7CDavid%3E!%5Cn%5CnOur%20Q1%20Pulse%20Survey%20launches%20today.%20Please%20take%20a%20few%20minutes%20to%20give%20your%20honest%20opinion%20on%20how%20things%20are%20going.%5Cn%5CnYou%20have%20until%20Friday%2C%20April%2019%20to%20respond.%20Thank%20you!%22%0A%20%20%20%20%7D%0A%20%20%7D%2C%0A%20%20%7B%0A%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Start%20survey%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22style%22%3A%20%22primary%22%2C%0A%20%20%20%20%20%20%20%20%22value%22%3A%20%22start%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Aalarm_clock%3A%20Remind%20me%20later%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22value%22%3A%20%22remind%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%5D%0A%20%20%7D%0A%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | ### 2. Question 33 | 34 | * [payload.json](payload-question.json) 35 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Question%201*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22overflow%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22options%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Aback%3A%20Previous%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22previous%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Ax%3A%20Cancel%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22cancel%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22This%20job%20is%20a%20good%20fit%20for%20a%20person%20like%20me.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Fully%20agree%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22style%22%3A%20%22primary%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%225%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Agree%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%224%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Neutral%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%223%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Disagree%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%222%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Fully%20disagree%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22style%22%3A%20%22danger%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%221%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Question%201%20of%203%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 36 | 37 | #### Methods 38 | 39 | * [`chat.update`](https://api.slack.com/methods/chat.update) 40 | 41 | ### 3. Review submission 42 | 43 | * [payload.json](payload-review.json) 44 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22Here%20are%20your%20answers%2C%20%3CfakeLink.toUser.com%7CDavid%3E%3A%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Question%201*%5CnThis%20job%20is%20a%20good%20fit%20for%20a%20person%20like%20me.%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Select%20answer%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A5%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A4%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Neutral%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A3%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A2%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A1%22%7D%5D%2C%22initial_option%22%3A%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%221%3A5%22%7D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Question%202*%5CnThe%20atmosphere%20here%20is%20good.%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Select%20answer%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A5%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A4%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Neutral%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A3%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A2%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A1%22%7D%5D%2C%22initial_option%22%3A%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%222%3A4%22%7D%7D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Question%203*%5CnI%20personally%20agree%20with%20the%20organization%27s%20values.%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22static_select%22%2C%22placeholder%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Select%20answer%22%2C%22emoji%22%3Atrue%7D%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A5%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A4%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Neutral%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A3%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A2%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Fully%20disagree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A1%22%7D%5D%2C%22initial_option%22%3A%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Agree%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%223%3A4%22%7D%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Submit%20answers%22%2C%22emoji%22%3Atrue%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22submit%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Cancel%22%2C%22emoji%22%3Atrue%7D%2C%22style%22%3A%22danger%22%2C%22value%22%3A%22cancel%22%7D%5D%7D%5D) 45 | 46 | #### Methods 47 | 48 | * [`chat.update`](https://api.slack.com/methods/chat.update) 49 | 50 | ### 4. Confirmation 51 | 52 | * [payload.json](payload-confirm.json) 53 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Thank%20you%2C%20%3CfakeLink.toUser.com%7CDavid%3E!*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Question%201*%5CnThis%20job%20is%20a%20good%20fit%20for%20a%20person%20like%20me.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Answer%3A*%20Fully%20agree%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Question%202*%5CnThe%20atmosphere%20here%20is%20good.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Answer%3A*%20Agree%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Question%203*%5CnI%20personally%20agree%20with%20the%20organization%27s%20values.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Answer%3A*%20Agree%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Awhite_check_mark%3A%20You%20submitted%20this%20survey%20on%2003%2F14%2F2019%20at%2003%3A45pm%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 54 | 55 | #### Methods 56 | 57 | * [`chat.update`](https://api.slack.com/methods/chat.update) 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /hr/survey/hr-survey.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/survey/hr-survey.gif -------------------------------------------------------------------------------- /hr/survey/hr-survey.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/survey/hr-survey.mp4 -------------------------------------------------------------------------------- /hr/survey/payload-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Thank you, !*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "*Question 1*\nThis job is a good fit for a person like me." 17 | } 18 | }, 19 | { 20 | "type": "context", 21 | "elements": [ 22 | { 23 | "type": "mrkdwn", 24 | "text": "*Answer:* Fully agree" 25 | } 26 | ] 27 | }, 28 | { 29 | "type": "section", 30 | "text": { 31 | "type": "mrkdwn", 32 | "text": "*Question 2*\nThe atmosphere here is good." 33 | } 34 | }, 35 | { 36 | "type": "context", 37 | "elements": [ 38 | { 39 | "type": "mrkdwn", 40 | "text": "*Answer:* Agree" 41 | } 42 | ] 43 | }, 44 | { 45 | "type": "section", 46 | "text": { 47 | "type": "mrkdwn", 48 | "text": "*Question 3*\nI personally agree with the organization's values." 49 | } 50 | }, 51 | { 52 | "type": "context", 53 | "elements": [ 54 | { 55 | "type": "mrkdwn", 56 | "text": "*Answer:* Agree" 57 | } 58 | ] 59 | }, 60 | { 61 | "type": "divider" 62 | }, 63 | { 64 | "type": "context", 65 | "elements": [ 66 | { 67 | "type": "mrkdwn", 68 | "text": ":white_check_mark: You submitted this survey on 03/14/2019 at 03:45pm" 69 | } 70 | ] 71 | } 72 | ] -------------------------------------------------------------------------------- /hr/survey/payload-question.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Question 1*" 7 | }, 8 | "accessory": { 9 | "type": "overflow", 10 | "options": [ 11 | { 12 | "text": { 13 | "type": "plain_text", 14 | "text": ":back: Previous", 15 | "emoji": true 16 | }, 17 | "value": "previous" 18 | }, 19 | { 20 | "text": { 21 | "type": "plain_text", 22 | "text": ":x: Cancel", 23 | "emoji": true 24 | }, 25 | "value": "cancel" 26 | } 27 | ] 28 | } 29 | }, 30 | { 31 | "type": "divider" 32 | }, 33 | { 34 | "type": "section", 35 | "text": { 36 | "type": "mrkdwn", 37 | "text": "This job is a good fit for a person like me." 38 | } 39 | }, 40 | { 41 | "type": "actions", 42 | "elements": [ 43 | { 44 | "type": "button", 45 | "text": { 46 | "type": "plain_text", 47 | "text": "Fully agree", 48 | "emoji": true 49 | }, 50 | "style": "primary", 51 | "value": "5" 52 | }, 53 | { 54 | "type": "button", 55 | "text": { 56 | "type": "plain_text", 57 | "text": "Agree", 58 | "emoji": true 59 | }, 60 | "value": "4" 61 | }, 62 | { 63 | "type": "button", 64 | "text": { 65 | "type": "plain_text", 66 | "text": "Neutral", 67 | "emoji": true 68 | }, 69 | "value": "3" 70 | }, 71 | { 72 | "type": "button", 73 | "text": { 74 | "type": "plain_text", 75 | "text": "Disagree", 76 | "emoji": true 77 | }, 78 | "value": "2" 79 | }, 80 | { 81 | "type": "button", 82 | "text": { 83 | "type": "plain_text", 84 | "text": "Fully disagree", 85 | "emoji": true 86 | }, 87 | "style": "danger", 88 | "value": "1" 89 | } 90 | ] 91 | }, 92 | { 93 | "type": "divider" 94 | }, 95 | { 96 | "type": "context", 97 | "elements": [ 98 | { 99 | "type": "mrkdwn", 100 | "text": "Question 1 of 3" 101 | } 102 | ] 103 | } 104 | ] -------------------------------------------------------------------------------- /hr/survey/payload-review.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Here are your answers, :" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "*Question 1*\nThis job is a good fit for a person like me." 17 | }, 18 | "accessory": { 19 | "type": "static_select", 20 | "placeholder": { 21 | "type": "plain_text", 22 | "text": "Select answer", 23 | "emoji": true 24 | }, 25 | "options": [ 26 | { 27 | "text": { 28 | "type": "plain_text", 29 | "text": "Fully agree", 30 | "emoji": true 31 | }, 32 | "value": "1:5" 33 | }, 34 | { 35 | "text": { 36 | "type": "plain_text", 37 | "text": "Agree", 38 | "emoji": true 39 | }, 40 | "value": "1:4" 41 | }, 42 | { 43 | "text": { 44 | "type": "plain_text", 45 | "text": "Neutral", 46 | "emoji": true 47 | }, 48 | "value": "1:3" 49 | }, 50 | { 51 | "text": { 52 | "type": "plain_text", 53 | "text": "Disagree", 54 | "emoji": true 55 | }, 56 | "value": "1:2" 57 | }, 58 | { 59 | "text": { 60 | "type": "plain_text", 61 | "text": "Fully disagree", 62 | "emoji": true 63 | }, 64 | "value": "1:1" 65 | } 66 | ], 67 | "initial_option": { 68 | "text": { 69 | "type": "plain_text", 70 | "text": "Fully agree", 71 | "emoji": true 72 | }, 73 | "value": "1:5" 74 | } 75 | } 76 | }, 77 | { 78 | "type": "section", 79 | "text": { 80 | "type": "mrkdwn", 81 | "text": "*Question 2*\nThe atmosphere here is good." 82 | }, 83 | "accessory": { 84 | "type": "static_select", 85 | "placeholder": { 86 | "type": "plain_text", 87 | "text": "Select answer", 88 | "emoji": true 89 | }, 90 | "options": [ 91 | { 92 | "text": { 93 | "type": "plain_text", 94 | "text": "Fully agree", 95 | "emoji": true 96 | }, 97 | "value": "2:5" 98 | }, 99 | { 100 | "text": { 101 | "type": "plain_text", 102 | "text": "Agree", 103 | "emoji": true 104 | }, 105 | "value": "2:4" 106 | }, 107 | { 108 | "text": { 109 | "type": "plain_text", 110 | "text": "Neutral", 111 | "emoji": true 112 | }, 113 | "value": "2:3" 114 | }, 115 | { 116 | "text": { 117 | "type": "plain_text", 118 | "text": "Disagree", 119 | "emoji": true 120 | }, 121 | "value": "2:2" 122 | }, 123 | { 124 | "text": { 125 | "type": "plain_text", 126 | "text": "Fully disagree", 127 | "emoji": true 128 | }, 129 | "value": "2:1" 130 | } 131 | ], 132 | "initial_option": { 133 | "text": { 134 | "type": "plain_text", 135 | "text": "Agree", 136 | "emoji": true 137 | }, 138 | "value": "2:4" 139 | } 140 | } 141 | }, 142 | { 143 | "type": "section", 144 | "text": { 145 | "type": "mrkdwn", 146 | "text": "*Question 3*\nI personally agree with the organization's values." 147 | }, 148 | "accessory": { 149 | "type": "static_select", 150 | "placeholder": { 151 | "type": "plain_text", 152 | "text": "Select answer", 153 | "emoji": true 154 | }, 155 | "options": [ 156 | { 157 | "text": { 158 | "type": "plain_text", 159 | "text": "Fully agree", 160 | "emoji": true 161 | }, 162 | "value": "3:5" 163 | }, 164 | { 165 | "text": { 166 | "type": "plain_text", 167 | "text": "Agree", 168 | "emoji": true 169 | }, 170 | "value": "3:4" 171 | }, 172 | { 173 | "text": { 174 | "type": "plain_text", 175 | "text": "Neutral", 176 | "emoji": true 177 | }, 178 | "value": "3:3" 179 | }, 180 | { 181 | "text": { 182 | "type": "plain_text", 183 | "text": "Disagree", 184 | "emoji": true 185 | }, 186 | "value": "3:2" 187 | }, 188 | { 189 | "text": { 190 | "type": "plain_text", 191 | "text": "Fully disagree", 192 | "emoji": true 193 | }, 194 | "value": "3:1" 195 | } 196 | ], 197 | "initial_option": { 198 | "text": { 199 | "type": "plain_text", 200 | "text": "Agree", 201 | "emoji": true 202 | }, 203 | "value": "3:4" 204 | } 205 | } 206 | }, 207 | { 208 | "type": "divider" 209 | }, 210 | { 211 | "type": "actions", 212 | "elements": [ 213 | { 214 | "type": "button", 215 | "text": { 216 | "type": "plain_text", 217 | "text": "Submit answers", 218 | "emoji": true 219 | }, 220 | "style": "primary", 221 | "value": "submit" 222 | }, 223 | { 224 | "type": "button", 225 | "text": { 226 | "type": "plain_text", 227 | "text": "Cancel", 228 | "emoji": true 229 | }, 230 | "style": "danger", 231 | "value": "cancel" 232 | } 233 | ] 234 | } 235 | ] -------------------------------------------------------------------------------- /hr/survey/payload-start.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Hi !\n\nOur Q1 Pulse Survey launches today. Please take a few minutes to give your honest opinion on how things are going.\n\nYou have until Friday, April 19 to respond. Thank you!" 7 | } 8 | }, 9 | { 10 | "type": "actions", 11 | "elements": [ 12 | { 13 | "type": "button", 14 | "text": { 15 | "type": "plain_text", 16 | "text": "Start survey", 17 | "emoji": true 18 | }, 19 | "style": "primary", 20 | "value": "start" 21 | }, 22 | { 23 | "type": "button", 24 | "text": { 25 | "type": "plain_text", 26 | "text": ":alarm_clock: Remind me later", 27 | "emoji": true 28 | }, 29 | "value": "remind" 30 | } 31 | ] 32 | } 33 | ] -------------------------------------------------------------------------------- /hr/timeoff/README.md: -------------------------------------------------------------------------------- 1 | # HR time off request 2 | 3 | ![](hr-timeoff.gif) 4 | *HR time off request* 5 | 6 | 🎥 [High Resolution screencast](hr-timeoff.mp4) 7 | 8 | ### Examples 9 | 10 | * Requesting time off in Slack 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Start request 24 | 25 | * [payload.json](payload-request-step-0.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Request%20your%20time%20off*%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22Choose%20your%20request%20type%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22static_select%22%2C%0A%20%20%20%20%20%20%20%20%22placeholder%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Request%20type%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22options%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Paid%20Time%20Off%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22pto%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Jury%20Duty%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22jury_duty%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Volunteering%20Day%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22volunteering_day%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | ### 2. Send request 33 | 34 | * [payload.json](payload-request-step-1.json) 35 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Request%20your%20time%20off*%22%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22Choose%20your%20request%20type%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22static_select%22%2C%0A%20%20%20%20%20%20%20%20%22placeholder%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Request%20type%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%22options%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Paid%20Time%20Off%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22pto%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Jury%20Duty%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22jury_duty%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Volunteering%20Day%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22volunteering_day%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%5D%2C%0A%20%20%20%20%20%20%20%20%22initial_option%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Paid%20Time%20Off%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22pto%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22Select%20*Start%20Date*%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22datepicker%22%2C%0A%20%20%20%20%20%20%20%20%22placeholder%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Select%20date%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%22text%22%3A%20%22Select%20*End%20Date*%22%0A%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%22type%22%3A%20%22datepicker%22%2C%0A%20%20%20%20%20%20%20%20%22placeholder%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Select%20date%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%2C%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Send%20request%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22style%22%3A%20%22primary%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22submit%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Cancel%20request%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22cancel%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D) 36 | 37 | #### Methods 38 | 39 | * [`chat.update`](https://api.slack.com/methods/chat.update) 40 | 41 | ### 3. Confirmation 42 | 43 | * [payload.json](payload-confirm.json) 44 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Your%20request%20for%20*Paid%20Time%20Off*%20has%20been%20sent.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22fields%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Start%20Date%3A*%5CnApr%2010%2C%202019%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*End%20Date%3A*%5CnApr%2012%2C%202019%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 45 | 46 | #### Methods 47 | 48 | * [`chat.update`](https://api.slack.com/methods/chat.update) 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /hr/timeoff/hr-timeoff.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/timeoff/hr-timeoff.gif -------------------------------------------------------------------------------- /hr/timeoff/hr-timeoff.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/hr/timeoff/hr-timeoff.mp4 -------------------------------------------------------------------------------- /hr/timeoff/payload-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Your request for *Paid Time Off* has been sent." 7 | } 8 | }, 9 | { 10 | "type": "section", 11 | "fields": [ 12 | { 13 | "type": "mrkdwn", 14 | "text": "*Start Date:*\nApr 10, 2019" 15 | }, 16 | { 17 | "type": "mrkdwn", 18 | "text": "*End Date:*\nApr 12, 2019" 19 | } 20 | ] 21 | } 22 | ] -------------------------------------------------------------------------------- /hr/timeoff/payload-request-step-0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Request your time off*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "Choose your request type" 17 | }, 18 | "accessory": { 19 | "type": "static_select", 20 | "placeholder": { 21 | "type": "plain_text", 22 | "text": "Request type", 23 | "emoji": true 24 | }, 25 | "options": [ 26 | { 27 | "text": { 28 | "type": "plain_text", 29 | "text": "Paid Time Off", 30 | "emoji": true 31 | }, 32 | "value": "pto" 33 | }, 34 | { 35 | "text": { 36 | "type": "plain_text", 37 | "text": "Jury Duty", 38 | "emoji": true 39 | }, 40 | "value": "jury_duty" 41 | }, 42 | { 43 | "text": { 44 | "type": "plain_text", 45 | "text": "Volunteering Day", 46 | "emoji": true 47 | }, 48 | "value": "volunteering_day" 49 | } 50 | ] 51 | } 52 | } 53 | ] -------------------------------------------------------------------------------- /hr/timeoff/payload-request-step-1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "*Request your time off*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "Choose your request type" 17 | }, 18 | "accessory": { 19 | "type": "static_select", 20 | "placeholder": { 21 | "type": "plain_text", 22 | "text": "Request type", 23 | "emoji": true 24 | }, 25 | "options": [ 26 | { 27 | "text": { 28 | "type": "plain_text", 29 | "text": "Paid Time Off", 30 | "emoji": true 31 | }, 32 | "value": "pto" 33 | }, 34 | { 35 | "text": { 36 | "type": "plain_text", 37 | "text": "Jury Duty", 38 | "emoji": true 39 | }, 40 | "value": "jury_duty" 41 | }, 42 | { 43 | "text": { 44 | "type": "plain_text", 45 | "text": "Volunteering Day", 46 | "emoji": true 47 | }, 48 | "value": "volunteering_day" 49 | } 50 | ], 51 | "initial_option": { 52 | "text": { 53 | "type": "plain_text", 54 | "text": "Paid Time Off", 55 | "emoji": true 56 | }, 57 | "value": "pto" 58 | } 59 | } 60 | }, 61 | { 62 | "type": "section", 63 | "text": { 64 | "type": "mrkdwn", 65 | "text": "Select *Start Date*" 66 | }, 67 | "accessory": { 68 | "type": "datepicker", 69 | "placeholder": { 70 | "type": "plain_text", 71 | "text": "Select date", 72 | "emoji": true 73 | } 74 | } 75 | }, 76 | { 77 | "type": "section", 78 | "text": { 79 | "type": "mrkdwn", 80 | "text": "Select *End Date*" 81 | }, 82 | "accessory": { 83 | "type": "datepicker", 84 | "placeholder": { 85 | "type": "plain_text", 86 | "text": "Select date", 87 | "emoji": true 88 | } 89 | } 90 | }, 91 | { 92 | "type": "actions", 93 | "elements": [ 94 | { 95 | "type": "button", 96 | "text": { 97 | "type": "plain_text", 98 | "text": "Send request", 99 | "emoji": true 100 | }, 101 | "style": "primary", 102 | "value": "submit" 103 | }, 104 | { 105 | "type": "button", 106 | "text": { 107 | "type": "plain_text", 108 | "text": "Cancel request", 109 | "emoji": true 110 | }, 111 | "value": "cancel" 112 | } 113 | ] 114 | } 115 | ] -------------------------------------------------------------------------------- /paging/README.md: -------------------------------------------------------------------------------- 1 | # Paging 2 | 3 | ![](paging.gif) 4 | *Paging mechanism* 5 | 6 | ### Examples 7 | 8 | * Paging through a list of search results 9 | 10 | ## Required features 11 | 12 | * [Bot User](https://api.slack.com/bot-users) 13 | * [Interactive Components](https://api.slack.com/interactive-messages) 14 | 15 | ## Required scopes 16 | 17 | * [`bot`](https://api.slack.com/scopes/bot) 18 | 19 | ## Implementation overview 20 | 21 | ### 1. Search results 22 | 23 | * [payload.json](payload-page-0.json) 24 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22We%20found%20*8%20Hotels*%20in%20New%20Orleans%2C%20LA%20from%20*12%2F14%20to%2012%2F17*%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22%3Amag%3A%20Edit%20search%22%7D%2C%22value%22%3A%22edit_search%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22%3Apencil2%3A%20Edit%20filters%22%7D%2C%22value%22%3A%22edit_filters%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7CWindsor%20Court%20Hotel%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24340%20per%20night%5CnRated%3A%209.4%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgent_1.png%22%2C%22alt_text%22%3A%22Windsor%20Court%20Hotel%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20Central%20Business%20District%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7CThe%20Ritz-Carlton%20New%20Orleans%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24340%20per%20night%5CnRated%3A%209.1%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgent_2.png%22%2C%22alt_text%22%3A%22Ritz-Carlton%20New%20Orleans%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20French%20Quarter%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7COmni%20Royal%20Orleans%20Hotel%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24419%20per%20night%5CnRated%3A%208.8%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgent_3.png%22%2C%22alt_text%22%3A%22Omni%20Royal%20Orleans%20Hotel%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20French%20Quarter%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Results%201-3%20of%208%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Next%20%3E%22%7D%2C%22value%22%3A%22next%22%7D%5D%7D%5D) 25 | 26 | #### Methods 27 | 28 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 29 | 30 | ### 2. Updated search results 31 | 32 | * [payload.json](payload-page-1.json) 33 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22We%20found%20*8%20Hotels*%20in%20New%20Orleans%2C%20LA%20from%20*12%2F14%20to%2012%2F17*%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22%3Amag%3A%20Edit%20search%22%7D%2C%22value%22%3A%22edit_search%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22%3Apencil2%3A%20Edit%20filters%22%7D%2C%22value%22%3A%22edit_filters%22%7D%5D%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7CGrand%20Hotel%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24380%20per%20night%5CnRated%3A%209.3%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fimages.unsplash.com%2Fphoto-1515362778563-6a8d0e44bc0b%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D800%26q%3D60%22%2C%22alt_text%22%3A%22Grand%20Hotel%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20Downtown%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7CNew%20Orleans%20Inn%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24420%20per%20night%5CnRated%3A%209.0%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fimages.unsplash.com%2Fphoto-1522771739844-6a9f6d5f14af%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D800%26q%3D60%22%2C%22alt_text%22%3A%22New%20Orleans%20Inn%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20Downtown%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*%3CfakeLink.toHotelPage.com%7CRoyal%20Queens%20Hotel%3E*%5Cn%E2%98%85%E2%98%85%E2%98%85%E2%98%85%E2%98%85%5Cn%24370%20per%20night%5CnRated%3A%208.7%20-%20Excellent%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fimages.unsplash.com%2Fphoto-1508253578933-20b529302151%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D800%26q%3D60%22%2C%22alt_text%22%3A%22Royal%20Queens%20Hotel%20thumbnail%22%7D%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22image%22%2C%22image_url%22%3A%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2FtripAgentLocationMarker.png%22%2C%22alt_text%22%3A%22Location%20Pin%20Icon%22%7D%2C%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Location%3A%20French%20Quarter%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Book%20now%22%7D%2C%22style%22%3A%22primary%22%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22See%20available%20rooms%22%7D%2C%22value%22%3A%22click_me_123%22%7D%2C%7B%22type%22%3A%22overflow%22%2C%22options%22%3A%5B%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22View%20gallery%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-0%22%7D%2C%7B%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22Show%20on%20map%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22value-1%22%7D%5D%7D%5D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Results%204-6%20of%208%22%7D%5D%7D%2C%7B%22type%22%3A%22actions%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22%3C%20Previous%22%7D%2C%22value%22%3A%22previous%22%7D%2C%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22emoji%22%3Atrue%2C%22text%22%3A%22Next%20%3E%22%7D%2C%22value%22%3A%22next%22%7D%5D%7D%5D) 34 | 35 | #### Methods 36 | 37 | * [`chat.update`](https://api.slack.com/methods/chat.update) 38 | 39 | -------------------------------------------------------------------------------- /paging/paging.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/paging/paging.gif -------------------------------------------------------------------------------- /paging/payload-page-0.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "We found *8 Hotels* in New Orleans, LA from *12/14 to 12/17*" 7 | }, 8 | "accessory": { 9 | "type": "overflow", 10 | "options": [ 11 | { 12 | "text": { 13 | "type": "plain_text", 14 | "emoji": true, 15 | "text": ":mag: Edit search" 16 | }, 17 | "value": "edit_search" 18 | }, 19 | { 20 | "text": { 21 | "type": "plain_text", 22 | "emoji": true, 23 | "text": ":pencil2: Edit filters" 24 | }, 25 | "value": "edit_filters" 26 | } 27 | ] 28 | } 29 | }, 30 | { 31 | "type": "divider" 32 | }, 33 | { 34 | "type": "section", 35 | "text": { 36 | "type": "mrkdwn", 37 | "text": "**\n★★★★★\n$340 per night\nRated: 9.4 - Excellent" 38 | }, 39 | "accessory": { 40 | "type": "image", 41 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_1.png", 42 | "alt_text": "Windsor Court Hotel thumbnail" 43 | } 44 | }, 45 | { 46 | "type": "context", 47 | "elements": [ 48 | { 49 | "type": "image", 50 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 51 | "alt_text": "Location Pin Icon" 52 | }, 53 | { 54 | "type": "plain_text", 55 | "emoji": true, 56 | "text": "Location: Central Business District" 57 | } 58 | ] 59 | }, 60 | { 61 | "type": "actions", 62 | "elements": [ 63 | { 64 | "type": "button", 65 | "text": { 66 | "type": "plain_text", 67 | "emoji": true, 68 | "text": "Book now" 69 | }, 70 | "style": "primary", 71 | "value": "click" 72 | }, 73 | { 74 | "type": "button", 75 | "text": { 76 | "type": "plain_text", 77 | "emoji": true, 78 | "text": "See available rooms" 79 | }, 80 | "value": "click" 81 | }, 82 | { 83 | "type": "overflow", 84 | "options": [ 85 | { 86 | "text": { 87 | "type": "plain_text", 88 | "text": "View gallery", 89 | "emoji": true 90 | }, 91 | "value": "value-0" 92 | }, 93 | { 94 | "text": { 95 | "type": "plain_text", 96 | "text": "Show on map", 97 | "emoji": true 98 | }, 99 | "value": "value-1" 100 | } 101 | ] 102 | } 103 | ] 104 | }, 105 | { 106 | "type": "divider" 107 | }, 108 | { 109 | "type": "section", 110 | "text": { 111 | "type": "mrkdwn", 112 | "text": "**\n★★★★★\n$340 per night\nRated: 9.1 - Excellent" 113 | }, 114 | "accessory": { 115 | "type": "image", 116 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_2.png", 117 | "alt_text": "Ritz-Carlton New Orleans thumbnail" 118 | } 119 | }, 120 | { 121 | "type": "context", 122 | "elements": [ 123 | { 124 | "type": "image", 125 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 126 | "alt_text": "Location Pin Icon" 127 | }, 128 | { 129 | "type": "plain_text", 130 | "emoji": true, 131 | "text": "Location: French Quarter" 132 | } 133 | ] 134 | }, 135 | { 136 | "type": "actions", 137 | "elements": [ 138 | { 139 | "type": "button", 140 | "text": { 141 | "type": "plain_text", 142 | "emoji": true, 143 | "text": "Book now" 144 | }, 145 | "style": "primary", 146 | "value": "click_me_123" 147 | }, 148 | { 149 | "type": "button", 150 | "text": { 151 | "type": "plain_text", 152 | "emoji": true, 153 | "text": "See available rooms" 154 | }, 155 | "value": "click_me_123" 156 | }, 157 | { 158 | "type": "overflow", 159 | "options": [ 160 | { 161 | "text": { 162 | "type": "plain_text", 163 | "text": "View gallery", 164 | "emoji": true 165 | }, 166 | "value": "value-0" 167 | }, 168 | { 169 | "text": { 170 | "type": "plain_text", 171 | "text": "Show on map", 172 | "emoji": true 173 | }, 174 | "value": "value-1" 175 | } 176 | ] 177 | } 178 | ] 179 | }, 180 | { 181 | "type": "divider" 182 | }, 183 | { 184 | "type": "section", 185 | "text": { 186 | "type": "mrkdwn", 187 | "text": "**\n★★★★★\n$419 per night\nRated: 8.8 - Excellent" 188 | }, 189 | "accessory": { 190 | "type": "image", 191 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_3.png", 192 | "alt_text": "Omni Royal Orleans Hotel thumbnail" 193 | } 194 | }, 195 | { 196 | "type": "context", 197 | "elements": [ 198 | { 199 | "type": "image", 200 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 201 | "alt_text": "Location Pin Icon" 202 | }, 203 | { 204 | "type": "plain_text", 205 | "emoji": true, 206 | "text": "Location: French Quarter" 207 | } 208 | ] 209 | }, 210 | { 211 | "type": "actions", 212 | "elements": [ 213 | { 214 | "type": "button", 215 | "text": { 216 | "type": "plain_text", 217 | "emoji": true, 218 | "text": "Book now" 219 | }, 220 | "style": "primary", 221 | "value": "click_me_123" 222 | }, 223 | { 224 | "type": "button", 225 | "text": { 226 | "type": "plain_text", 227 | "emoji": true, 228 | "text": "See available rooms" 229 | }, 230 | "value": "click_me_123" 231 | }, 232 | { 233 | "type": "overflow", 234 | "options": [ 235 | { 236 | "text": { 237 | "type": "plain_text", 238 | "text": "View gallery", 239 | "emoji": true 240 | }, 241 | "value": "value-0" 242 | }, 243 | { 244 | "text": { 245 | "type": "plain_text", 246 | "text": "Show on map", 247 | "emoji": true 248 | }, 249 | "value": "value-1" 250 | } 251 | ] 252 | } 253 | ] 254 | }, 255 | { 256 | "type": "divider" 257 | }, 258 | { 259 | "type": "context", 260 | "elements": [ 261 | { 262 | "type": "plain_text", 263 | "emoji": true, 264 | "text": "Results 1-3 of 8" 265 | } 266 | ] 267 | }, 268 | { 269 | "type": "actions", 270 | "elements": [ 271 | { 272 | "type": "button", 273 | "text": { 274 | "type": "plain_text", 275 | "emoji": true, 276 | "text": "Next >" 277 | }, 278 | "value": "next" 279 | } 280 | ] 281 | } 282 | ] -------------------------------------------------------------------------------- /paging/payload-page-1.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "We found *8 Hotels* in New Orleans, LA from *12/14 to 12/17*" 7 | }, 8 | "accessory": { 9 | "type": "overflow", 10 | "options": [ 11 | { 12 | "text": { 13 | "type": "plain_text", 14 | "emoji": true, 15 | "text": ":mag: Edit search" 16 | }, 17 | "value": "edit_search" 18 | }, 19 | { 20 | "text": { 21 | "type": "plain_text", 22 | "emoji": true, 23 | "text": ":pencil2: Edit filters" 24 | }, 25 | "value": "edit_filters" 26 | } 27 | ] 28 | } 29 | }, 30 | { 31 | "type": "divider" 32 | }, 33 | { 34 | "type": "section", 35 | "text": { 36 | "type": "mrkdwn", 37 | "text": "**\n★★★★★\n$380 per night\nRated: 9.3 - Excellent" 38 | }, 39 | "accessory": { 40 | "type": "image", 41 | "image_url": "https://images.unsplash.com/photo-1515362778563-6a8d0e44bc0b?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60", 42 | "alt_text": "Grand Hotel thumbnail" 43 | } 44 | }, 45 | { 46 | "type": "context", 47 | "elements": [ 48 | { 49 | "type": "image", 50 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 51 | "alt_text": "Location Pin Icon" 52 | }, 53 | { 54 | "type": "plain_text", 55 | "emoji": true, 56 | "text": "Location: Downtown" 57 | } 58 | ] 59 | }, 60 | { 61 | "type": "actions", 62 | "elements": [ 63 | { 64 | "type": "button", 65 | "text": { 66 | "type": "plain_text", 67 | "emoji": true, 68 | "text": "Book now" 69 | }, 70 | "style": "primary", 71 | "value": "click_me_123" 72 | }, 73 | { 74 | "type": "button", 75 | "text": { 76 | "type": "plain_text", 77 | "emoji": true, 78 | "text": "See available rooms" 79 | }, 80 | "value": "click_me_123" 81 | }, 82 | { 83 | "type": "overflow", 84 | "options": [ 85 | { 86 | "text": { 87 | "type": "plain_text", 88 | "text": "View gallery", 89 | "emoji": true 90 | }, 91 | "value": "value-0" 92 | }, 93 | { 94 | "text": { 95 | "type": "plain_text", 96 | "text": "Show on map", 97 | "emoji": true 98 | }, 99 | "value": "value-1" 100 | } 101 | ] 102 | } 103 | ] 104 | }, 105 | { 106 | "type": "divider" 107 | }, 108 | { 109 | "type": "section", 110 | "text": { 111 | "type": "mrkdwn", 112 | "text": "**\n★★★★★\n$420 per night\nRated: 9.0 - Excellent" 113 | }, 114 | "accessory": { 115 | "type": "image", 116 | "image_url": "https://images.unsplash.com/photo-1522771739844-6a9f6d5f14af?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60", 117 | "alt_text": "New Orleans Inn thumbnail" 118 | } 119 | }, 120 | { 121 | "type": "context", 122 | "elements": [ 123 | { 124 | "type": "image", 125 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 126 | "alt_text": "Location Pin Icon" 127 | }, 128 | { 129 | "type": "plain_text", 130 | "emoji": true, 131 | "text": "Location: Downtown" 132 | } 133 | ] 134 | }, 135 | { 136 | "type": "actions", 137 | "elements": [ 138 | { 139 | "type": "button", 140 | "text": { 141 | "type": "plain_text", 142 | "emoji": true, 143 | "text": "Book now" 144 | }, 145 | "style": "primary", 146 | "value": "click_me_123" 147 | }, 148 | { 149 | "type": "button", 150 | "text": { 151 | "type": "plain_text", 152 | "emoji": true, 153 | "text": "See available rooms" 154 | }, 155 | "value": "click_me_123" 156 | }, 157 | { 158 | "type": "overflow", 159 | "options": [ 160 | { 161 | "text": { 162 | "type": "plain_text", 163 | "text": "View gallery", 164 | "emoji": true 165 | }, 166 | "value": "value-0" 167 | }, 168 | { 169 | "text": { 170 | "type": "plain_text", 171 | "text": "Show on map", 172 | "emoji": true 173 | }, 174 | "value": "value-1" 175 | } 176 | ] 177 | } 178 | ] 179 | }, 180 | { 181 | "type": "divider" 182 | }, 183 | { 184 | "type": "section", 185 | "text": { 186 | "type": "mrkdwn", 187 | "text": "**\n★★★★★\n$370 per night\nRated: 8.7 - Excellent" 188 | }, 189 | "accessory": { 190 | "type": "image", 191 | "image_url": "https://images.unsplash.com/photo-1508253578933-20b529302151?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=800&q=60", 192 | "alt_text": "Royal Queens Hotel thumbnail" 193 | } 194 | }, 195 | { 196 | "type": "context", 197 | "elements": [ 198 | { 199 | "type": "image", 200 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 201 | "alt_text": "Location Pin Icon" 202 | }, 203 | { 204 | "type": "plain_text", 205 | "emoji": true, 206 | "text": "Location: French Quarter" 207 | } 208 | ] 209 | }, 210 | { 211 | "type": "actions", 212 | "elements": [ 213 | { 214 | "type": "button", 215 | "text": { 216 | "type": "plain_text", 217 | "emoji": true, 218 | "text": "Book now" 219 | }, 220 | "style": "primary", 221 | "value": "click_me_123" 222 | }, 223 | { 224 | "type": "button", 225 | "text": { 226 | "type": "plain_text", 227 | "emoji": true, 228 | "text": "See available rooms" 229 | }, 230 | "value": "click_me_123" 231 | }, 232 | { 233 | "type": "overflow", 234 | "options": [ 235 | { 236 | "text": { 237 | "type": "plain_text", 238 | "text": "View gallery", 239 | "emoji": true 240 | }, 241 | "value": "value-0" 242 | }, 243 | { 244 | "text": { 245 | "type": "plain_text", 246 | "text": "Show on map", 247 | "emoji": true 248 | }, 249 | "value": "value-1" 250 | } 251 | ] 252 | } 253 | ] 254 | }, 255 | { 256 | "type": "divider" 257 | }, 258 | { 259 | "type": "context", 260 | "elements": [ 261 | { 262 | "type": "plain_text", 263 | "emoji": true, 264 | "text": "Results 4-6 of 8" 265 | } 266 | ] 267 | }, 268 | { 269 | "type": "actions", 270 | "elements": [ 271 | { 272 | "type": "button", 273 | "text": { 274 | "type": "plain_text", 275 | "emoji": true, 276 | "text": "< Previous" 277 | }, 278 | "value": "previous" 279 | }, 280 | { 281 | "type": "button", 282 | "text": { 283 | "type": "plain_text", 284 | "emoji": true, 285 | "text": "Next >" 286 | }, 287 | "value": "next" 288 | } 289 | ] 290 | } 291 | ] -------------------------------------------------------------------------------- /private-poll/README.md: -------------------------------------------------------------------------------- 1 | # Private poll in a DM 2 | 3 | ![](private-poll.gif) 4 | *Private poll in channel* 5 | 6 | 🎥 [High Resolution screencast](private-poll.mp4) 7 | 8 | ### Examples 9 | 10 | * Sending a private poll to a user in Slack via App DM 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Poll 24 | 25 | * [payload.json](payload-private-poll.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Hello%20David!%20%3CfakeLink.toUser.com%7CMichael%3E%20wants%20to%20know%20where%20you%27d%20like%20to%20take%20the%20Paper%20Company%20investors%20to%20dinner%20tonight.%5Cn%5Cn%20*Please%20select%20a%20restaurant%3A*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Farmhouse%20Thai%20Cuisine*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%201528%20reviews%5Cn%20They%20do%20have%20some%20vegan%20options%2C%20like%20the%20roti%20and%20curry%2C%20plus%20they%20have%20a%20ton%20of%20salad%20stuff%20and%20noodles%20can%20be%20ordered%20without%20meat!!%20They%20have%20something%20for%20everyone%20here.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media3.fl.yelpcdn.com%2Fbphoto%2Fc7ed05m9lC2EmA3Aruue7A%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Choose%20Farmhouse%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22farmhouse%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Kin%20Khao*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%201638%20reviews%5Cn%20The%20sticky%20rice%20also%20goes%20wonderfully%20with%20the%20caramelized%20pork%20belly%2C%20which%20is%20absolutely%20melt-in-your-mouth%20and%20so%20soft.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media2.fl.yelpcdn.com%2Fbphoto%2Fkorel-1YjNtFtJlMTaC26A%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Choose%20Kin%20Khao%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22kin-khao%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Ler%20Ros*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%202082%20reviews%5Cn%20I%20would%20really%20recommend%20the%20Yum%20Koh%20Moo%20Yang%20-%20Spicy%20lime%20dressing%20and%20roasted%20quick%20marinated%20pork%20shoulder%2C%20basil%20leaves%2C%20chili%20%26%20rice%20powder.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media2.fl.yelpcdn.com%2Fbphoto%2FDawwNigKJ2ckPeDeDM7jAg%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Choose%20Le%20Ros%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22le-ros%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | ### 2. Confirmation 33 | 34 | * [payload.json](payload-private-poll-confirm.json) 35 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Hello%20David!%20%3CfakeLink.toUser.com%7CMichael%3E%20wants%20to%20know%20where%20you%27d%20like%20to%20take%20the%20Paper%20Company%20investors%20to%20dinner%20tonight.%5Cn%5Cn%20*Please%20select%20a%20restaurant%3A*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Farmhouse%20Thai%20Cuisine*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%201528%20reviews%5Cn%20They%20do%20have%20some%20vegan%20options%2C%20like%20the%20roti%20and%20curry%2C%20plus%20they%20have%20a%20ton%20of%20salad%20stuff%20and%20noodles%20can%20be%20ordered%20without%20meat!!%20They%20have%20something%20for%20everyone%20here.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media3.fl.yelpcdn.com%2Fbphoto%2Fc7ed05m9lC2EmA3Aruue7A%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Awhite_check_mark%3A%20You%20selected%20this%20restaurant%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Kin%20Khao*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%201638%20reviews%5Cn%20The%20sticky%20rice%20also%20goes%20wonderfully%20with%20the%20caramelized%20pork%20belly%2C%20which%20is%20absolutely%20melt-in-your-mouth%20and%20so%20soft.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media2.fl.yelpcdn.com%2Fbphoto%2Fkorel-1YjNtFtJlMTaC26A%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Ler%20Ros*%5Cn%3Astar%3A%3Astar%3A%3Astar%3A%3Astar%3A%202082%20reviews%5Cn%20I%20would%20really%20recommend%20the%20Yum%20Koh%20Moo%20Yang%20-%20Spicy%20lime%20dressing%20and%20roasted%20quick%20marinated%20pork%20shoulder%2C%20basil%20leaves%2C%20chili%20%26%20rice%20powder.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fs3-media2.fl.yelpcdn.com%2Fbphoto%2FDawwNigKJ2ckPeDeDM7jAg%2Fo.jpg%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22alt%20text%20for%20image%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22actions%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Edit%20selection%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22edit%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 36 | 37 | #### Methods 38 | 39 | * [`chat.update`](https://api.slack.com/methods/chat.update) 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /private-poll/payload-private-poll-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Hello David! wants to know where you'd like to take the Paper Company investors to dinner tonight.\n\n *Please select a restaurant:*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": "*Farmhouse Thai Cuisine*\n:star::star::star::star: 1528 reviews\n They do have some vegan options, like the roti and curry, plus they have a ton of salad stuff and noodles can be ordered without meat!! They have something for everyone here." 17 | }, 18 | "accessory": { 19 | "type": "image", 20 | "image_url": "https://s3-media3.fl.yelpcdn.com/bphoto/c7ed05m9lC2EmA3Aruue7A/o.jpg", 21 | "alt_text": "alt text for image" 22 | } 23 | }, 24 | { 25 | "type": "context", 26 | "elements": [ 27 | { 28 | "type": "plain_text", 29 | "text": ":white_check_mark: You selected this restaurant", 30 | "emoji": true 31 | } 32 | ] 33 | }, 34 | { 35 | "type": "divider" 36 | }, 37 | { 38 | "type": "section", 39 | "text": { 40 | "type": "mrkdwn", 41 | "text": "*Kin Khao*\n:star::star::star::star: 1638 reviews\n The sticky rice also goes wonderfully with the caramelized pork belly, which is absolutely melt-in-your-mouth and so soft." 42 | }, 43 | "accessory": { 44 | "type": "image", 45 | "image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/korel-1YjNtFtJlMTaC26A/o.jpg", 46 | "alt_text": "alt text for image" 47 | } 48 | }, 49 | { 50 | "type": "divider" 51 | }, 52 | { 53 | "type": "section", 54 | "text": { 55 | "type": "mrkdwn", 56 | "text": "*Ler Ros*\n:star::star::star::star: 2082 reviews\n I would really recommend the Yum Koh Moo Yang - Spicy lime dressing and roasted quick marinated pork shoulder, basil leaves, chili & rice powder." 57 | }, 58 | "accessory": { 59 | "type": "image", 60 | "image_url": "https://s3-media2.fl.yelpcdn.com/bphoto/DawwNigKJ2ckPeDeDM7jAg/o.jpg", 61 | "alt_text": "alt text for image" 62 | } 63 | }, 64 | { 65 | "type": "divider" 66 | }, 67 | { 68 | "type": "actions", 69 | "elements": [ 70 | { 71 | "type": "button", 72 | "text": { 73 | "type": "plain_text", 74 | "text": "Edit selection", 75 | "emoji": true 76 | }, 77 | "value": "edit" 78 | } 79 | ] 80 | } 81 | ] -------------------------------------------------------------------------------- /private-poll/payload-private-poll.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/private-poll/payload-private-poll.json -------------------------------------------------------------------------------- /private-poll/private-poll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/private-poll/private-poll.gif -------------------------------------------------------------------------------- /private-poll/private-poll.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/private-poll/private-poll.mp4 -------------------------------------------------------------------------------- /public-poll/README.md: -------------------------------------------------------------------------------- 1 | # Public poll in channel 2 | 3 | ![](public-poll.gif) 4 | *Public poll in channel* 5 | 6 | 🎥 [High Resolution screencast](public-poll.mp4) 7 | 8 | ### Examples 9 | 10 | * Sending a poll to a public or private channel or a MPIM 11 | 12 | ## Required features 13 | 14 | * [Bot User](https://api.slack.com/bot-users) 15 | * [Interactive Components](https://api.slack.com/interactive-messages) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Poll 24 | 25 | * [payload.json](payload-public-poll.json) 26 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3CfakeLink.toUser.com%7CMark%3E%20wants%20to%20know%3A%20*Where%20should%20we%20order%20lunch%20from%3F*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Asushi%3A%20*Ace%20Wasabi%20Rock-n-Roll%20Sushi%20Bar*%5CnThe%20best%20landlocked%20sushi%20restaurant.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22sushi%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22No%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Ahamburger%3A%20*Super%20Hungryman%20Hamburgers*%5CnOnly%20for%20the%20hungriest%20of%20the%20hungry.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22hamburger%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22No%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Aramen%3A%20*Kagawa-Ya%20Udon%20Noodle%20Shop*%5CnDo%20you%20like%20to%20shop%20for%20noodles%3F%20We%20have%20noodles.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22ramen%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22No%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 27 | 28 | #### Methods 29 | 30 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 31 | 32 | ### 2. Confirmation 33 | 34 | * [payload.json](payload-public-poll-confirm.json) 35 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3CfakeLink.toUser.com%7CMark%3E%20wants%20to%20know%3A%20*Where%20should%20we%20order%20lunch%20from%3F*%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Asushi%3A%20*Ace%20Wasabi%20Rock-n-Roll%20Sushi%20Bar*%5CnThe%20best%20landlocked%20sushi%20restaurant.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22click_me_123%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fca.slack-edge.com%2FTAW6LHTB5-UAVNY70E5-0f54a6b30573-72%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Michael%20Scott%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2Fprofile_1.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Michael%20Scott%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2Fprofile_2.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Dwight%20Schrute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2Fprofile_3.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Pam%20Beasely%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%224%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Ahamburger%3A%20*Super%20Hungryman%20Hamburgers*%5CnOnly%20for%20the%20hungriest%20of%20the%20hungry.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22click_me_123%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2Fprofile_4.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Angela%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22image%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22image_url%22%3A%20%22https%3A%2F%2Fapi.slack.com%2Fimg%2Fblocks%2Fbkb_template_images%2Fprofile_2.png%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22alt_text%22%3A%20%22Dwight%20Schrute%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%222%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22%3Aramen%3A%20*Kagawa-Ya%20Udon%20Noodle%20Shop*%5CnDo%20you%20like%20to%20shop%20for%20noodles%3F%20We%20have%20noodles.%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Vote%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22value%22%3A%20%22click_me_123%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22No%20votes%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 36 | 37 | #### Methods 38 | 39 | * [`chat.update`](https://api.slack.com/methods/chat.update) 40 | 41 | 42 | -------------------------------------------------------------------------------- /public-poll/payload-public-poll-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": " wants to know: *Where should we order lunch from?*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": ":sushi: *Ace Wasabi Rock-n-Roll Sushi Bar*\nThe best landlocked sushi restaurant." 17 | }, 18 | "accessory": { 19 | "type": "button", 20 | "text": { 21 | "type": "plain_text", 22 | "emoji": true, 23 | "text": "Vote" 24 | }, 25 | "value": "click_me_123" 26 | } 27 | }, 28 | { 29 | "type": "context", 30 | "elements": [ 31 | { 32 | "type": "image", 33 | "image_url": "https://ca.slack-edge.com/TAW6LHTB5-UAVNY70E5-0f54a6b30573-72", 34 | "alt_text": "Michael Scott" 35 | }, 36 | { 37 | "type": "image", 38 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_1.png", 39 | "alt_text": "Michael Scott" 40 | }, 41 | { 42 | "type": "image", 43 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_2.png", 44 | "alt_text": "Dwight Schrute" 45 | }, 46 | { 47 | "type": "image", 48 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_3.png", 49 | "alt_text": "Pam Beasely" 50 | }, 51 | { 52 | "type": "plain_text", 53 | "emoji": true, 54 | "text": "4 votes" 55 | } 56 | ] 57 | }, 58 | { 59 | "type": "divider" 60 | }, 61 | { 62 | "type": "section", 63 | "text": { 64 | "type": "mrkdwn", 65 | "text": ":hamburger: *Super Hungryman Hamburgers*\nOnly for the hungriest of the hungry." 66 | }, 67 | "accessory": { 68 | "type": "button", 69 | "text": { 70 | "type": "plain_text", 71 | "emoji": true, 72 | "text": "Vote" 73 | }, 74 | "value": "click_me_123" 75 | } 76 | }, 77 | { 78 | "type": "context", 79 | "elements": [ 80 | { 81 | "type": "image", 82 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_4.png", 83 | "alt_text": "Angela" 84 | }, 85 | { 86 | "type": "image", 87 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/profile_2.png", 88 | "alt_text": "Dwight Schrute" 89 | }, 90 | { 91 | "type": "plain_text", 92 | "emoji": true, 93 | "text": "2 votes" 94 | } 95 | ] 96 | }, 97 | { 98 | "type": "divider" 99 | }, 100 | { 101 | "type": "section", 102 | "text": { 103 | "type": "mrkdwn", 104 | "text": ":ramen: *Kagawa-Ya Udon Noodle Shop*\nDo you like to shop for noodles? We have noodles." 105 | }, 106 | "accessory": { 107 | "type": "button", 108 | "text": { 109 | "type": "plain_text", 110 | "emoji": true, 111 | "text": "Vote" 112 | }, 113 | "value": "click_me_123" 114 | } 115 | }, 116 | { 117 | "type": "context", 118 | "elements": [ 119 | { 120 | "type": "mrkdwn", 121 | "text": "No votes" 122 | } 123 | ] 124 | }, 125 | { 126 | "type": "divider" 127 | } 128 | ] -------------------------------------------------------------------------------- /public-poll/payload-public-poll.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": " wants to know: *Where should we order lunch from?*" 7 | } 8 | }, 9 | { 10 | "type": "divider" 11 | }, 12 | { 13 | "type": "section", 14 | "text": { 15 | "type": "mrkdwn", 16 | "text": ":sushi: *Ace Wasabi Rock-n-Roll Sushi Bar*\nThe best landlocked sushi restaurant." 17 | }, 18 | "accessory": { 19 | "type": "button", 20 | "text": { 21 | "type": "plain_text", 22 | "emoji": true, 23 | "text": "Vote" 24 | }, 25 | "value": "sushi" 26 | } 27 | }, 28 | { 29 | "type": "context", 30 | "elements": [ 31 | { 32 | "type": "mrkdwn", 33 | "text": "No votes" 34 | } 35 | ] 36 | }, 37 | { 38 | "type": "divider" 39 | }, 40 | { 41 | "type": "section", 42 | "text": { 43 | "type": "mrkdwn", 44 | "text": ":hamburger: *Super Hungryman Hamburgers*\nOnly for the hungriest of the hungry." 45 | }, 46 | "accessory": { 47 | "type": "button", 48 | "text": { 49 | "type": "plain_text", 50 | "emoji": true, 51 | "text": "Vote" 52 | }, 53 | "value": "hamburger" 54 | } 55 | }, 56 | { 57 | "type": "context", 58 | "elements": [ 59 | { 60 | "type": "mrkdwn", 61 | "text": "No votes" 62 | } 63 | ] 64 | }, 65 | { 66 | "type": "divider" 67 | }, 68 | { 69 | "type": "section", 70 | "text": { 71 | "type": "mrkdwn", 72 | "text": ":ramen: *Kagawa-Ya Udon Noodle Shop*\nDo you like to shop for noodles? We have noodles." 73 | }, 74 | "accessory": { 75 | "type": "button", 76 | "text": { 77 | "type": "plain_text", 78 | "emoji": true, 79 | "text": "Vote" 80 | }, 81 | "value": "ramen" 82 | } 83 | }, 84 | { 85 | "type": "context", 86 | "elements": [ 87 | { 88 | "type": "mrkdwn", 89 | "text": "No votes" 90 | } 91 | ] 92 | }, 93 | { 94 | "type": "divider" 95 | } 96 | ] -------------------------------------------------------------------------------- /public-poll/public-poll.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/public-poll/public-poll.gif -------------------------------------------------------------------------------- /public-poll/public-poll.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/public-poll/public-poll.mp4 -------------------------------------------------------------------------------- /search/payload-edit-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Searching hotels in" 7 | }, 8 | "accessory": { 9 | "type": "external_select", 10 | "placeholder": { 11 | "type": "plain_text", 12 | "text": "Enter location", 13 | "emoji": true 14 | }, 15 | "initial_option": { 16 | "text": { 17 | "type": "plain_text", 18 | "text": "Los Angeles" 19 | }, 20 | "value": "los-angeles" 21 | } 22 | } 23 | }, 24 | { 25 | "type": "section", 26 | "text": { 27 | "type": "mrkdwn", 28 | "text": "*From*" 29 | }, 30 | "accessory": { 31 | "type": "datepicker", 32 | "placeholder": { 33 | "type": "plain_text", 34 | "text": "Select date" 35 | }, 36 | "initial_date": "2019-04-14" 37 | } 38 | }, 39 | { 40 | "type": "section", 41 | "text": { 42 | "type": "mrkdwn", 43 | "text": "*To*" 44 | }, 45 | "accessory": { 46 | "type": "datepicker", 47 | "placeholder": { 48 | "type": "plain_text", 49 | "text": "Select date" 50 | }, 51 | "initial_date": "2019-04-17" 52 | } 53 | }, 54 | { 55 | "type": "divider" 56 | }, 57 | { 58 | "type": "actions", 59 | "elements": [ 60 | { 61 | "type": "button", 62 | "text": { 63 | "type": "plain_text", 64 | "text": "Update", 65 | "emoji": true 66 | }, 67 | "value": "udpate" 68 | } 69 | ] 70 | } 71 | ] -------------------------------------------------------------------------------- /search/payload-results.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "We found *8 Hotels* in New Orleans, LA from *12/14 to 12/17*" 7 | }, 8 | "accessory": { 9 | "type": "overflow", 10 | "options": [ 11 | { 12 | "text": { 13 | "type": "plain_text", 14 | "emoji": true, 15 | "text": ":mag: Edit search" 16 | }, 17 | "value": "edit_search" 18 | }, 19 | { 20 | "text": { 21 | "type": "plain_text", 22 | "emoji": true, 23 | "text": ":pencil2: Edit filters" 24 | }, 25 | "value": "edit_filters" 26 | } 27 | ] 28 | } 29 | }, 30 | { 31 | "type": "divider" 32 | }, 33 | { 34 | "type": "section", 35 | "text": { 36 | "type": "mrkdwn", 37 | "text": "**\n★★★★★\n$340 per night\nRated: 9.4 - Excellent" 38 | }, 39 | "accessory": { 40 | "type": "image", 41 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_1.png", 42 | "alt_text": "Windsor Court Hotel thumbnail" 43 | } 44 | }, 45 | { 46 | "type": "context", 47 | "elements": [ 48 | { 49 | "type": "image", 50 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 51 | "alt_text": "Location Pin Icon" 52 | }, 53 | { 54 | "type": "plain_text", 55 | "emoji": true, 56 | "text": "Location: Central Business District" 57 | } 58 | ] 59 | }, 60 | { 61 | "type": "actions", 62 | "elements": [ 63 | { 64 | "type": "button", 65 | "text": { 66 | "type": "plain_text", 67 | "emoji": true, 68 | "text": "Book now" 69 | }, 70 | "style": "primary", 71 | "value": "click" 72 | }, 73 | { 74 | "type": "button", 75 | "text": { 76 | "type": "plain_text", 77 | "emoji": true, 78 | "text": "See available rooms" 79 | }, 80 | "value": "click" 81 | }, 82 | { 83 | "type": "overflow", 84 | "options": [ 85 | { 86 | "text": { 87 | "type": "plain_text", 88 | "text": "View gallery", 89 | "emoji": true 90 | }, 91 | "value": "value-0" 92 | }, 93 | { 94 | "text": { 95 | "type": "plain_text", 96 | "text": "Show on map", 97 | "emoji": true 98 | }, 99 | "value": "value-1" 100 | } 101 | ] 102 | } 103 | ] 104 | }, 105 | { 106 | "type": "divider" 107 | }, 108 | { 109 | "type": "section", 110 | "text": { 111 | "type": "mrkdwn", 112 | "text": "**\n★★★★★\n$340 per night\nRated: 9.1 - Excellent" 113 | }, 114 | "accessory": { 115 | "type": "image", 116 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_2.png", 117 | "alt_text": "Ritz-Carlton New Orleans thumbnail" 118 | } 119 | }, 120 | { 121 | "type": "context", 122 | "elements": [ 123 | { 124 | "type": "image", 125 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 126 | "alt_text": "Location Pin Icon" 127 | }, 128 | { 129 | "type": "plain_text", 130 | "emoji": true, 131 | "text": "Location: French Quarter" 132 | } 133 | ] 134 | }, 135 | { 136 | "type": "actions", 137 | "elements": [ 138 | { 139 | "type": "button", 140 | "text": { 141 | "type": "plain_text", 142 | "emoji": true, 143 | "text": "Book now" 144 | }, 145 | "style": "primary", 146 | "value": "click_me_123" 147 | }, 148 | { 149 | "type": "button", 150 | "text": { 151 | "type": "plain_text", 152 | "emoji": true, 153 | "text": "See available rooms" 154 | }, 155 | "value": "click_me_123" 156 | }, 157 | { 158 | "type": "overflow", 159 | "options": [ 160 | { 161 | "text": { 162 | "type": "plain_text", 163 | "text": "View gallery", 164 | "emoji": true 165 | }, 166 | "value": "value-0" 167 | }, 168 | { 169 | "text": { 170 | "type": "plain_text", 171 | "text": "Show on map", 172 | "emoji": true 173 | }, 174 | "value": "value-1" 175 | } 176 | ] 177 | } 178 | ] 179 | }, 180 | { 181 | "type": "divider" 182 | }, 183 | { 184 | "type": "section", 185 | "text": { 186 | "type": "mrkdwn", 187 | "text": "**\n★★★★★\n$419 per night\nRated: 8.8 - Excellent" 188 | }, 189 | "accessory": { 190 | "type": "image", 191 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgent_3.png", 192 | "alt_text": "Omni Royal Orleans Hotel thumbnail" 193 | } 194 | }, 195 | { 196 | "type": "context", 197 | "elements": [ 198 | { 199 | "type": "image", 200 | "image_url": "https://api.slack.com/img/blocks/bkb_template_images/tripAgentLocationMarker.png", 201 | "alt_text": "Location Pin Icon" 202 | }, 203 | { 204 | "type": "plain_text", 205 | "emoji": true, 206 | "text": "Location: French Quarter" 207 | } 208 | ] 209 | }, 210 | { 211 | "type": "actions", 212 | "elements": [ 213 | { 214 | "type": "button", 215 | "text": { 216 | "type": "plain_text", 217 | "emoji": true, 218 | "text": "Book now" 219 | }, 220 | "style": "primary", 221 | "value": "click_me_123" 222 | }, 223 | { 224 | "type": "button", 225 | "text": { 226 | "type": "plain_text", 227 | "emoji": true, 228 | "text": "See available rooms" 229 | }, 230 | "value": "click_me_123" 231 | }, 232 | { 233 | "type": "overflow", 234 | "options": [ 235 | { 236 | "text": { 237 | "type": "plain_text", 238 | "text": "View gallery", 239 | "emoji": true 240 | }, 241 | "value": "value-0" 242 | }, 243 | { 244 | "text": { 245 | "type": "plain_text", 246 | "text": "Show on map", 247 | "emoji": true 248 | }, 249 | "value": "value-1" 250 | } 251 | ] 252 | } 253 | ] 254 | }, 255 | { 256 | "type": "divider" 257 | }, 258 | { 259 | "type": "context", 260 | "elements": [ 261 | { 262 | "type": "plain_text", 263 | "emoji": true, 264 | "text": "Results 1-3 of 8" 265 | } 266 | ] 267 | }, 268 | { 269 | "type": "actions", 270 | "elements": [ 271 | { 272 | "type": "button", 273 | "text": { 274 | "type": "plain_text", 275 | "emoji": true, 276 | "text": "Next >" 277 | }, 278 | "value": "next" 279 | } 280 | ] 281 | } 282 | ] -------------------------------------------------------------------------------- /search/payload-search.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Searching hotels in" 7 | }, 8 | "accessory": { 9 | "type": "external_select", 10 | "placeholder": { 11 | "type": "plain_text", 12 | "text": "Enter location", 13 | "emoji": true 14 | }, 15 | "initial_option": { 16 | "text": { 17 | "type": "plain_text", 18 | "text": "Los Angeles" 19 | }, 20 | "value": "los-angeles" 21 | } 22 | } 23 | }, 24 | { 25 | "type": "section", 26 | "text": { 27 | "type": "mrkdwn", 28 | "text": "*From*" 29 | }, 30 | "accessory": { 31 | "type": "datepicker", 32 | "placeholder": { 33 | "type": "plain_text", 34 | "text": "Select date" 35 | } 36 | } 37 | }, 38 | { 39 | "type": "section", 40 | "text": { 41 | "type": "mrkdwn", 42 | "text": "*To*" 43 | }, 44 | "accessory": { 45 | "type": "datepicker", 46 | "placeholder": { 47 | "type": "plain_text", 48 | "text": "Select date" 49 | } 50 | } 51 | }, 52 | { 53 | "type": "divider" 54 | }, 55 | { 56 | "type": "actions", 57 | "elements": [ 58 | { 59 | "type": "button", 60 | "text": { 61 | "type": "plain_text", 62 | "text": "Search hotels", 63 | "emoji": true 64 | }, 65 | "style": "primary", 66 | "value": "search" 67 | } 68 | ] 69 | } 70 | ] -------------------------------------------------------------------------------- /search/search.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/search/search.gif -------------------------------------------------------------------------------- /search/search.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/search/search.mp4 -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-message-action/README.md: -------------------------------------------------------------------------------- 1 | # Create task from Message Action 2 | 3 | ![](create-task.gif) 4 | *Create task from Message Action* 5 | 6 | ### Examples 7 | 8 | * Create a task from an existing message 9 | * Create a ticket from an existing message 10 | 11 | ## Required features 12 | 13 | * [Bot User](https://api.slack.com/bot-users) 14 | * [Interactive Components](https://api.slack.com/interactive-messages) 15 | * [Message Actions](https://api.slack.com/actions) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | 21 | ## Implementation overview 22 | 23 | ### 1. Open modal from Message Action 24 | 25 | * [payload.json](payload-task-modal.json) 26 | 27 | #### Methods 28 | 29 | * [`views.open`](https://api.slack.com/methods/views.open) 30 | 31 | ### 2. Confirmation in thread 32 | 33 | * [payload.json](payload-task-confirm.json) 34 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22Your%20task%20*Prepare%20customer%20deck*%20has%20been%20created%20%3Aok_hand%3A%22%0A%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%22accessory%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22button%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22plain_text%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22View%20%3Aarrow_upper_right%3A%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22emoji%22%3A%20true%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22url%22%3A%20%22https%3A%2F%2Fexample.com%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22divider%22%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22context%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22elements%22%3A%20%5B%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Assignee%3A*%20%3CfakeLink.toUser.com%7CDavid%3E%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Priority%3A*%20%3Aarrow_double_up%3A%20High%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Labels%3A*%20Sales%22%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%5D%0A%20%20%20%20%20%20%20%20%7D%2C%0A%20%20%20%20%20%20%20%20%7B%0A%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22section%22%2C%0A%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%22type%22%3A%20%22mrkdwn%22%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%22text%22%3A%20%22*Description*%5CnCan%20you%20please%20prepare%20the%20deck%20for%20our%20customer%20meeting%20tomorrow%2C%20%3CfakeLink.toUser.com%7CDavid%3E%3F%5Cn%5Cnhttps%3A%2F%2Fworkspace.slack.com%2Farchives%2FCXXXXXXX%2Fp1553819686001000%22%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%5D) 35 | 36 | #### Methods 37 | 38 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-message-action/create-task.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/task-and-ticket-management/create-task-message-action/create-task.gif -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-message-action/payload-task-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Your task *Prepare customer deck* has been created :ok_hand:" 7 | }, 8 | "accessory": { 9 | "type": "button", 10 | "text": { 11 | "type": "plain_text", 12 | "text": "View :arrow_upper_right:", 13 | "emoji": true 14 | }, 15 | "url": "https://example.com" 16 | } 17 | }, 18 | { 19 | "type": "divider" 20 | }, 21 | { 22 | "type": "context", 23 | "elements": [ 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Assignee:* " 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Priority:* :arrow_double_up: High" 31 | }, 32 | { 33 | "type": "mrkdwn", 34 | "text": "*Labels:* Sales" 35 | } 36 | ] 37 | }, 38 | { 39 | "type": "section", 40 | "text": { 41 | "type": "mrkdwn", 42 | "text": "*Description*\nCan you please prepare the deck for our customer meeting tomorrow, ?\n\nhttps://workspace.slack.com/archives/CXXXXXXX/p1553819686001000" 43 | } 44 | } 45 | ] -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-message-action/payload-task-modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "callback_id": "create_task", 3 | "type": "modal", 4 | "title": { 5 | "type": "plain_text", 6 | "text": "Create task", 7 | "emoji": true 8 | }, 9 | "submit": { 10 | "type": "plain_text", 11 | "text": "Submit", 12 | "emoji": true 13 | }, 14 | "close": { 15 | "type": "plain_text", 16 | "text": "Cancel", 17 | "emoji": true 18 | }, 19 | "blocks": [ 20 | { 21 | "type": "input", 22 | "element": { 23 | "type": "plain_text_input" 24 | }, 25 | "label": { 26 | "type": "plain_text", 27 | "text": "Summary", 28 | "emoji": true 29 | } 30 | }, 31 | { 32 | "type": "input", 33 | "element": { 34 | "type": "plain_text_input", 35 | "multiline": true, 36 | "initial_value": "Can you please prepare the deck for our customer meeting tomorrow, David?\n\nhttps://workspace.slack.com/archives/CXXXXXXX/p1553819686001000" 37 | }, 38 | "label": { 39 | "type": "plain_text", 40 | "text": "Description", 41 | "emoji": true 42 | } 43 | }, 44 | { 45 | "type": "input", 46 | "element": { 47 | "type": "users_select", 48 | "placeholder": { 49 | "type": "plain_text", 50 | "text": "Select a user", 51 | "emoji": true 52 | } 53 | }, 54 | "label": { 55 | "type": "plain_text", 56 | "text": "Assignee", 57 | "emoji": true 58 | }, 59 | "optional": true 60 | }, 61 | { 62 | "type": "input", 63 | "element": { 64 | "type": "static_select", 65 | "placeholder": { 66 | "type": "plain_text", 67 | "text": "Select an option", 68 | "emoji": true 69 | }, 70 | "options": [ 71 | { 72 | "text": { 73 | "type": "plain_text", 74 | "text": ":no_entry_sign: Critical", 75 | "emoji": true 76 | }, 77 | "value": "critical" 78 | }, 79 | { 80 | "text": { 81 | "type": "plain_text", 82 | "text": ":arrow_double_up: High", 83 | "emoji": true 84 | }, 85 | "value": "high" 86 | }, 87 | { 88 | "text": { 89 | "type": "plain_text", 90 | "text": ":arrow_up_small: Medium", 91 | "emoji": true 92 | }, 93 | "value": "medium" 94 | }, 95 | { 96 | "text": { 97 | "type": "plain_text", 98 | "text": ":arrow_down_small: Low", 99 | "emoji": true 100 | }, 101 | "value": "low" 102 | } 103 | ] 104 | }, 105 | "label": { 106 | "type": "plain_text", 107 | "text": "Priority", 108 | "emoji": true 109 | }, 110 | "optional": true 111 | }, 112 | { 113 | "type": "input", 114 | "element": { 115 | "type": "multi_external_select", 116 | "placeholder": { 117 | "type": "plain_text", 118 | "text": "Select typing to see labels", 119 | "emoji": true 120 | } 121 | }, 122 | "label": { 123 | "type": "plain_text", 124 | "text": "Labels", 125 | "emoji": true 126 | } 127 | } 128 | ] 129 | } -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-slash-command/README.md: -------------------------------------------------------------------------------- 1 | # Create task from Slash Command 2 | 3 | ![](create-task-slash-command.gif) 4 | *Create task from Slash Command* 5 | 6 | ### Examples 7 | 8 | * Create a task through a Slash Command 9 | * Create a ticket through a Slash Command 10 | 11 | ## Required features 12 | 13 | * [Bot User](https://api.slack.com/bot-users) 14 | * [Interactive Components](https://api.slack.com/interactive-messages) 15 | * [Slash Commands](https://api.slack.com/slash-commands) 16 | 17 | ## Required scopes 18 | 19 | * [`bot`](https://api.slack.com/scopes/bot) 20 | * [`commands`](https://api.slack.com/scopes/commands) 21 | 22 | ## Implementation overview 23 | 24 | ### 1. Open modal through Slash Command 25 | 26 | * [payload.json](payload-task-modal.json) 27 | 28 | #### Methods 29 | 30 | * [`views.open`](https://api.slack.com/methods/views.open) 31 | 32 | ### 2. Confirmation in DM 33 | 34 | * [payload.json](payload-task-confirm.json) 35 | * [Open in Block Kit Builder](https://api.slack.com/tools/block-kit-builder?blocks=%5B%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22Your%20task%20%3Cfakelink.toUser.com%7C*Review%20landing%20page%20design*%3E%20has%20been%20created%20%3Aok_hand%3A%22%7D%2C%22accessory%22%3A%7B%22type%22%3A%22button%22%2C%22text%22%3A%7B%22type%22%3A%22plain_text%22%2C%22text%22%3A%22%3Apencil%3A%20Edit%22%2C%22emoji%22%3Atrue%7D%2C%22value%22%3A%22edit%22%7D%7D%2C%7B%22type%22%3A%22divider%22%7D%2C%7B%22type%22%3A%22context%22%2C%22elements%22%3A%5B%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Assignee%3A*%20%3CfakeLink.toUser.com%7C%40David%3E%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Priority%3A*%20%3Aarrow_double_up%3A%20High%22%7D%2C%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Labels%3A*%20Design%22%7D%5D%7D%2C%7B%22type%22%3A%22section%22%2C%22text%22%3A%7B%22type%22%3A%22mrkdwn%22%2C%22text%22%3A%22*Description*%5CnPlease%20review%20the%20new%20landing%20page%20design%22%7D%7D%5D) 36 | 37 | #### Methods 38 | 39 | * [`chat.postMessage`](https://api.slack.com/methods/chat.postMessage) 40 | -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-slash-command/create-task-slash-command.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/task-and-ticket-management/create-task-slash-command/create-task-slash-command.gif -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-slash-command/create-task-slash-command.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/slack-samples/app-interaction-patterns/3ba629896bf2fc1d130f9fbd2cc381502ed251de/task-and-ticket-management/create-task-slash-command/create-task-slash-command.mp4 -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-slash-command/payload-task-confirm.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "type": "section", 4 | "text": { 5 | "type": "mrkdwn", 6 | "text": "Your task has been created :ok_hand:" 7 | }, 8 | "accessory": { 9 | "type": "button", 10 | "text": { 11 | "type": "plain_text", 12 | "text": ":pencil: Edit", 13 | "emoji": true 14 | }, 15 | "value": "edit" 16 | } 17 | }, 18 | { 19 | "type": "divider" 20 | }, 21 | { 22 | "type": "context", 23 | "elements": [ 24 | { 25 | "type": "mrkdwn", 26 | "text": "*Assignee:* " 27 | }, 28 | { 29 | "type": "mrkdwn", 30 | "text": "*Priority:* :arrow_double_up: High" 31 | }, 32 | { 33 | "type": "mrkdwn", 34 | "text": "*Labels:* Design" 35 | } 36 | ] 37 | }, 38 | { 39 | "type": "section", 40 | "text": { 41 | "type": "mrkdwn", 42 | "text": "*Description*\nPlease review the new landing page design" 43 | } 44 | } 45 | ] -------------------------------------------------------------------------------- /task-and-ticket-management/create-task-slash-command/payload-task-modal.json: -------------------------------------------------------------------------------- 1 | { 2 | "callback_id": "create_task", 3 | "type": "modal", 4 | "title": { 5 | "type": "plain_text", 6 | "text": "Create task", 7 | "emoji": true 8 | }, 9 | "submit": { 10 | "type": "plain_text", 11 | "text": "Submit", 12 | "emoji": true 13 | }, 14 | "close": { 15 | "type": "plain_text", 16 | "text": "Cancel", 17 | "emoji": true 18 | }, 19 | "blocks": [ 20 | { 21 | "type": "input", 22 | "element": { 23 | "type": "plain_text_input", 24 | "initial_value": "Review landing page design" 25 | }, 26 | "label": { 27 | "type": "plain_text", 28 | "text": "Summary", 29 | "emoji": true 30 | } 31 | }, 32 | { 33 | "type": "input", 34 | "element": { 35 | "type": "plain_text_input", 36 | "multiline": true, 37 | "placeholder": { 38 | "type": "plain_text", 39 | "text": "Describe the task", 40 | "emoji": true 41 | } 42 | }, 43 | "label": { 44 | "type": "plain_text", 45 | "text": "Description", 46 | "emoji": true 47 | } 48 | }, 49 | { 50 | "type": "input", 51 | "element": { 52 | "type": "users_select", 53 | "placeholder": { 54 | "type": "plain_text", 55 | "text": "Select a user", 56 | "emoji": true 57 | } 58 | }, 59 | "label": { 60 | "type": "plain_text", 61 | "text": "Assignee", 62 | "emoji": true 63 | }, 64 | "optional": true 65 | }, 66 | { 67 | "type": "input", 68 | "element": { 69 | "type": "static_select", 70 | "placeholder": { 71 | "type": "plain_text", 72 | "text": "Select an option", 73 | "emoji": true 74 | }, 75 | "options": [ 76 | { 77 | "text": { 78 | "type": "plain_text", 79 | "text": ":no_entry_sign: Critical", 80 | "emoji": true 81 | }, 82 | "value": "critical" 83 | }, 84 | { 85 | "text": { 86 | "type": "plain_text", 87 | "text": ":arrow_double_up: High", 88 | "emoji": true 89 | }, 90 | "value": "high" 91 | }, 92 | { 93 | "text": { 94 | "type": "plain_text", 95 | "text": ":arrow_up_small: Medium", 96 | "emoji": true 97 | }, 98 | "value": "medium" 99 | }, 100 | { 101 | "text": { 102 | "type": "plain_text", 103 | "text": ":arrow_down_small: Low", 104 | "emoji": true 105 | }, 106 | "value": "low" 107 | } 108 | ] 109 | }, 110 | "label": { 111 | "type": "plain_text", 112 | "text": "Priority", 113 | "emoji": true 114 | }, 115 | "optional": true 116 | }, 117 | { 118 | "type": "input", 119 | "element": { 120 | "type": "multi_external_select", 121 | "placeholder": { 122 | "type": "plain_text", 123 | "text": "Select typing to see labels", 124 | "emoji": true 125 | } 126 | }, 127 | "label": { 128 | "type": "plain_text", 129 | "text": "Labels", 130 | "emoji": true 131 | } 132 | } 133 | ] 134 | } --------------------------------------------------------------------------------