Code Monkey home page Code Monkey logo

supportherojr's Introduction

SupportHeroJr

Slack bot to help faciliate support discussions in the PostHog Slack workspace.

Slack API setup

  • Create a Slack app at https://api.slack.com/apps
  • On the basic information tab, you will find your signing secret, which will be our signingSecret env variable
  • On the same tab, create a app-level token that has both authorizations:read and connections:write permissions, the token that results will be our appToken env variable.
  • Go to the OAuth and permissions tab and copy the "Bot User OAuth Token", place that token under the OAuthToken env variable
  • Go to the Slash commands tab and create three commands: /disable, /enable and /sethero. Set the description for each to whatever is wanted
  • Click on Socket Mode and enable the slider next to "Enable Socket Mode"
  • Go to the Install App tab and click "Reinstall to Workspace" to add the bot to the workspace
  • Finally, go into the channel where you want the bot to function and enter /invite @Your-App-Name.

NOTE - If the bot isn't hosted, you need to run it locally using the commands below for the bot to respond.

Local Setup

  • yarn
  • ts-node index.ts

Commands

  • /disable - disables the selected user from recieving messages from the bot
  • /enable - enables the user to get messages from the bot again
  • /sethero - sets the current support hero, has 2 params, a mentioned slack member and a timezone (ex. 'America/New_York'), the timezone cannot contain spaces.

supportherojr's People

Contributors

mrkevinoconnell avatar joethreepwood avatar

Stargazers

 avatar

Watchers

 avatar  avatar

supportherojr's Issues

Next steps

Hey @MrKevinOConnell ! Thanks so much for working on this repo for us.

I'm Joe and I lead Product Marketing at PostHog. I'm not a developer, but I've had a look through the code and, to a layman like me, it looks OK.

I had a few quick questions to assess how we may move this forward. I'll ask them here, but happy to connect over a zoom if you prefer!

  • Do we limit who can use the Slack commands you detail? We obviously don't want users changing the support hero or anything.
  • Has anyone at PostHog already sent you some merch as a thank you for your recent PRs? I will, if not! Just reach out to me at [email protected] with your address.

I think we may also update this to automatically pull Support Hero schedules from our PagerDuty, but I'll need to follow up with an engineer on that. Next step after answering the above will be moving to try it out.

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.