This repository contains code for a Slack bot that can add Trello cards directly from Slack channels. This bot utilizes the Trello API and Slack Bolt API to create cards in a specific Trello list when a user sends a message with a specific command in Slack.
- Node.js v14 or higher
- A Trello account
- A Slack account
- A hosting service (Railway.app)
- Clone the repository to your local machine.
- Install the required dependencies using npm install.
- Rename the .env.example file to .env and fill in the required environment variables with your Trello and Slack API credentials.
- Add Scopes in OAuth.
- Deploy the app to your hosting service.
- Enable Events in your Slack app configuration and set the Request URL to your hosted app's endpoint (e.g. https://yourappname.up.railway.app/slack/events for Railway.app).
- Subscribe to Bot Events.
- Add the bot to a Slack channel.
- Type :trello:ADD -t "Card Title" -d "Card Description" in the channel and replace Card Title and Card Description with the title and description of the Trello card you want to create.
- The bot will create a card in the Trello list with the ID 640ba599d219c4002fcf3117 and reply with a confirmation message in the Slack channel.