trello-api
Kanban board automation with Trello API including boards, lists, cards, members, webhooks, power-ups, and Python SDK (py-trello) integration
What this skill does
# Trello API Integration Skill
Master the Trello API for Kanban board automation, including boards, lists, cards, members, webhooks, and the py-trello Python SDK. Build powerful workflow automations and custom integrations with Trello's comprehensive REST API.
## When to Use This Skill
### USE Trello API when:
- **Automating board management** - Create, update, archive boards programmatically
- **Building workflow integrations** - Connect Trello with other tools
- **Card automation** - Auto-create cards from external events
- **Progress tracking** - Build dashboards from Trello data
- **Notification systems** - React to board changes via webhooks
- **Bulk operations** - Move/update many cards at once
- **Custom reporting** - Extract data for analysis
- **Power-up development** - Extend Trello functionality
### DON'T USE Trello API when:
- **Need complex dependencies** - Use Jira or Asana
- **Require time tracking** - Built-in feature limited, use Toggl integration
- **Database-style queries** - Use Notion API instead
- **Enterprise compliance** - May need Enterprise-grade solutions
- **Complex workflows** - Consider Monday.com or Linear
## Prerequisites
### API Authentication
```bash
# Get API Key from:
# https://trello.com/app-key
# Get Token (authorize your app):
# https://trello.com/1/authorize?expiration=never&scope=read,write,account&response_type=token&name=MyApp&key=YOUR_API_KEY
# Set environment variables
export TRELLO_API_KEY="your-api-key"
export TRELLO_TOKEN="your-token"
# Verify authentication
curl -s "https://api.trello.com/1/members/me?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.fullName'
```
### Python SDK Installation
```bash
# Install py-trello
pip install py-trello
# Using uv (recommended)
uv pip install py-trello
# With additional dependencies
pip install py-trello requests python-dateutil
# Verify installation
python -c "from trello import TrelloClient; print('py-trello installed!')"
```
### Verify Setup
```python
from trello import TrelloClient
import os
client = TrelloClient(
api_key=os.environ["TRELLO_API_KEY"],
token=os.environ["TRELLO_TOKEN"]
)
# Test connection
me = client.get_member("me")
print(f"Connected as: {me.full_name}")
print(f"Username: {me.username}")
```
## Core Capabilities
### 1. Board Management
**REST API - Boards:**
```bash
# List all boards
curl -s "https://api.trello.com/1/members/me/boards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq '.[].name'
# Get specific board
curl -s "https://api.trello.com/1/boards/BOARD_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Get board with lists and cards
curl -s "https://api.trello.com/1/boards/BOARD_ID?lists=all&cards=all&key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Create board
curl -s -X POST "https://api.trello.com/1/boards" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Project Alpha" \
-d "desc=Main project board" \
-d "defaultLists=false" \
-d "prefs_permissionLevel=private" | jq
# Create board from template
curl -s -X POST "https://api.trello.com/1/boards" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=New Project" \
-d "idBoardSource=TEMPLATE_BOARD_ID" | jq
# Update board
curl -s -X PUT "https://api.trello.com/1/boards/BOARD_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Project Alpha - Updated" \
-d "desc=Updated description" | jq
# Close (archive) board
curl -s -X PUT "https://api.trello.com/1/boards/BOARD_ID/closed" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "value=true" | jq
# Delete board permanently
curl -s -X DELETE "https://api.trello.com/1/boards/BOARD_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN"
```
**Python SDK - Boards:**
```python
from trello import TrelloClient
import os
client = TrelloClient(
api_key=os.environ["TRELLO_API_KEY"],
token=os.environ["TRELLO_TOKEN"]
)
# List all boards
boards = client.list_boards()
for board in boards:
print(f"{board.name} (ID: {board.id})")
# Get specific board
board = client.get_board("BOARD_ID")
print(f"Board: {board.name}")
print(f"URL: {board.url}")
# Create new board
new_board = client.add_board(
board_name="Development Sprint",
source_board=None, # Or source board for template
permission_level="private" # "private", "org", "public"
)
print(f"Created board: {new_board.id}")
# Get board lists
lists = board.list_lists()
for lst in lists:
print(f" List: {lst.name}")
# Get all cards on board
cards = board.get_cards()
for card in cards:
print(f" Card: {card.name}")
# Get board members
members = board.get_members()
for member in members:
print(f" Member: {member.full_name}")
# Close board
board.close()
# Reopen board
board.open()
```
### 2. List Management
**REST API - Lists:**
```bash
# Get lists for board
curl -s "https://api.trello.com/1/boards/BOARD_ID/lists?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Create list
curl -s -X POST "https://api.trello.com/1/lists" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=In Progress" \
-d "idBoard=BOARD_ID" \
-d "pos=bottom" | jq
# Update list name
curl -s -X PUT "https://api.trello.com/1/lists/LIST_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Currently Working" | jq
# Move list to different position
curl -s -X PUT "https://api.trello.com/1/lists/LIST_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "pos=top" | jq
# Archive list
curl -s -X PUT "https://api.trello.com/1/lists/LIST_ID/closed" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "value=true" | jq
# Move all cards in list to another list
curl -s -X POST "https://api.trello.com/1/lists/LIST_ID/moveAllCards" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "idBoard=BOARD_ID" \
-d "idList=TARGET_LIST_ID" | jq
# Archive all cards in list
curl -s -X POST "https://api.trello.com/1/lists/LIST_ID/archiveAllCards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN"
```
**Python SDK - Lists:**
```python
from trello import TrelloClient
import os
client = TrelloClient(
api_key=os.environ["TRELLO_API_KEY"],
token=os.environ["TRELLO_TOKEN"]
)
board = client.get_board("BOARD_ID")
# Get all lists
lists = board.list_lists()
for lst in lists:
print(f"List: {lst.name} (ID: {lst.id})")
# Create new list
new_list = board.add_list(
name="Backlog",
pos="bottom" # "top", "bottom", or position number
)
print(f"Created list: {new_list.id}")
# Get specific list
target_list = board.get_list("LIST_ID")
# Get cards in list
cards = target_list.list_cards()
for card in cards:
print(f" Card: {card.name}")
# Rename list
target_list.set_name("New Backlog")
# Change list position
target_list.set_pos("top")
# Archive list
target_list.close()
# Move all cards from one list to another
source_list = board.get_list("SOURCE_LIST_ID")
dest_list = board.get_list("DEST_LIST_ID")
for card in source_list.list_cards():
card.change_list(dest_list.id)
```
### 3. Card Management
**REST API - Cards:**
```bash
# Get cards for list
curl -s "https://api.trello.com/1/lists/LIST_ID/cards?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Get single card
curl -s "https://api.trello.com/1/cards/CARD_ID?key=$TRELLO_API_KEY&token=$TRELLO_TOKEN" | jq
# Create card with all options
curl -s -X POST "https://api.trello.com/1/cards" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "idList=LIST_ID" \
-d "name=Implement feature X" \
-d "desc=Detailed description of the feature" \
-d "pos=top" \
-d "due=2025-01-30T12:00:00.000Z" \
-d "dueComplete=false" \
-d "idMembers=MEMBER_ID1,MEMBER_ID2" \
-d "idLabels=LABEL_ID1,LABEL_ID2" | jq
# Update card
curl -s -X PUT "https://api.trello.com/1/cards/CARD_ID" \
-d "key=$TRELLO_API_KEY" \
-d "token=$TRELLO_TOKEN" \
-d "name=Updated card name" \
-d "desc=UpRelated in productivity
decision-board
IncludedRender an interactive HTML board for the user to pick among multiple comparable options side-by-side at once — engineering trade-offs, copy audits, action-item triage, architecture decisions, policy calls. Returns the picks (and optional hold/note flags) as a JSON file the agent can apply.
notion-api
IncludedNotion API for workspace automation including databases, pages, blocks, query/filter syntax, and integration patterns
obsidian
IncludedLocal-first knowledge management with markdown vaults, bidirectional linking, plugin ecosystem, and flexible sync strategies
time-tracking
IncludedTime tracking integration patterns with RescueTime and Toggl APIs for automated time entry, reporting, analytics, and project/task attribution
todoist-api
IncludedTask management API integration for Todoist with projects, tasks, labels, filters, webhooks, and Python SDK usage
docs
IncludedCode documentation agent — write/update docs with /docs write, check status with /docs check. Minimal code blocks, reference pointer based.