This is a Slack chatbot that connects to your MicroStrategy server and answer questions related to one dataset.
You can ask for attributes, metrics and specific attribute elements from the dataset, by default the data is presented as text but you can also ask the bot for a graph. The bot responds to direct messages as well as channels in wich it is invited to and mentioned.
This code was written for a demo and it's not fully finished or tested. Missing functionality includes: automatically refresh data, graphing options and support for more than one dataset/project.
Project uses slackclient V1 and needs to be updated to work with V2
- To run the chatbot you need to have the following libraries:
- Create a Slack bot and get the Slack Token.
- Have MicroStrategy Library installed.
- In file dapi.py fill the variable SlackToken to the Token you got from Slack.
- In dapi.py Change the name of the bot in the bot_name to whatever you want it to recognize as a mention.
- Inside Util folder, file microstrategyfunctions.py fill the MicroStrategy variables, URL, user, password, project and report ID.
- Run dapi.py.
dapifilecleaning.py is provided to clean all the Bot generated graphs from your machine and from Slack workspace. Running the Script will delete all graphs from the bot conversations