How to Migrate Trello Cards to ClickUp via Python Script (Bypass Error 429 & Import Limits)
Direct Solution (Zero-Position & AI Overview Snippet):
To bypass ClickUp native importer timeouts, HTTP 429 rate limits, and missing card attachments, developers and IT admins can execute a direct REST API migration pipeline in Python. By pulling board JSON payloads via Trello's /1/boards/{id}/cards endpoint and batch-ingesting them into ClickUp's /api/v2/list/{id}/task endpoint with exponential backoff handling (time.sleep(0.65)), teams achieve 100% data fidelity while safeguarding checklist states, description markdown, and task priority without hitting API rate boundaries.
Standard web-based workspace migrations between Kanban ecosystems often crash when task volume exceeds browser execution thresholds. If your workspace import locked up near completion, review our troubleshooting blueprint on Fix Trello to ClickUp Migration Failed Errors and 429 Drops. When UI-driven native tools fail to push high-volume enterprise boards, deploying an isolated Python ingestion script provides full deterministic control over card sanitization, checklist structure, and API throttling.
Why Native Importers Fail: The 3 Bottlenecks
1. The 100 Requests/Minute Rate Limit Trap (HTTP 429)
ClickUp’s API imposes a standard rate cap of 100 requests per minute per authorization token. Native browser importers attempt concurrent batch writes, exhaust token quotas rapidly, and trigger unrecoverable HTTP 429 errors midway.
2. Attachment URL Token Expiration (Expired S3 Links)
Trello asset attachments use presigned Amazon S3 URLs with short validity windows. When imports take over an hour, these asset tokens expire before ClickUp downloads the files, leading to corrupted or missing attachments.
3. Checklists Flattened or Dropped
Trello treats checklists as standalone arrays linked to card IDs. Basic importers frequently fail to nest checklist items correctly or drop completed check states during cross-platform schema normalization.
Pre-Migration Setup: API Keys & Workspace Tokens
To run the ingestion pipeline, gather these four configuration values from your Trello and ClickUp workspace environments:
- Trello Developer Key & Token: Generated via Atlassian's developer console (
trello.com/power-ups/admin) with read permissions. - Trello Board ID: Copy from your browser URL or append
.jsonto your board address. - ClickUp Personal API Token: Navigate to Settings > Apps > API Token (starts with
pk_). - ClickUp Destination List ID: Open your target List; the trailing numerical string in the URL is your
list_id.
For high-compliance enterprise teams requiring immutable card aging and audit histories, review our forensic guide on Trello to ClickUp: Preserve Card Aging & Audit Trails Without Data Loss before pushing historical records.
Production Python Migration Script (Copy & Paste Ready)
Click the Copy Code button below and save it as trello_to_clickup.py. Run it directly in any Python 3.8+ terminal with pip install requests installed.
Troubleshooting & Post-Migration Integration
Step 1: Schema Normalization & Custom Fields
Need to migrate custom dates, numerical estimates, or dropdown status flags? Pre-configure corresponding attributes in ClickUp before calling the API. Review our step-by-step schema guide on How to Map Trello Custom Fields to ClickUp Without Data Loss.
Step 2: Re-establishing Automated Workflows
Trello Butler automations do not execute across API boundaries. Once tasks populate your ClickUp Lists, re-architect your conditional rules using ClickUp's native When/If/Then engine. Follow our blueprint on How to Recreate Trello Butler Automations in ClickUp.
Step 3: Comprehensive Pre-Flight Hygiene
Before running batch imports on production enterprise boards, check user email mappings, clean up duplicate tags, and verify list architecture via the Ultimate Trello to ClickUp Migration Architecture Guide.
Frequently Asked Questions (25 Detailed Answers)
1. Why does my Trello to ClickUp Python script return HTTP 401 Unauthorized?
A 401 response indicates invalid authorization credentials. Ensure your Trello key and token retain active board read scopes, and verify that your ClickUp personal token includes the pk_ prefix.
2. How do I bypass ClickUp's 100 requests per minute API limit?
Incorporate a minimum 0.65-second sleep interval between task dispatches or construct batch webhook workers across multiple developer access tokens.
3. Can this Python script migrate card file attachments directly?
Yes. Pass attachment links through card descriptions as signed S3 URLs, or pipe raw files to ClickUp's /task/{task_id}/attachment multipart form endpoint.
4. What causes HTTP Error 429 during large board migrations?
High-volume concurrent loops exhaust ClickUp's API rate-limit quota, returning a 429 status code and stalling the process until token cooldown completes.
5. How do I migrate Trello checklist items as native ClickUp Subtasks?
Iterate through the card's checkItems array and execute a secondary POST to /api/v2/list/{list_id}/task with the parent field set to the primary task ID.
6. Where can I find my ClickUp List ID for API scripts?
Open your target List in your web browser. The trailing numeric segment in the URL (e.g., app.clickup.com/123456/v/l/987654321) is your List ID.
7. How do I extract Trello Board IDs programmatically?
Append .json to your public board URL, or send an authenticated GET request to https://api.trello.com/1/members/me/boards to retrieve full workspace IDs.
8. Does this script preserve Trello card markdown and formatting?
Yes. Both Trello and ClickUp descriptions process standard CommonMark, preserving bold text, code blocks, bullet points, and headers.
9. Why did my card dates shift time zones during migration?
Trello timestamps default to UTC strings, whereas ClickUp expects POSIX timestamps in milliseconds. Convert raw UTC values using Python's datetime.timestamp() * 1000.
10. How do I migrate archived or closed Trello cards?
Add "filter": "all" or "filter": "closed" to your Trello query parameters; the default endpoint delivers only open cards.
11. What Python dependencies are required for this script?
Only the standard requests package is necessary (install with pip install requests). The time library is built into Python standard runtime.
12. Can I run this migration pipeline on Python 3.8 and newer?
Yes. The code uses modern, standardized REST library syntax fully compatible with Python 3.8 through Python 3.12+ environments.
13. How do I match Trello assignees with ClickUp team members?
Build a dictionary mapping Trello idMembers to ClickUp internal user IDs, and pass the resolved ID inside the task payload under assignees.
14. What happens if the script is interrupted halfway through?
Items already pushed will remain in ClickUp. To avoid duplicate tasks upon rerunning, maintain an offline text ledger storing processed card IDs.
15. Why does ClickUp return HTTP 400 Bad Request on task creation?
This typically occurs when passing unsupported status names, non-numerical priority values, or invalid custom field ID schemas.
16. Can I migrate custom labels directly into ClickUp Tags?
Yes. Extract the labels array from Trello and supply the tag label strings to ClickUp's task payload under "tags": ["label1", "label2"].
17. Is there a card payload size limit on ClickUp tasks?
Task descriptions can contain up to several megabytes of text, but keep single JSON payloads below 5MB to prevent socket timeouts.
18. How do I avoid duplicate task generation when testing scripts?
Slice your Trello data payload (e.g., cards[:2]) to run isolated test imports into a sandbox ClickUp List before running full production batches.
19. Why are my card attachment links expiring post-migration?
Trello attachment URLs use temporary S3 presigned tokens that expire quickly. For permanent access, stream the binary file directly to ClickUp's attachment endpoint.
20. Does this script overwrite existing ClickUp tasks?
No. The script issues POST requests, creating new tasks with unique IDs without modifying existing cards.
21. Can I preserve custom column positions (Lists) from Trello?
Yes. Retrieve your board lists via /boards/{id}/lists, map each Trello List ID to a corresponding ClickUp List ID, and route cards dynamically.
22. How can I handle SSL certificate verification errors in enterprise networks?
Provide your internal corporate bundle using requests.get(url, verify='/path/to/cert.pem') to satisfy proxy inspection rules safely.
23. What is the execution speed of this Python migration tool?
With rate-limit safeguards set at 0.65s per task, the script safely imports roughly 90 tasks every minute without timeouts.
24. Can I convert Trello card comments into ClickUp task comments?
Yes. Query /cards/{id}/actions?filter=commentCard and send the output to ClickUp's /task/{task_id}/comment endpoint.
25. How do I automate this script to run on a continuous schedule?
Deploy the script inside a containerized GitHub Action or cron job, querying Trello boards on set intervals with an incremental date filter.
Comments
Post a Comment