A chatbot for the Deloitte CBO #under30s channel.

Overview

Harold

Contributors Forks Stargazers Issues MIT License


Logo

Harold

A chatbot for our favourite Slack channel at Deloitte.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

This project is deployed using the serverless framework.

Harold runs as a NodeJS Lambda which is triggered on a Cron Schedule. He uses the groups.info Slack API to retrieve a list of user's for a channel and then sends a question to the channel via a web-hook. You can access Harold's slack integration options from here.

The list of questions that Harold selects from is provided as a separate text file resource to the main application logic. If you do not have access PM @sean or @Jim Kelly on Slack to be added as a contributor.

Blacklisting Users

Since the groups.info returns all members of a group, it will also return inactive users and bots. To rectify this, Harold utilises a simple blacklist mechanism which takes an array of userIDs and reselects a user in the instance where a blacklisted user is chosen. To blacklist any user, fetch their userID and add it to the memberBlackList array in handler.js. An example of this can be seen below.

const memberBlacklist = [
    "U037L59QX0R", // Derek
    "U0375TKH0LU", // Jimmy
    // "U0370KT3VRC" // Aaron
  ];

( Back to top )

Built With

( Back to top )

Getting Started

Prerequisites

You'll require both an AWS and Serverless account to deploy Harold, whereas you'll only require Serverless to run the bot locally.

  • serverless
brew install serverless # Install serverless
serverless login # Login via the serverless dashboard in a web browser
  • aws-cli
brew install aws # Install AWS
aws configure
AWS Access Key ID [None]: AKIAIOSFODNN7EXAMPLE
AWS Secret Access Key [None]: wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
Default region name [None]: us-east-1
Default output format [None]: json

Secrets

Additionally, you'll need to either have a copy of the .env file containing secrets, or you can create one yourself with the following structure.

OAUTH_TOKEN=X
ENVIRONMENT=prod
U30_SLACK_CHANNEL_ID=X
U30_WEBHOOK_URL=X

All of these can be found through the Slack API portal.

Running Harold Locally

  1. Comment out

    - schedule: cron(15 23 ? * SUN-THU *)

    in the file, serverless.yml.

  2. Within the same file, uncomment the following line:

    - httpApi: 'GET /handler'
  3. Run the following series of commands.

    cd /path/to/repo # Change directory to the repo
    sls offline

Deploying Harold

To deploy Harold, configure the serverless and AWS credentials locally as outlined previously in the Prerequisites section. Then enter the following commands.

cd /path/to/repo # Change directory to the repo
sls deploy --aws-profile default --verbose

( Back to top )

Usage

Harold will follow a cron schedule as is outlined in the serverless.yml file. Currently, the bot runs from Monday to Friday; sending a message at 10:15AM AEDT.

( Back to top )

Roadmap

  • Complete handover of Harold to the new team.
  • Update the README.
  • Imlpement automatic deployments (GitHub Actions) when any PR/MRs are approved to master branch.
  • Perform an audit of the questions and remove any bad ones.
  • Develop outline for future features and improvements.
  • Add additional plans and updates here.

See the open issues for a full list of proposed features (and known issues).

( Back to top )

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

( Back to top )

License

Distributed under the MIT License. See LICENSE.txt for more information.

( Back to top )

Contact

All contributors and project maintainers are available on Slack via their handles as can be seen below:

  • @Aaron Douglas
  • @Houston
  • @Jimmy Houang
  • @Jim Kelly
  • @Pat Randell
  • @Rebecca Ye
  • @ying

( Back to top )

Acknowledgments

Thank you to the following for their efforts in creating and maintaining Harold over the years.

Project Board

The previous project board can be seen here as hosted on Trello. This is now out of date and is yet to be updated regarding further developments.

( Back to top )

You might also like...

Use Telegram channel as a minimal database.

It's a work in progress! The TGDB Use Telegram channel as a minimal databases! 🚀 It's fast, faster than I expected it to be, and like Telegram, it's

Aug 30, 2022

multi-channel fulfillment at scale

Openship is an operations platform that enables multi-channel fulfillment Website · Documentation · Openship Cloud Running locally To get Openship run

Dec 31, 2022

Swaps active audio input device in OBS upon twitch chat channel point redemption.

