A Laravel-based Slack bot that helps executives assign, track, and follow up on tasks with automated reminders and comprehensive task management features.
- Slash Command: Use
/follow-upto create new tasks - Message Shortcuts: Create tasks directly from Slack messages using the "Create Follow-up Task" shortcut
- Rich Task Details: Set title, description, assignee, due date, priority, and follow-up frequency
- Custom Messages: Add custom messages with @mentions for due date notifications
- Thread Support: Tasks created from messages post updates in the original thread
- Smart Reminders: Automatic follow-up messages based on configurable intervals (1, 2, 3, or 7 days)
- Interactive Buttons: Assignees can respond with β
Completed, π Still Working,
β οΈ Need Help, or π Request Extension - Executive Notifications: Real-time updates to task assigners about progress, completion, or help requests
- Extension Requests: Employees can request deadline extensions with reasons
- Executive Approval: Automated approval workflow with approve/deny buttons
- Extension History: Track multiple extension requests per task
- Dashboard Command: Use
/task-statusto view all active assigned tasks - Overdue Alerts: Automatic notifications for overdue tasks
- Priority Levels: High (π΄), Medium (π‘), Low (π’) priority indicators
- Backend: Laravel 11+ (PHP 8.3+)
- Database: PostgreSQL 16+ (MySQL also supported)
- Containerization: Docker with Docker Compose
- Database Management: Adminer (web-based database management)
- Web Server: Nginx (in Docker)
- Process Manager: Supervisor (for background tasks)
- Slack Integration: JoliCode Slack PHP API
- Queue System: Laravel Queues for scheduled tasks
- Security: Slack request signature verification
- Docker and Docker Compose
- Slack App with appropriate permissions
- PHP 8.3 or higher
- Laravel 11+
- PostgreSQL 16+ (or MySQL 8.0+)
- Composer
- Slack App with appropriate permissions
git clone <repository-url> cd slack-followup-bot cp .env.example .envThe .env.example file comes pre-configured for Docker. Key variables:
# Application APP_NAME="Slack Follow-up Bot" APP_ENV=local APP_DEBUG=true # Ports WEBSERVER_PORT=8081 # Laravel app will be available at http://localhost:8081 ADMINER_PORT=8083 # Adminer will be available at http://localhost:8083 # Database (PostgreSQL) DB_CONNECTION=pgsql POSTGRES_DB=follow_up POSTGRES_USER=root POSTGRES_PASSWORD=password DB_PORT=5432 # Slack Configuration (add your actual values) SLACK_BOT_TOKEN=xoxb-your-bot-token-here SLACK_SIGNING_SECRET=your-signing-secret-here SLACK_CLIENT_ID=your-client-id-here SLACK_CLIENT_SECRET=your-client-secret-here# Build and start all services in development mode docker-compose up --build # Or run in detached mode (background) docker-compose up -d --buildThis will start:
- Laravel App: Available at
http://localhost:8081 - PostgreSQL Database: Running on port 5432
- Adminer: Database management interface at
http://localhost:8083
Once the containers are running, set up the database:
# Generate application key (if not done already) docker-compose exec app php artisan key:generate # Run database migrations docker-compose exec app php artisan migrate # Optional: Seed the database docker-compose exec app php artisan db:seed- URL: http://localhost:8081
- Health Check: http://localhost:8081/api/slack/health
- URL: http://localhost:8083
- System: PostgreSQL
- Server: postgres
- Username: root (or value from
POSTGRES_USER) - Password: password (or value from
POSTGRES_PASSWORD) - Database: follow_up (or value from
POSTGRES_DB)
# View logs docker-compose logs -f app docker-compose logs -f postgres # Access Laravel container shell docker-compose exec app bash # Run Laravel commands docker-compose exec app php artisan migrate docker-compose exec app php artisan tinker docker-compose exec app php artisan schedule:work # Restart services docker-compose restart # Stop all services docker-compose down # Remove all containers and volumes (clean slate) docker-compose down -vTo expose your Dockerized application for Slack webhook testing:
# Make sure your Docker containers are running docker-compose up -d # Start cloudflared tunnel cloudflared tunnel --url http://localhost:8081For production deployment, use the production target:
# Set production environment export BUILD_TARGET=production export APP_ENV=production # Build and deploy docker-compose up --build -dgit clone <repository-url> cd slack-followup-bot composer install cp .env.example .env php artisan key:generate# Configure your .env file DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=slack_followup_bot DB_USERNAME=your_username DB_PASSWORD=your_password # Run migrations php artisan migratecomposer require jolicode/slack-php-apiCreate a Slack App at https://api.slack.com/apps with these configurations:
channels:read chat:write commands groups:read im:read mpim:read users:read /follow-up- Description: "Create a new task follow-up"/task-status- Description: "View your active assigned tasks"
app_mention- When the bot is mentioned
- Enable Interactive Components for button interactions and modals
- Callback ID:
create_followup_from_message - Name: "Create Follow-up Task"
- Description: "Create a follow-up task from this message"
Add to your .env file:
# Slack Configuration SLACK_BOT_TOKEN=xoxb-your-bot-token SLACK_SIGNING_SECRET=your-signing-secret SLACK_VERIFY_REQUESTS=trueIn config/services.php:
'follow-up-slack' => [ 'bot_token' => env('SLACK_BOT_TOKEN'), 'signing_secret' => env('SLACK_SIGNING_SECRET'), 'verify_requests' => env('SLACK_VERIFY_REQUESTS', true), ],Add to your server's crontab:
* * * * * cd /path-to-your-project && php artisan schedule:run >> /dev/null 2>&1Or run the scheduler manually for development:
php artisan schedule:work- Type
/follow-upin any Slack channel - Fill out the modal with task details:
- Assignee: Select team member
- Task Title: Brief task description
- Task Description: Detailed requirements
- Due Date: Task deadline
- Follow-up Frequency: How often to send reminders
- Priority: High, Medium, or Low
- Custom Message: Optional message with @mentions for due date
- Hover over any message
- Click the "More actions" (β―) menu
- Select "Create Follow-up Task"
- Fill out the modal (task will be linked to original message)
- Receive automated follow-up messages with interactive buttons
- Click β Completed when task is done
- Click π Still Working to reschedule follow-up
- Click
β οΈ Need Help to request assistance - Click π Request Extension to extend deadline
- Receive real-time notifications about task progress
- Approve or deny extension requests
- Use
/task-statusto view dashboard of all assigned tasks - Get alerts about overdue tasks
app/ βββ Console/Commands/ β βββ ProcessTaskFollowupsCommand.php # Automated task processing βββ Enums/ # Slack interaction enums β βββ SlackActionIdEnum.php β βββ SlackBlockIdEnum.php β βββ SlackCallbackIdEnum.php β βββ TaskStatusEnum.php β βββ TaskPriorityEnum.php β βββ ExtensionStatusEnum.php βββ Http/ β βββ Controllers/Api/V1/ β β βββ SlackController.php # Main Slack interaction handler β βββ Middleware/ β βββ VerifySlackRequestMiddleware.php # Security middleware βββ Models/ β βββ TaskFollowup.php # Main task model β βββ TaskExtensionRequest.php # Extension request model βββ Services/ βββ SlackService.php # Slack API integration service - Task details and metadata
- Slack user and channel information
- Follow-up scheduling
- Custom messages and mentions
- Thread management
- Extension request details
- Approval workflow tracking
- Decision history
Configure available intervals in SlackService::getEnhancedModalBlocks():
- Every 3 days
- Weekly (7 days)
- High (π΄)
- Medium (π‘) - Default
- Low (π’)
- Pending
- In Progress
- Completed
- Need Help
- Extension Requested
- Cancelled
- Request Verification: All Slack requests are verified using signing secrets
- Middleware Protection: Custom middleware validates all incoming requests
- Environment-based: Verification can be disabled in local development
The bot logs all activities for debugging and monitoring:
- Task creation and updates
- Slack API interactions
- Extension requests and approvals
- Follow-up message delivery
- Error handling and exceptions
- Modals not opening: Check trigger_id validity and bot permissions
- Messages not sending: Verify bot token and channel permissions
- Signature verification failing: Ensure signing secret is correct
- Scheduled tasks not running: Verify cron job setup and Laravel scheduler
For local development, disable request verification:
SLACK_VERIFY_REQUESTS=falseThe application is designed to run with Docker and includes PostgreSQL and Adminer:
# Start all services docker-compose up -d --build # The application will be available at: # - Laravel App: http://localhost:8081 # - Adminer (Database UI): http://localhost:8083If you prefer to run without Docker:
# Start the Laravel development server php artisan serve --host=0.0.0.0 --port=8081For testing Slack integrations during development, you can use Cloudflared tunnel to expose your local server:
# For Docker setup docker-compose up -d cloudflared tunnel --url http://localhost:8081 # For manual setup php artisan serve --host=0.0.0.0 --port=8081 cloudflared tunnel --url http://localhost:8081This will provide a public HTTPS URL that you can use in your Slack app configuration for:
- Request URL for slash commands
- Event Request URL for event subscriptions
- Interactivity Request URL for interactive components
Note: Make sure your application is running on port 8081 before starting the tunnel.
GET /api/slack/health # Health check POST /api/v1/slack/events # Slack events webhook POST /api/v1/slack/commands/follow-up # Follow-up slash command POST /api/v1/slack/commands/task-status # Task status slash command POST /api/v1/slack/interactive # Interactive components (buttons, modals) 