Certibot is a Slack bot allowing you to manage voucher code delivery. It also includes an import script to initiate the database.
Trusted by our teams in Axel Springer, Certibot sends voucher codes to your teammates with zero friction. You can import your vouchers and users details into its database with dedicated scripts. Users will then have access to their personnal voucher codes at their fingertips.
To run the import module locally, you need to configure your AWSCLI. To do so, first install awscli
:
pip install awscli
Then configure your awscli
with your tokens:
aws configure
AWS Access Key ID [None]: <YOUR_AWS_ACCESS_KEY>
AWS Secret Access Key [None]: <YOUR_AWS_SECRET_ACCESS_KEY>
Default region name [None]: <YOUR_AWS_DEFAULT_REGION>
Default output format [None]: json
All python modules required are listed in requirements.txt file.
The bot works with slash commands:
/getvoucher
: allows a slack member to get his/her personnal voucher code. If a voucher code has already been sent to him/her, the command sends the same voucher again.
To store sensitive data, we use AWS Secret manager. You will need to create a secret with the following structure:
{
"slack_event_token": <TOKEN_SEND_BY_SLACK_ON_BOT_EVENTS>,
"admin_users": [
<LIST_OF_ADMIN_SLACK_UDIDS>
]
}
Then specify in the config.yml file the secret name et the region you use.
You can disable interaction with the bot, for testing purposes, to all users except admins. In order to do so, change the limited_mode
value to True
in your config.yml file.
Once limited_mode
has been enabled, only admins will be allowed to use slash commands. Admins can be listed in the AWS Secret manager (also check Sensitive datas)
Because you may have hundreds or thousands of users and personal voucher codes, we thought it might be helpful to enable developers to easily import csv files into the dynamoDB database that's behind all the magic of Certibot.
Simply upload your csv files into 'csv/to_transform/' and run python python import_csv.py
in your favorite IDE.
You've got emails for your users and have no idea how to get their Slack UDID ? We've thought about it too and created a batch that transforms emails into UDIDs.
Simply upload your csv file into 'csv/to_transform/' and run python transform_csv.py
in your favorite IDE
Please feel free to contact us for details on our code of conduct, and the process for submitting pull requests to us.
- Bruno MARQUET - initial work
- Romain BODY - initial work
See also the list of contributors who participated in this project.