Overview
This example explains how to create an insight from your connected Trello information.
Prerequisites
1. Create a board as in the example below
As you can see we have a board named Backlog as well as a couple of lists defined (ToDo, In Progress, Done, Deleted) with some cards in them.
2. Connect to your Trello account
The initial connection can be established following this article.
3. Add data sources
From the list with already available connections select the one you previously added (for the purposes of this example the connection name is myTrello)
Select the Cards in Board directory. This represents all the boards your account has access to. Selecting any of the boards will import all cards from this board as a data source (for the purposes of this example we will be selecting the Backlog board but you can choose any one that you want to use)
Give a meaningful name to your new data source as well as a sync schedule (note that the default name of the board is the unique identifier that Trello uses, so in the most cases it will be a random string. It's highly advisable to give it a human-readable representation as it will be easier when writing the future insights boards)
Click the add my data source
Adding the lists from the Backlog Board as an Insightboard Parameter
As you may have noticed we also had 4 separate lists defined in the Backlog board. In order to use them, we need to add them as a different data source. To do so follow the same procedure as with the Backlog board but instead of navigating to Cards in Board and then Backlog go to Lists in Board and then navigate to Backlog.
Navigate to Settings -> Configuration -> Insightboard parameters
Click on the add new parameter button
Name the parameter Backlog Lists
Give a unique key name that is not yet used (for the purpose of our example we will use backlog_lists)
Choose the selector as List
Switch on the Use connected entity value
From the entity type drop-down select backlog lists
For title select name
For key select ID
In the end, your parameter should be configured like this.
โ
Create your first Trello insight
Create an Insightboard (follow the steps in this article)
Click on Add an Insight
Select Use SQL expert editor from the blue button Crete new insight
Add a title and description (optional)
Paste the following in your SQL editor
SELECT count(*) as backlogitems from backlogcards
where idlist = '%%backlog_list%%'
6. Paste the following in you HTML editor
<div class='title'>{{ data.backlogitems }}</div>