Trello Card Automation
import { TrelloTab, TrelloCodeContent } from '../../../components/TrelloCodeFetcher'
Let's build a Trello automation system that:
- Automatically progresses cards across board lists
- Validates card completeness
- Generates AI-powered summaries for code review
- Integrates with Slack for notifications
- Monitors due dates and sends overdue alerts
Board Structure
The Trello board is organized into four main lists:
- New Cards: Entry point for all new cards
- In Progress: Active development stage
- Needs Review: Code review stage with AI summaries
- Completed: Successfully reviewed and approved cards
The Steps
<Tabs items={['webhook', 'validation', 'requirements', 'assigned', 'review', 'completion', 'overdue', 'slack']}>
Visual Overview
Here's how the automation flow works:

- Card Validation → Checks for required information
- Progress Tracking → Moves cards between lists
- Review Process → Generates AI summaries and notifies reviewers
- Completion Handling → Processes approved cards
Try It Out
Prerequisites
Make sure you have:
- Trello account with API access
- Node.js installed
- Slack workspace (for notifications)
- OpenAI API key (for AI summaries)
Clone the Repository
git clone git@github.com:MotiaDev/motia-examples.git
cd examples/trello-flow
Install Dependencies
pnpm install
Configure Environment Variables
Create a .env file by copying the example:
cp .env.example .env
Update your .env with the following credentials:
TRELLO_API_KEY=your_trello_api_key
TRELLO_TOKEN=your_trello_token
OPENAI_API_KEY=your_openai_api_key
OPENAI_MODEL=your_openai_model
SLACK_WEBHOOK_URL=your_slack_webhook_url
TRELLO_NEW_TASKS_LIST_ID=your_new_tasks_list_id
TRELLO_IN_PROGRESS_LIST_ID=your_in_progress_list_id
TRELLO_NEEDS_REVIEW_LIST_ID=your_needs_review_list_id
TRELLO_COMPLETED_LIST_ID=your_completed_list_id
Set Up Trello Board
-
Create a new Trello board with these lists:
- New Tasks
- In Progress
- Needs Review
- Completed
-
Add a custom field:
- Status (dropdown: Todo, In Progress, Done)
Run the Application
pnpm dev
Test the Flow
- Create a new card in the "New Tasks" list
- Assign a member to see it move to "In Progress"
- Add an "approved" comment to see it move to "Completed"
- Check Slack for notifications