This project is a Node.js application that synchronizes data from a CSV file with Trello cards. It allows you to update card labels in Trello based on the data in the CSV file.
The Trello CSV Data Sync application simplifies the process of updating Trello cards by automating the synchronization of data from a CSV file. It is especially useful for managing large sets of Trello cards with associated data. This can be generally useful if you are using Trello and wish to automate certain lists.
Before you can use this application, make sure you have the following prerequisites installed:
- Node.js: Installation Guide
- Git: Installation Guide
Follow these steps to get started with the Trello CSV Data Sync application:
-
Clone the repository:
git clone https://github.com/SageBaram/trello-csv-sync.git
-
Navigate to the project directory:
cd trello-csv-sync
-
Install dependencies:
npm install
To configure the Trello CSV Data Sync application, follow these steps:
- Create a
.env
file in the project root directory with the following content:
TRELLO_API_KEY=your-trello-api-key
TRELLO_OAUTH_TOKEN=your-trello-oauth-token
BOARD_ID=your-trello-board-id
DEAULT_LIST_NAME=your-trello-default-list-name
Replace the placeholders with your actual Trello credentials:
your-trello-api-key
: Your Trello API key.your-trello-oauth-token
: Your Trello OAuth token.your-trello-board-id
: The Trello board ID for your project.your-trello-default-list-name
: Your Trello default list of the given board ID.
- Save the
.env
file in the project directory. The application will automatically load these environment variables when it runs.
You can obtain your Trello API key and OAuth token from the Trello Developer Portal.
You can generate it directly from Trello API: Accessing Trello API
Get your Trello credentials:
- Look for the "New" button, and set up the integration.
- To access your board-id, you can go onto the Trello's web application, enter your board and read it's json output by
.json
to the url and submitting a request. Theid
attribute is the board-id. - To access a list-id, use
CTRL/CMD + F
to search for your list's name inside the board's json output. For example type"Backlog"
to find the Backlog list. Theid
above is the list-id.
Your configuration is now complete, and you can proceed to use the application as described in the Usage section.
To use the Trello CSV Data Sync application, follow these steps:
-
Ensure you have configured the
.env
file as mentioned in the Configuration section. -
Place your CSV file with the data to sync in the project directory or specify the correct file path in
config.js
. -
Run the application:
npm start
The application will read the CSV file, fetch existing Trello cards, and synchronize labels based on the data in the CSV file.
CSV File Structure:
HEADERS: List Name,Epic Name,User Story,Description,Labels
ROW: "[List Name]",[Epic Name],[User Story],"[Description]","[Labels]"
List Name
: The name of the list where the card should be placedEpic Name
: The epic nameUser Story
: The main taskDescription
: The description (user story structured).Labels
: Card labels.
Sample csv file below will create the card in the image:
List Name,Epic Name,User Story,Description,Labels
"Backlog",Authentication,Register Account,"As a user, I want to register an account with a unique username and email.","Feature,Bug"
NOTE: in order for the labels to update properly, the label name provided in the csv file must match the label names on your trello board
If you'd like to contribute to this project, please read our Contribution Guidelines.
This project is licensed under the MIT License. See the LICENSE file for details.