Bot for Slack written in PHP that executes SQL queries and sends results back to a user in a thread.
Example message to run SQL query
@MySqlBot SELECT * FROM users LIMIT 1
- Execute SQL queries and get results back
- Changing format of the result message (csv_message, csv_file or sql_file)
- Set max requests per minute for each user
- Use Block-Kit interactive components
- Ability to set timeout for query
- Ability to drop running query
- Multiple SQL queries in one message
- Wait for approve from another person before executing SQL query
- Create app on https://api.slack.com/apps
- Add app credentials to environment variables
- Enable Events
- Set webhook url to endpoint
/api/v1/slack/events
- Subscribe to
app_mention
event
To run this project, you will need to add the environment variables to your .env file from .env.example
To run this project, you will need to add the environment variables to your .env file from .env.example
composer install
cd public & php -S 127.0.0.1:8000
php worker.php