All Projects → slackapi → template-action-and-dialog

slackapi / template-action-and-dialog

Licence: MIT license
A sample Slack app "ClipIt", which allows user to clip a message using a message action

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to template-action-and-dialog

template-actionable-notifications
Sample Slack app to illustrate how incoming webhooks and interactive messages can be used to build a helpdesk integration
Stars: ✭ 31 (+29.17%)
Mutual labels:  slack-api, slack-blueprint, slack-workflow-sample, slack-tutorial
template-announcement-approvals
Sample Slack app that uses the Events API and interactive message to implement an approvals workflow
Stars: ✭ 73 (+204.17%)
Mutual labels:  slack-api, slack-blueprint, slack-workflow-sample, slack-tutorial
Slack Block Builder
Lightweight, no-dependency JavaScript library for creating Slack Block Kit UIs, with a builder syntax, inspired by SwiftUI.
Stars: ✭ 129 (+437.5%)
Mutual labels:  slack-api
slacker
Slacker - Easy access to the Slack API and admin of workspaces/teams.
Stars: ✭ 14 (-41.67%)
Mutual labels:  slack-api
node-tasks-app
Tasks App is a sample Task Management app built on the Slack Platform.
Stars: ✭ 59 (+145.83%)
Mutual labels:  slack-api
Slack Watchman
Monitoring your Slack workspaces for sensitive information
Stars: ✭ 159 (+562.5%)
Mutual labels:  slack-api
template-channel-webhooks
Sample Slack app that uses a Bot to create per-channel webhooks
Stars: ✭ 27 (+12.5%)
Mutual labels:  slack-blueprint
Slack Machine
A sexy, simple, yet powerful and extendable Slack bot
Stars: ✭ 91 (+279.17%)
Mutual labels:  slack-api
template-incident-management
A sample of managing incidents via Slack
Stars: ✭ 26 (+8.33%)
Mutual labels:  slack-workflow-sample
slack-ruby-block-kit
A ruby wrapper for Slack's Block Kit
Stars: ✭ 50 (+108.33%)
Mutual labels:  slack-api
admissions
Admissions is the gateway to Elixir School's private Slack
Stars: ✭ 18 (-25%)
Mutual labels:  slack-api
Bolt Python
A framework to build Slack apps using Python
Stars: ✭ 190 (+691.67%)
Mutual labels:  slack-api
deslackify
A program to delete old slack messages.
Stars: ✭ 19 (-20.83%)
Mutual labels:  slack-api
Slack Api Specs
Open API specifications for platform products by Slack
Stars: ✭ 148 (+516.67%)
Mutual labels:  slack-api
fridaybot
Slack bot for https://spb-frontend.slack.com
Stars: ✭ 29 (+20.83%)
Mutual labels:  slack-api
Slack cleaner2
📝 Python3 module for deleting Slack messages and files using the Slack REST API
Stars: ✭ 92 (+283.33%)
Mutual labels:  slack-api
Slacknimate
👯 Realtime text animation for Slack chatops
Stars: ✭ 250 (+941.67%)
Mutual labels:  slack-api
slack-morphism
Type-safe and reactive Slack client with blocks templating DSL and rate control for Scala
Stars: ✭ 18 (-25%)
Mutual labels:  slack-api
slack-uno
Play Uno in Slack!
Stars: ✭ 26 (+8.33%)
Mutual labels:  slack-api
slacking
Modern Slack C++ 11 library for communicating with the Web Slack API
Stars: ✭ 58 (+141.67%)
Mutual labels:  slack-api

Blueprint: Message Action and Dialog Modal (NEW!)

Updated January 2020: As we have introduced some new features, this tutorial and the code samples have been updated! All the changes from the previous version of this example, read the DIFF.md

By registering your app's capabilities as message actions, users can pick and choose messages to send to your app so you can do something useful with them. Store these messages in a virtual trapper keeper, feed them to your internal markov chain bot, or file away information about an important lead.

Creating "ClipIt" app using an action and a dialog

App icon This fictional Slack app, "ClipIt" allows users to "clip" a message posted on Slack by using the actions to export the message to JSON to be used in the external app/service, let's say, "ClipIt web app".

Developer Use-Cases

If you are developing apps like memo / note-taking app, collaborative doc app, this sample use-case would be a nice addition to your Slack app.

Also, the message action would be great for:

  • Bug / issue tracking app (e.g. "Create a ticket from the message")
  • To-Do app (e.g. "Create a to-do")
  • Project management app (e.g. "Attach to task")
  • Social media (e.g. "Post it to [my social media] App")

User Work Flow

When a user hover a message then choose "Clip the message" from the action menu, a dialog pops open. The message text is pre-populated into the modal box, but the user can edit before submitting it too. Once a user finalize the form and submit, the app DMs the user with the confirmation.

ClipIt

App Flow

diagram

Setup

Create a Slack app

  1. Create an app at https://api.slack.com/apps
  2. Navigate to the OAuth & Permissions page and add the following bot token scopes:
    • commands (required for Actions)
    • chat:write (required to send messages as a bot user)
    • im:write (required to open a DM channel between your bot and a user)
  3. Click 'Save Changes' and install the app

Run locally or Remix on Glitch

  1. Get the code
  2. Set the following environment variables to .env with your API credentials (see .env.sample):
    • SLACK_ACCESS_TOKEN: Your app's bot token, xoxb- token (available on the Install App page, after you install the app to a workspace once.)
    • SLACK_SIGNING_SECRET: Your app's Signing Secret (available on the Basic Information page)to a workspace)
  3. If you're running the app locally:
    1. Start the app (npm start)
    2. In another window, start ngrok on the same port as your webserver ​

Add a Action

  1. Go back to the app settings and click on Interactive Components.
  2. Click "Enable Interactive Components" button:
    • Request URL: Your ngrok or Glitch URL + /actions in the end (e.g. https://example.ngrok.io/actions)
    • Under Actions, click "Create New Action" button
      • Action Name: Clip the message
      • Description: Save this message to ClipIt! app
      • Callback ID: clipit
  3. Save ​

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].