Migrating from Trello to Workflowy boards
Hi all,
With the release of the board view in workflowy, I decided to try moving my trello todo list to workflowy.
Trello lets you export a board as a big blob of json, which isn't that useful on its own, but you can use jq to transform it into something workflowy will use.
If you are familiar with shell scripts, you can use the following script to help you migrate.
#!/bin/bash
# Takes a trello json output, and converts it to something you can paste into
# workflowy.
#
# Usage: trello_migrate.sh path/to/trello_export.json
jq -r '
# Store a mapping of list IDs to list names
([.lists[] | {key: .id, value: .name}] | from_entries) as $lists |
# Grab a list of comments for each card
(reduce (.actions[] | select(.type == "commentCard")) as $comment (
{}; .[$comment.data.card.id] |= (. // []) + [$comment.data.text]
)) as $comments |
# Grab all trello cards (list, title, description)
[.cards[] | [$lists[.idList], .name, .desc] + $comments[.id]] |
# Convert card list to a mapping of list name to cards on the list
reduce .[] as $item ({}; .[$item[0]] |= (. // []) + [$item[1:]]) |
# Print out the cards as indented text for workflowy
to_entries[] | .key, (
.value[] |
" \(.[0])",
(.[1:][] | select(.) | split("\n")[] | " \(.)")
)
' "$@"
Or, if you want, you can do it online at jqplay.org:
- Go to your trello board, click Show Menu, More..., Print and Export, Export as JSON
- This will take you to a new page showing the JSON export of your trello board. Select all and copy to the clipboard.
- Go to https://jqplay.org/ and paste it into the left column saying "JSON"
- Copy and paste the filter shown below and paste it into the "filter" line at the top left
- Check the box that says "Raw Output"
- It should show you a nicely formatted export on the right hand side
- Copy and paste this into workflowy
- Change the view in workflowy to 'board'
Here's the filter to copy/paste (it's the same as in the above script but on one line and with comments removed):
([.lists[] | {key: .id, value: .name}] | from_entries) as $lists | (reduce (.actions[] | select(.type == "commentCard")) as $comment ( {}; .[$comment.data.card.id] |= (. // []) + [$comment.data.text])) as $comments | [.cards[] | [$lists[.idList], .name, .desc] + $comments[.id]] | reduce .[] as $item ({}; .[$item[0]] |= (. // []) + [$item[1:]]) | to_entries[] | .key, ( .value[] | " \(.[0])", (.[1:][] | select(.) | split("\n")[] | " \(.)"))
The jq script will attempt to grab descriptions and comments from cards, and mirror the boards you have in place, but you will want to go through and make sure everything looks ok.
Hopefully this will help others who want to try out the boards feature using cards they have in trello already.
Edit:
Here's an example of what it looks like on an export of a public trello board: https://jqplay.org/s/eWbLv1D2ad
From this:
To this:
-
Mark, Thanks for this script! I ran across it someplace online when doing a search for migrating from Trello to WorkFlowy. I had a tremendous amount of research and development notes in a Trello board that I was dreading having to copy/paste into WorkFlowy at some point...your script worked great, and I am so glad to be off of Trello with that information, and onto WorkFlowy. Thanks for the work on this!
-
Mark, I have to say that I'm excited about this, but am struggling with getting it to actually work. Parts of it do transfer over, but others don't break out into bullet points. I've located one spot that is doing this. See pics below. Any thoughts?
It doesn't work here
If I copy and paste one line previous it works.
It occurs right here:
Please sign in to leave a comment.
Comments
4 comments