Giter VIP home page Giter VIP logo

onboarding-example's Introduction

Slack Onboarding Example

This project demonstrates how to build an Onboarding App using Slack's Events API. It's meant to serve only as an example through code.

onboarding

Setup

Enable the Events

Updating the Script

The onboarding script is driven by onboarding.json. The app looks for events that match the event property in this JSON and marks it complete.

{
  "welcome": {
    "text": "Welcome to Slack! Get started by completing the steps below.",
    "attachments": [
      {
        "event": "star_added",
        "title": "Star a Message",
        "title_link": "https://get.slack.help/hc/en-us/articles/201331016-Using-stars",
        "text": "Stars are a way to mark an item in Slack as important. You can star channels or direct messages to move them to the top of your left sidebar, or star messages so you can easily come back to them later."
      },
      {
        "event": "reaction_added",
        "title": "Respond With a Reaction Emoji",
        "title_link": "https://get.slack.help/hc/en-us/articles/206870317-Emoji-reactions",
        "text": "You can quickly respond to any message on Slack with an emoji reaction. Reactions can be used for any purpose: voting, checking off to-do items, showing excitement."      
      },
      {
        "event": "pin_added",
        "title": "Pin a Message",
        "title_link": "https://get.slack.help/hc/en-us/articles/205239997-Pinning-messages-and-files",
        "text": "Important messages and files can be pinned to the details pane in any channel or direct message, including group messages, for easy reference."
      }
    ]
  }
}

Running Locally

Environment

This app requires two environment variables.

  • TOKEN - The Slack token used to post messages
  • PORT - The port to host the webserver on

WebServer

npm install
npm start

Tunneling

Using ngrok you can port a public url to your local server. After installing ngrok, you can get a url by running:

ngrok http 3000

You should get a response like this:

Tunnel Status                 online
Version                       2.1.3
Region                        United States (us)

Web Interface                 http://127.0.0.1:4040
Forwarding                    http://d8ab065c.ngrok.io -> localhost:3000
Forwarding                    https://d8ab065c.ngrok.io -> localhost:3000

Connections                   ttl     opn     rt1     rt5     p50     p90
                              0       0       0.00    0.00    0.00    0.00  

Use the Forwarding url as the base url of your Request URL on Slack's Event Subscription page.

onboarding-example's People

Contributors

colmdoyle avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

onboarding-example's Issues

Add To Slack?

Nice simple example but does the app connect to a Slack team?

I've setup the app as per the instructions but there isn't any behaviour to "Add to Slack".

Any suggestions on the simplest way to achieve this?

Python version

Is there a Python version of this simple Slack webhook app? Can you interlink them?

Example does not work (user can't interact with msg)

In the example you give, it is not possible for the user to interact with the message (e.g. star/pin).
(Using this: slack.send(response_url, message); )
Instead, using this works fine: slack.send('chat.postMessage', message);

Clarify ngrok/http post arrangement

This is intended as an example for beginners, but assumes a lot of understanding from the network side. Take this for example:

Tunneling
Using ngrok you can port a public url to your local server.

You link to ngrok, but don't explain anything about how it works or what it's doing. As an ngrok user I had no trouble understanding that, but you can't just assume everyone knows or can get up to speed on what ngrok is - particularly in a beginners' tutorial.

If you want to improve your tutorial (and you should, see #1), this would be a great place to start.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.