Swaps active audio input device in OBS upon twitch chat channel point redemption.

OBS-Mic-Swapper Shortcuts Set up Program Description Example of Functionality FAQ Contact Info Set up Create an account on Twitch for your bot Make su

Nov 8, 2022

Trying 5 Redux Alternatives (Zustand, Recoil, Jotai, Rematch and Redux-Toolkit). Expalined on CoderOne Ytb channel

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

Oct 3, 2022

Notify new channel created/renamed on Next-gen Slack platform

notify-new-channel Notify new channel created/renamed on Next-gen Slack platform Install Deploy and create triggers. slack deploy slack trigger create

Oct 10, 2022

⚡️The Fullstack React Framework — built on Next.js

⚡️The Fullstack React Framework — built on Next.js

The Fullstack React Framework "Zero-API" Data Layer — Built on Next.js — Inspired by Ruby on Rails Read the Documentation “Zero-API” data layer lets y

Jan 4, 2023

This DJS ticket system with transcripts is fully configurable, you can change the transcripts channel, tickets channel, and more

This DJS ticket system with transcripts is fully configurable, you can change the transcripts channel, tickets channel, and more! This command uses embeds, and buttons.

Oct 18, 2022

Grupprojekt för kurserna 'Javascript med Ramverk' och 'Agil Utveckling'

JavaScript-med-Ramverk-Laboration-3 Grupprojektet för kurserna Javascript med Ramverk och Agil Utveckling. Utvecklingsguide För information om hur utv

May 18, 2022

Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

May 3, 2022

Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

Jan 3, 2023

A very lightweight and chatbot with multi language support

A very lightweight and chatbot with multi language support

Jul 25, 2022

Chatbot encargado de brindar información a los alumnos de las preparatorias universidad autónoma de Zacatecas o a las personas interesadas en ellas

Chatbot encargado de brindar información a los alumnos de las preparatorias universidad autónoma de Zacatecas o a las personas interesadas en ellas

Chatbot encargado de brindar información a los alumnos de las preparatorias universidad autónoma de Zacatecas o a las personas interesadas en ellas, en cual se implementará el análisis de sentimientos para la detección de algún indicio de problema de salud mental esto identificando mensajes positivos y negativos, al igual que los tipos de sentimientos como tristeza, felicidad, enfado, etc.

Dec 19, 2021

Botpress Conntect connects Rocket.Chat with a Botpress chatbot

Botpress Conntect connects Rocket.Chat with a Botpress chatbot

Botpress Connect What is Botpress Connect? Botpress Conntect connects Rocket.Chat with a Botpress chatbot.

Nov 14, 2022

A discord chatbot made using discord.js

Discord Chatbot A discord chatbot made with Discord.js and Mongoose. 📥 Installation and usage Install Node.js v16.9.0 or higher. Download and unzip t

Jan 1, 2023

Aeona is a multi-purpose discord bot ready to skill up and boost up your Discord server! It has an State of the Art AI chatbot to make sure you never feel bored!

Aeona | Chatbot Aeona is an ever-growing multipurpose bot; primarily a fun chatbot you can converse with, but also showcases a wide range of fun comma

Jan 9, 2023

DialogFlow Machine Learning Chatbot

 DialogFlow Machine Learning Chatbot

DialogFlow Machine Learning Chatbot Project Overview This repository contains a backend service for an intelligent chatbot that onboards clients, answ

Jul 21, 2022

An open source, friendly human-like chatbot to be with you, forever

An open source, friendly human-like chatbot to be with you, forever

Chatbot A Friendly human-like chatbot to be with you, forever Made by Rahuletto#0243 This template powers our system at Simply API Instructions This b

Sep 18, 2022

This repository contains a fullstack chatbot project based on the ChatGPT `gpt-3.5-turbo` model.

This is a fullstack chatbot created with React, Nodejs, OpenAi, and ChatGPT while developing the following tutorial: How To Build A Chat Bot Applicati

May 10, 2023

A Node.js AI chatbot with unlimited context and chat history.

Memory Bot Memory Bot is an AI chatbot built with Node.js to demonstrate unlimited context and chat history for more cost-efficient context-aware conv

