A Python app to serve Conveyor room requests and run approvals through Slack

Overview

CONVEYOR FOR SLACK

This is a friendly little Python app that will allow you to integrate your instance of Conveyor with your Slack workspace.

In order to make use of this, you will need an account with both Conveyor and Slack. Conveyor does not have a dev portal, but for Slack you will need to use their developer portal/API interface.

I built this using Bolt for Python, so most of the Slack interactions are handled by built in shortcuts. I used Flask as my server to handle the requests, as Bolt's built in server is really just meant for local testing and basic http. Other than that, the libraries involved are fairly simple and straightforward--requests, json, logging, etc. You can load those into your virtualenv from the requirements.txt in this repo.

This can do some basic but enjoyable things for you--

The main purpose of this tool is simply to push new room access requests into Slack, and allow people who are authorized Conveyor users to approve or reject those requests. This includes sourcing any special optional permissions group that you have, so different customers can be granted different permissions.

POV, u r using conveyor-for-slack and it is rad: image This is an example of what a room requests looks like when shared to Slack. It includes the email address of the person requesting, the timestamp, and whatever message they included with their request. The text at the top is a link to that specific request in Conveyor. Below, the privileges are pulled directly from the Conveyor API so that as our privileges change, so does the menu.

If you choose to accept the request, it is logged and the request goes through to the Conveyor API to be processed and the customer is granted access.

image If you choose to hit reject, a modal will pop up requesting a note about why. We chose to implement this so that anyone can answer questions about why a request was rejected without having to track down the original responder. This is not optional and must be filled out for the response to go through. This can easily be removed by pulling out the modal step in the @app.action("reject") section.

image Once the request has been processed and a 200 has been received from Conveyor, the original message in Slack is updated to reflect that the request was either approved or rejected, who did it, and when. Where applicable, the note is included. This is intended for transparency and self-service so that sales reps can search the Conveyor request channel and see whether or not their customer has had their request taken care of and what the response was.

To get this up and running,

you will need to:

  • get your Conveyor API key from your integrations menu
  • create a Slack app to install this to on your workspace in your Slack API apge
  • get your Slack signing secret and bot token from the API page
  • get your channel ID for where you want your app to post
  • set up a server either locally or in your infra
  • assign that URL to your Slack app in the interactions page
  • update the .env file with your assorted secrets

From there, you can pretty much start the up and be good to go. For my deployment at my company, mine is in a Docker container on Nomad, with Consul and some other fun frippery providing commuication with the outside world. So everything is orchestrated and all needed aspects are launched in the Dockerfile.

If you're running a local server, such as nginx, you'll need to start your nginx server on the correct port that you gave your Bolt/Flask app, and then run python3 app.py to launch the app.

I recommend going through and looking at some of the error messages. I had them custom tailored to me and my team, so when I changed them for mass consumption, they got a little sterile. Also, see if you want nearly as verbose of logging as I like to have.

Please fork the hell out of this, but...

Also please be aware that I will probably not ever look at any submitted PRs to this repo. I wrote this for my company to make my colleagues' lives easier, and also because I thought it was fun. I'll be maintaining it, and likely adding more features, within my professional GitHub organization, but updates will be ported over here only infrequently. This isn't to be an ass, just honesty. I'm not gonna think about it, and I don't want to leave you hanging. However, the great folks at Conveyor didn't have an API when I first wanted to do this, and they were amazing about being willing to spin something up to see what could happen. I would really love to see more companies and devs using their API. Their team was so great to work with, and I hope you will enjoy working with this too!

You might also like...
Full-featured Python interface for the Slack API

This repository is archived and will not receive any updates It's time to say goodbye. I'm archiving Slacker. It's been getting harder to find time to

A Flask inspired, decorator based API wrapper for Python-Slack.

A Flask inspired, decorator based API wrapper for Python-Slack. About Tangerine is a lightweight Slackbot framework that abstracts away all the boiler

Slack Developer Kit for Python

Python Slack SDK The Slack platform offers several APIs to build apps. Each Slack API delivers part of the capabilities from the platform, so that you

As Slack no longer provides an API to invite people, this is a Selenium Python script to do so

As Slack no longer provides an API to invite people, this is a Selenium Python script to do so

A python library for creating Slack slash commands using AWS Lambda Functions

slashbot Slashbot makes it easy to create slash commands using AWS Lambda functions. These can be handy for creating a secure way to execute automated

A simple python bot that serves to send some notifications about GitHub events to Slack.
A simple python bot that serves to send some notifications about GitHub events to Slack.

github alerts slack bot 🤖 What is it? 🔍 This is a simple bot that serves to send some notifications about GitHub events to Slack channels. These are

A simple script & container to pull COVID data from covidlive.com.au and post a summary to a slack channel
A simple script & container to pull COVID data from covidlive.com.au and post a summary to a slack channel

CovidLive AU Summary Slackbot This bot is a very simple slackbot that pulls data, summarises and posts up to date AU COVID stats to a provided slack c

Takes upcoming items from a Google Calendar and posts them to Slack.
Takes upcoming items from a Google Calendar and posts them to Slack.

Google Calendar to Slack by Jason Snell - [email protected] This Python script scrapes upcoming items from Google Calendar HTML and posts them to S

Comments
Owner
Vivienne
Security, Python, Node, all things back end. Hackbright Academy part-time SWE student, vulnerability management engineer full-time.
Vivienne
WILSON Cloud Respwnder is a Web Interaction Logger Sending Out Notifications with the ability to serve custom content in order to appropriately respond to client-issued requests.

WILSON Cloud Respwnder What is this? WILSON Cloud Respwnder is a Web Interaction Logger Sending Out Notifications (WILSON) with the ability to serve c

null 48 Oct 31, 2022
Python app to notify via slack channel the status_code change from an URL

Python app to notify, via slack channel you choose to be notified, for the status_code change from the URL list you setup to be checked every yy seconds

Pedro Nunes 1 Oct 25, 2021
Python Wrapper for handling payment requests through the Daraja MPESA API

Python Daraja Description Python Wrapper for handling payment requests through the Daraja MPESA API Contribution Refer to the CONTRIBUTING GUIDE. Usag

William Otieno 18 Dec 14, 2022
BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

BiliBili-live-barrage-transceiver - A simple python program for sending and receiving barrage in bilibili live room

zeroy 2 Jan 18, 2022
LoL API is a Python application made to serve League of Legends data.

LoL API is a Python application made to serve League of Legends data.

Caique Cunha Pereira 1 Nov 6, 2021
Interact and easily use Google Chat room webhooks.

Chat Webhooks Easily interact and send messages with Google Chat's webhooks feature. This API is small, but should be a nice framework for working wit

BD103 2 Dec 13, 2021
Diablo II Resurrected Diablo Clone Running Room Mgr

d2rdc Diablo II Resurrected Diablo Clone Running Room Mgr Install Dependencies pip install fastapi pip install uvicorn Running uvicorn init:app INFO:

null 1 Dec 3, 2021
💻 Discord-Auto-Translate-Bot - If you type in the chat room, it automatically translates.

?? Discord-Auto-Translate-Bot - If you type in the chat room, it automatically translates.

LeeSooHyung 2 Jan 20, 2022
Automation application was made by me using Google, Sheet and Slack APIs with Python.

README This application is used to transfer the data in the xlsx document we have to the Google Drive environment and calculate the "total budget" wit

null 3 Apr 12, 2022
A quick and dirty script to scan the network, find default credentials on services and post a message to a Slack channel with the results.

A quick and dirty script to scan the network, find default credentials on services and post a message to a Slack channel with the results.

Security Weekly 11 Jun 3, 2022