Tool for exporting archived Trello cards, categorized by label to help track activity for liaison reports and annual reviews. Andrew Weymouth, Fall 2024.
python3 -m venv .venvOn Mac
source .venv/bin/activateOn Windows
.venv\Scripts\activatepip install requestsTo use the script, you will need to locate your Trello API Key, API Token, and the Board ID for the board you wish to export archived cards from.
- Visit the Trello Developer API Key Page.
- Log in with your Trello account credentials.
- Go to the Power-Up Admin Portal
- Select New Power-Up and Integration
- On the sidebar, select API Key
- Copy your API Key from the page save into a safe document
- To the right of the API field, select manually generate a token
- Approve the requested permissions and copy your API Token
- Open the Trello board in your web browser
- Look at the URL. It should look something like this:
https://trello.com/b/abcdef123456/my-board-name - The Board ID is the string of characters after
/b/and before the next/. In this example, the Board ID isabcdef123456.
-
Open the
script.pyfile in a text editor -
Replace the placeholders for
API_KEY,API_TOKEN, andBOARD_IDwith your actual values:API_KEY = 'your_api_key_here' API_TOKEN = 'your_api_token_here' BOARD_ID = 'your_board_id_here'
Once everything is set up, run the script:
python script.pyTo keep API information secure, remove this data before saving your script.py file and save it to the .gitignore file, which will preserve this information for future reference but only be accessible to you (as long as your repository is set to private).