Let's learn how to add App Buttons for running your script.
In this tutorial, we'll add a button that counts the number of cards in a board, and adds the count to the board name.
Enter the following code into your script:
import trello_app def count_cards(): # get old board name board = trello_app.get_current_board() old_board_name = board.get_name().split(" [") # get all open cards card_count = len(board.get_cards(filter="open")) # set board name with card counts board.set_name("%s [%s]" % (old_board_name, card_count))
Rather than only use the Run button in the editor, we can also close the editor and use an App Button.
Go back to the app. Rather than clicking the Blockspring leaf to open the editor, hover and click on your function name (in this case
If you run into any issues, or what to chat with others, connect to the Blockspring community right from the Scripts editor.