The goal of the Repello package is to obtain information from a Trello board and view the contents in a more user-friendly fashion. This package will allow a user to store the information from Trello cards, including card checklists and date of last modification. The package also allows two saved Trello objects to be compared to check for changes to the status and items of card checklist tasks.



Getting Started

Loading supplementary packages

#Note: you may want to also install the following packages for well-formatted report tables

Setting the user token

Using this package requires you to have your own Trello account. This package obtains information from Trello boards using API calls. To access Trello information, you first need to obtain your unique user key and token. Access to these can be found by logging into Trello and visiting https://trello.com/app-key, then by clicking on "Manually generate a token". Once you have generated your key and token, you can either save it into a text file somewhere on your computer or you may manually enter them when prompted. If you opt to save them as text files on your computer, be sure to set your working directory to the file location before you attempt to run the code.

Setting the user token is a critical first step for using this package. Always be sure to set the token prior to using any of the other functions in this package

set_key_token(key_file="user_key.txt", token_file="user_token.txt")
#Alternatively, you may leave the arguments blank and manually enter the key and token when prompted

Viewing information for a specified Trello board

All you need to get started with the Repello package is the name of the board you want to view. This example will use the board "Repello - R Reports from Trello". You can access this board on Trello for reference at https://trello.com/b/CMNHqjea/repello-r-reports-from-trello.

The cards_info function allows you to view the card information from a board.

activity <- cards_info(get_board_id("Repello - R Reports from Trello"))
head(activity) %>% kable(escape=F, align="cl") %>% trimws %>% kable_styling(c("striped","bordered"))
activity <- readRDS("activity.rds")
head(activity) %>% kable(escape=F, align="cl") %>% trimws %>% kable_styling(c("striped","bordered"))


The all_checklists function can be used to view all card information and accompanying checklists in a list format.

trello_object <- all_checklists("Repello - R Reports from Trello", save=FALSE)
#save can be set to 'TRUE' if you want to save the current Trello object for 
#later comparison
trello_object <- readRDS("trello_object.rds")

Viewing a sample of one of the board's cards, you can see that six different pieces of information are presented: the name of the card, the card ID, the date of last modification, the Trello list the card is on, and the items and their respective status on a card checklist. If no list is present, the only item will be "No checklist for this project.


Comparing two Trello objects

One of the main goals of this package is to compare the Trello board at two different time points to check for changes made to the checklists. The trello_updates function can locate any new tasks or status changes made to the Trello cards, and can also determine if any new cards have been added since the last saved object.

report <- trello_updates("Repello - R Reports from Trello", prior="old_object.rds", save=FALSE)
#Note: If 'prior' is not specified, the function will automatically find the most recent saved 
#Trello object to compare to the current rendition.  The function can also accept a 'recent' 
#argument if you want to compare two lists from different time points.

report <- readRDS("report.rds")

If a card appears on the newest Trello object, but was absent from the prior rendition, it will be marked as a new card and all checklist items will be considered new items.


Some cards do not have checklists. If this happens, repello will leave the list_diff element empty for the card.


Creating a Trello Report

The following code is used to create a kable-formatted report of the tasks and status of items for each checklist on a recent Trello object compared to a prior Trello list from the same board. The functions used above are utilized here.

report <- trello_updates("Repello - R Reports from Trello", prior="old_object.rds", save=FALSE)
new_sticker <- "<div class='sticker'>NEW</div>"
new_headersticker <- "<div class='header-sticker'>NEW</div>"
checkmark <- "<span class='checkmark'><div class='checkmark_stem'></div><div class='checkmark_kick'></div></span>"

for (i in 1:length(report)){
  if (report[[i]]$contains_list=="List Available" & ("New Item" %in% (report[[i]]$list_diff)$history | "Newly Completed" %in% (report[[i]]$list_diff)$status)){
    if (report[[i]]$card_status=="New Card"){
      cat("<h2>", new_headersticker, report[[i]]$name, "</h2>", sep = " ")
    } else {
      cat("## ", report[[i]]$name, "\n\n")
    temp <- report[[i]]$list_diff %>% filter(history=="New Item" | status=="Newly Completed")
    for (j in 1:nrow(temp)){
      if (temp$history[j]=="New Item"){
        temp$item[j] <- paste0(new_sticker, temp$item[j])
    for (k in 1:nrow(temp)){
      if (temp$status[k]=="Newly Completed"){
        temp$complete[k] <- checkmark
      } else {
        temp$complete[k] <- " "
    temp <- temp %>% select(complete, item)
    colnames(temp) <- c("", "Item")
    temp %>% kable(escape=F, align="cl") %>% trimws %>% kable_styling(c("striped","bordered")) %>% column_spec(1, "30px") %>% cat
    cat("  \n")

Try the repello package in your browser

Any scripts or data that you put into this service are public.

repello documentation built on Jan. 15, 2021, 3:35 p.m.