Slack bot for self-servicing automation of common or predictable tasks.
Receptionist bot aims to provide a no-code frontend for technical & non-technical users to easily automate away some of the tedious repetition that can permeate Slack as companies grow larger. Its scope is narrow: rather than replacing the first-party Slack Workflows system or becoming an entire ecosystem such as SOCless, Receptionist bot bridges the gap between the promise of Slack Workflows and the current state provided to users while also providing workflow automations for free-tier communities.
The app is designed to be highly extensible for new features in your workflows and is unopinionated with regards to its deployment infrastructure.
- Developing the bot in a local environment (with or without docker)
- How to deploy to AWS as a Server using Terraform
- How to deploy to AWS as Serverless Functions using Terraform
- Setting up the Slack App
- Supported Features
- Known Bugs & Limitations
- View UI Examples using Block Kit Builder
- Special Thanks & Shoutouts
The app ships with a slash command /rec-manage
that will display a UI for Creating, Editing, and Deleting Receptionist Workflow Responses
This project is a monorepo, meaning it contains multiple crates or (packages) in one repository. It consists of of the following crates:
receptionist
- The core library for making a receptionist bot implementationrec_server
- An implementation of Receptionist Bot as a standalone server or docker containerrec_lambda_<function>
- An implementation of Receptionist Bot as 3 serverless cloud functions on AWS lambda: Slash Commands, Interactions API, and Events APIxtask
- xtask exposes a small Rust CLI for build scripts related to the project, similar to a makefile ornpm run
.terraform_aws
- Terraform code for deploying either as a standalone server or serverless functionsdocs
- A collection of guides on deployments, project architecture, and development- CONTRIBUTING.md
Event Origin | Status | Event Scope | Origin Type |
---|---|---|---|
Message sent to channel | Done ✅ | Local (channel) | Slack Message |
Receptionist App mentioned in channel | Planned | Local (channel) | Slack Message |
Custom slash command: /rec-cmd <my_command> |
Planned | Global | Slash Command |
Webhook sent to Receptionist Server | Not Planned | Global | Server Event |
Condition | Status | Eligible Origin Types |
---|---|---|
Matches a Regex | Done ✅ | Slack Message |
Matches a Phrase | Done ✅ | Slack Message |
Is From a specific User | Planned | Slack Message |
Action | Status | Eligible Origin Types |
---|---|---|
React with Emoji (can trigger Slack Workflows) | Done ✅ | Slack Message |
Send Message To Thread | Done ✅ | Slack Message |
Tag Pagerduty oncall for team in thread | Done ✅ | Slack Message |
Send Message To Channel | Done ✅ | Slack Message |
Forward message to a channel | Done ✅ | Slack Message |
Tag Pagerduty oncall for team in channel | Planned | Slack Message |
Send Message To User | Planned | Slack Message |
Tag User in thread | Planned | Slack Message |
Tag User in Channel | Planned | Slack Message |
Forward message to a user | Planned | Slack Message |
send webhook with custom payload | Planned | Slack Message |
- App will not scan bot messages, hidden messages, or threaded messages to help prevent infinite loops or negatively impacting the signal-to-noise ratio of the channel.
- listening for bot messages may be introduced in the future but only if the message condition is scoped to that single bot (user-specific message conditions have not been written yet, which blocks this bot message feature)
Intent: If listener channel is empty in the Management Modal, we return an errors object response to Slack to display an error and prevent the view closing.
Bug: The view stays open correctly, However the error does not display.
Situation Report: We are confident the http response is being sent correctly to Slack because if anything is incorrect, Slack will display a connection error in the modal. We encountered this previously when the content-type was incorrect or when the errors
object contained an invalid Block_ID. Since neither of those are happening now, I am inclined to believe this is either a bug or limitation on Slack's end with the Conversations Select Section Block
- Log into Block Kit Builder
- Select Modal Preview from the dropdown in the top left
- Copy a json template from ./crates/receptionist/tests/generated_blocks and paste it into the Block Kit json editor
- @abdolence for creating the excellent
slack-morphism
library.slack-morphism
strongly types nearly everything you need to work with Slack, including block kit models which are a huge pain point when doing highly reactive & dynamic UIs like the Receptionist Bot. This app would not have been possible without his work!- @abdolence also quickly responded to questions with thorough answers and helpful tips
- @davidpdrsn for the Axum web application framework.
- Axum is easy to use and is built with
hyper
&tokio
, but also uses theTower
ecosystem so that you can share middleware/services/utilities, between any other framework that useshyper
ortonic
. You can also often share code between server-side and client side implementations. - You can apply middlewares & Layers to only affect certain routes. In this App we use a Slack Verification Middleware from
slack-morphism
to protect our routes that expect to receive traffic from Slack, but not for other routes. - @davidpdrsn also quickly helped out when I struggled to integrate an authentication middleware.
- Axum is easy to use and is built with
- @yusuphisms for experimenting with the Pagerduty API to enable new bot features, helping incorporate Docker Compose & DynamoDB support, and setting up for integration tests.
- @ubaniabalogun for thoroughly designing an effective DynamoDB model to enable a wide range of queries with a single Table.
- @shadyproject for helping load test and brainstorming deployment & database strategies.
- Everyone who has worked on
strum
which powers up the already great Rust enums - @bryanburgers for his work on https://github.com/zenlist/serde_dynamo which makes it easier to use dynamoDB (and the alpha branch supports the brand new aws_rust_sdk!)
https://github.com/twilio-labs/.github/blob/master/CODE_OF_CONDUCT.md