May 10, 2023
Comments
  • CI/CD Environment Variables Missing Results in Failed Runs on Serverless

    CI/CD Environment Variables Missing Results in Failed Runs on Serverless

    Description

    As identified by @houstonpearse, previous versions of the lambda, specifically version 10, have no environment (env) variables. At this current point, this is the most likely reason as to why previous deployments via the pipeline have failed to fire the cron schedule correctly. This can be seen from the following snapshot of the serverless dashboard where the deployment coincided with a failure for Harold to fire on schedule.

    image

    Resolution

    Simple Fix

    For the easier implementation to determine whether or not it is the environment variables leading to the cron schedule not firing. @houstonpearse suggested the following:

    • We make a commit, let the CI/CD deploy, then add the env variables in the AWS console, then hopefully if a new commit is made and when the CI/CD redeploys it the env variables will persist.

    Long-term Solution

    • Build an ansible script to be called via GitHub Workflow to deploy Harold to serverless, etc with the env variables.
    bug 
    opened by jamestkelly 0
  • Harold Question Audit

    Harold Question Audit

    Description

    Some of the questions currently posted by Harold are still relatively inappropriate or could be construed as inappropriate by individuals in the channel. Areas on contention include the original reason where Harold was taken down for some time, i.e., questions about war, politics, and gender.

    Resolution

    We need to go through and remove any potentially problematic questions first and foremost before deciding whether they can be acceptable for use by Harold.

    CC: @houstonpearse, @yingyingyw, @yerebecca

    help wanted 
    opened by jamestkelly 0
Owner
Jim Kelly
I'm a Graduate Consultant at Deloitte Australia in Platform Engineering. Graduated from my Bachelor's at QUT with distinction in Computer Science.
Jim Kelly
Hemsida för personer i Sverige som kan och vill erbjuda boende till människor på flykt

Getting Started with Create React App This project was bootstrapped with Create React App. Available Scripts In the project directory, you can run: np

null 4 May 3, 2022
Kurs-repo för kursen Webbserver och Databaser

Webbserver och databaser This repository is meant for CME students to access exercises and codealongs that happen throughout the course. I hope you wi

null 14 Jan 3, 2023
DialogFlow Machine Learning Chatbot

DialogFlow Machine Learning Chatbot Project Overview This repository contains a backend service for an intelligent chatbot that onboards clients, answ

ddayto 10 Jul 21, 2022
An open source, friendly human-like chatbot to be with you, forever

Chatbot A Friendly human-like chatbot to be with you, forever Made by Rahuletto#0243 This template powers our system at Simply API Instructions This b

Rahul Marban 6 Sep 18, 2022
This repository contains a fullstack chatbot project based on the ChatGPT `gpt-3.5-turbo` model.

This is a fullstack chatbot created with React, Nodejs, OpenAi, and ChatGPT while developing the following tutorial: How To Build A Chat Bot Applicati

NJOKU SAMSON EBERE 6 May 10, 2023
A Node.js AI chatbot with unlimited context and chat history.

Memory Bot Memory Bot is an AI chatbot built with Node.js to demonstrate unlimited context and chat history for more cost-efficient context-aware conv

Gordon Mickel 6 May 10, 2023
Code in Solidity like a PRO with Egor Gavrilov. Check out YouTube channel ▶️

Code in Solidity like a PRO with Egor Gavrilov Check out YouTube channel youtube.com/EgorGavrilov Tutorials Perfect Solidity Stack It's easy to get st

Egor Gavrilov 53 Dec 19, 2022
Integrate Railway Project events with Telegram Chat/Channel using Railway Webhooks

Railway to Telegram Integrate Railway Project events with Telegram Chat/Channel using Railway Webhooks! One Click Self Deploy Manual Self Deploy Fork

Agampreet Singh 9 Jul 5, 2022
You view the Twitch channel chat and you can access the details of the users who wrote during the viewing period.

Twitch Chat Web Page You view the Twitch channel chat and you can access the details of the users who wrote during the viewing period. Getting Started

Mert 6 Dec 13, 2022
Automatic Role Adder Is Usually Used In Coding Servers Which Give Access To Codes By Subbing To Their Channel So This Helps Them To Auto Role People :)

Automatic Role Adder Setup Guide Automatic Role Adder Is Usually Used In Coding Servers Which Give Access To Codes By Subbing To Their Channel So This

NotJust 25 Dec 23, 2022