Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Slack "Greet Bot" to direct new-joiners to create a profile #154

Closed
sarL3y opened this issue May 11, 2020 · 14 comments
Closed

Add Slack "Greet Bot" to direct new-joiners to create a profile #154

sarL3y opened this issue May 11, 2020 · 14 comments

Comments

@sarL3y
Copy link
Member

sarL3y commented May 11, 2020

Overview

Upon joining the org Slack channels, a new user should be greeted with a bot that directs them to vrms.io to create a new profile

Action Items

@switchzer0 switchzer0 added this to the Second Iteration milestone May 19, 2020
@alex-anakin
Copy link
Member

Take a look here 100Automations/futureautomations#8

@ye-susan ye-susan self-assigned this Aug 13, 2020
@ye-susan
Copy link

ye-susan commented Aug 14, 2020

Copied from 100Automations issue 8:

Goal: Replace greet.bot with a new slack bot that can pull from csv file (Google docs) and markdown files: e.g., When to send (days they have been a member), time (when to send message), active(true/false), message file name
e.g.

    1, 10:01am, true, welcome.md
    7, 10:01am, true, joinedlastweek.md
    30, 10:01am, true, active30days.md
    15, 10:01am, false, notactive15days.md

when script finishes running it should report to whichever handles are in a csv file
e.g. @ bonnie, @ leader2, @ leader3, etc. as well as adding a successful or unsuccessful message to a log file in the repo.

Automation triggers (What starts it? What's it responding to?)

  • Time-based (Specify frequency (e.g. 1x/week)
  • Event-based (e.g. someone just created a new GitHub on a repo)
  • The script will run once a day. Messages will be sent based on how long someone is a member and each will have a different date trigger as specified by the csv file.

Clarifying Questions

  • What information specifically should the leaders be seeing in the log, or just a success/fail message? Will slackbot send them a message or a file?

Action Items

  • set up Slackbot to send messages to users when they join/after 7, 15, 30 days
  • Determine how to send info from slack to DB
  • Connect to our team roster (mongoDB) using Node
  • automate data population from slackbot to the DB

Resources
https://medium.com/better-programming/make-a-team-roster-with-node-react-and-google-sheets-305b9f9ebbb1
https://api.slack.com/reference/surfaces/formatting
https://api.slack.com/start/building/bolt-js
https://api.slack.com/methods

@ye-susan
Copy link

ye-susan commented Aug 17, 2020

Progress: I've set up the Bolt framework and have the live code working on Glitch (local development not set up yet), and also reading through docs to get more familiar with the slack APIs
Blocks: reading through docs, many many docs
ETA: Hoping I can at least get bot to read user's joined date and send message accordingly by next week
Availability: Weekdays

@ye-susan
Copy link

ye-susan commented Aug 24, 2020

Progress: I haven't made too much progress on the bot itself, mostly getting acquainted with the VRMS repo
Blocks: setting up VRMS correctly and setting up slackbot to run from there
ETA: Will unblock my blocks by next week's meeting 🧱
Availability: Weekdays

Some issues/ questions:

  • in our demo user model on google drive, we have a 'createdDate', I'm assuming this is based on the date that they create a VRMS account?
  • If so, do we still need to track the date they joined Slack? I ask mostly because tracking the current slack users would require slack's 'team_accessLog' API which is for paid accounts only, whereas 'team_joined' is an event API (listening for new users) and is free to use.

@ye-susan
Copy link

ye-susan commented Sep 1, 2020

Progress: Bot can send messages to a specified user (via user slack ID)
image
Currently trying to get this to print from a markdown instead of manually including it inside a text block
Blocks: Will need to talk with Bonnie about slack bot specifics, and work with team to consolidate our bots onto VRMS dev branch
ETA: Will work out a time with the team to discuss
Availability: Weekdays

@ye-susan
Copy link

Progress: Bot can read (from a markdown file) and send messages and can also calculate how long user has been a member of a slack workspace (via slack user data)
Blocks: Need a way to connect MongoDB data and slack data -- is email a sufficient primary/foreign key to use?
Availability: limited this week, but I'll keep working on what I can

@ye-susan
Copy link

Progress: no additional updates
Blocks: the slack devs had a meeting and we're anticipating to test our bots on the HFLA workspace - if we can receive admin access

@ye-susan
Copy link

ye-susan commented Oct 13, 2020

Questions/Blocks :

  • Should user's activity be tracked using first their user object (createdDate) and then reference their latest activity in the checkins model (using userId and createdDate of the event)?
  • if available: markdown files with messages for newUsers

@switchzer0 switchzer0 removed this from the Second Iteration milestone Oct 14, 2020
@ye-susan
Copy link

Progress: Slackbot is reading from the models, now I just need to create one more function for a list of users to send messages to (I'm thinking about using User model for User's account creation date and CheckIn Model for last date that user checked in -- this might change when we move to new models in the future....)
Blocks: markdown files with messages for newUsers
ETA: Aiming to create a PR this week
Availability: open this week

@alex-anakin
Copy link
Member

@ye-susan please add an update

@ye-susan
Copy link

Progress: Need to make a few more adjustments to the function (changing around the way I do my querying to the db)
Availability: Limited this week

@ye-susan
Copy link

ye-susan commented Nov 2, 2020

Created PR: #382

I'll have to take some time off VRMS to focus on work, so I wanted to submit my PR with what I currently have.

Current functionality:

  • query the db for user accounts that are <= 30 days old
  • message user from markdown via Slackbot direct message

Improvements Needed:

  • check if user has already attended meetings, so they won't receive the messages
  • this slackbot is currently not linked to cron to be run daily
  • need a way to determine that we've already messaged user so they won't receive message again

@nickbeaird
Copy link
Contributor

This work is being held on hold for the time being until we determine the best way to implement with the mvp.

@juliagab56
Copy link
Member

@juliagab56

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests