Exporting Trello Boards

Shreyas Nisal
4 min readMar 1, 2022

Trello is one of the most popular Kanban-style list-making tool used by numerous people. During our research, we conducted a study with several participants where they answered some questions and wrote their experiences in Trello boards. Once we had these Trello boards, we wanted to export all this data into a word file to be used for further analysis, for example using tools such as NVivo. The free version of Trello allows only exporting boards as JSON files, which contain not just the current state of the board but exact details of all labels, past actions and more. However, this was not something that we wanted. Another disadvantage of exporting as a JSON was that we needed the images as well, which later turned out to be quite a task. The challenge now was to get a word file with the current state of the board, and I spent quite some time trying to find the best way to do this. Here’s how I did it, and you can too 👇

Using Power-Ups

Third-party tools have been developed that can be accessed from within Trello, which allow exporting data from a board in different formats including CSV, Excel, etc. The most popular among these is one by Orah Apps, which you can use at $7.50/month or $24/year.

However, I wanted to get this data converted for free, so we won’t dwell much on this option. I wanted to put this out there just in case you want a simple and quick way to get the job done. A point to note here is that since I did not try out any power-ups at all, I don’t know if they allow creation of a word file that includes the images as well (from what I understood in the description of the tool, images are not included).

Using an Online Tool

My search for a tool that could help with this conversion led me to this awesome online platform developed by connie-clark and hosted on GitHub. You can check out the tool here, and get a PDF version of your Trello board pretty nicely. The tool lets you select what details from the board you want in your PDF, and generates a neat document based on the preferences.

The disadvantage here is that the tool only gives us a PDF version of the board, and I had to use another online tool to convert the PDF to word. This not only adds another step to the process, but also slightly messes up the formatting of the document.

Having to do this for several boards would be a painstaking process. I also wanted the images exported, which is not something this tool offers.

Here’s where Python comes to the rescue!

Using a Python Script

As a last resort, I quickly wrote a Python script that could import the JSON files exported from the Trello boards and generate word documents consisting of all lists from a boards, and containing the images as well.

Before you use the script, however, you will need to make all the Trello boards that you are using public. This is required because image links are present in the JSON files, and for the script to access the images through these links, access to the board must be public. Once the script is finished you can change the board access to whatever you want.

Here’s the entire Python script in case you want to use it, and you can also find it in the GitHub Repository I made for the same.

import json
import os
from docx import Document

DIR_PATH = "."
print("Using all json files from {}".format(DIR_PATH))
word_doc = Document()

word_doc.add_heading("Trello Boards", 0)

for filename in os.listdir(DIR_PATH):

if not filename.endswith(".json"):
continue

print("Converting file {}".format(filename))

word_doc.add_heading(filename, level=1)

with open(os.path.join(DIR_PATH, filename), 'r', encoding='utf-8') as json_file:
json_data = json.load(json_file)
lists = {}
for list in json_data["lists"]:
lists[list["id"]] = list["name"]

list_cards = {}
for card in json_data['cards']:
card_data = {"name": card["name"], "desc": card["desc"]}
if lists[card["idList"]] in list_cards:
list_cards[lists[card["idList"]]].append(card_data)
else:
list_cards[lists[card["idList"]]] = [card_data]

for list in list_cards:
word_doc.add_heading(list, level=2)
for card in list_cards[list]:
word_doc.add_heading(card["name"], level=3)
word_doc.add_paragraph(card["desc"])

word_doc.add_page_break()

word_doc.save('output.docx')

To use the script, export data from all the boards that you want converted to word files (a separate word file will be created for each board), and place it in the same folder as the script. Rename the data files to a appropriate names, since the name of the file is used as the heading.

Assuming you’ve named the script export_trello_data.py, run the script using the command python export_trello_data.py

This will create multiple output word files with the data from all Trello boards in the folder, and you’re ready to use this data wherever you want!

I hope this article helped you with exporting Trello data, using any of the methods mentioned above. If it did, give the article some 👏, and to keep reading more of my articles, follow me on Medium.

--

--

Shreyas Nisal

Software Engineer at Twilio | Ex Research Assistant at MIT Media Lab, Exertion Games Lab | Ex Intern at Twilio, BitHyve, Mednet Labs