Adding multiple Trello cards - trello-bulk
I’ve been using Trello boards for some of my
basic task tracking for quite a while and as other people in my family
have seen it in action, mostly via my huge
we’ve begun to use it in a more shared and collaborative way. In
addition to the core usage of adhoc task tracking the more frequent
use cases we’ve adopted are adding a set of cards on either a semi-
periodic basis or a group of tasks when a certain event happens.
Examples of the former are weekly setting of chores, monthly home
maintenance or quarterly checking of bills and accounts. The latter are
more event driven, planning a birthday party, organising a visit to the
As someone with a dislike of manual clicking around web UIs and a love of putting recurring things into scripts and version control I decided to take a look at the Trello API and see if there was a way to bulk add cards and tasks to a board. There was, and with some ruby wrapping I’ve decided to name it Trello-Bulk.
Using the ubiquitous YAML as a way to represent the individual cards and their details I’ve exposed a few key Trello functions to allow some customisation in the card creation. For example you can add checklists and items to a card and set due dates based on relative values. Here you can see an example card with checklists and items:
cards: - title: Attend a user group (1) - tiny description: "Attend a technical user group and learn something new about %%namespace%%" checklists: "Register": - Sign up - Add to calendar "Post event": - "Write blog post"
Here we have a sample incident card set that shows relative due dates and how you can easily use the basic template support to customise created cards without needing to hard code values or edit titles and descriptions in the UI.
cards: - title: "Initiate incident report for %%incident_id%%" description: "We start an incident report for %%incident_id%%" - title: "Review %%incident_id%%" description: "Review %%incident_id%% as a team" due: +2 - title: "Publish incident report %%incident_id%%" description: "Document the incident, the review and the resolution" due: +4
You pass the replacement value in using the `–replace`` command line argument:
--replace '%%namespace%%==Orders_incident 004'
Unsurprisingly most of my family have no idea what YAML is, or how to
run ruby from the command line (no matter how much time i spend telling
them about it every Christmas) but as the person with the Trello
account, who creates the boards and columns, it’s easy enough to run the
periodic creations for them via
cron. I’ve also started to use some
customised card sets in my work life to help track larger parts of work
that have predictable work flows. As the output are the cards everyone
sees and collaborates on the way they get created is mostly irrelevant
but by using
trello-bulk I can add some more consistency and save
myself some time and effort.