Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How can I deal differently with the information of two checklists ?

Hana ha August 26, 2020

Hello ! 

I am using Zapier to extract data from trello and store them in a google spreadsheet. I did 2 different checklists on trello and I would like to have  :

- the number of checked items in the 1st checklist in a cell

- the number of checked items in the 2nd checklist in another cell

But I don't know how to dissociate checklists on trello. Indeed, I can have the total of checked items but for all checklists.

So, is there a way to separate data according to the checklists? I tried with 'Code by Zapier' in Python but I didn't know where to start. 

I want something like, if the checklist' name is AMO in the card (id:xxxx), then count the nomber of checked items and write it in the spreadsheet.

Also, all my cards will have a checklist named AMO and another one named DECO but the data will be different in these checklists, depending on the card.

If someone have an idea of how I can do that, it would be great. Thank you very much!

 

1 answer

0 votes
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2020

@Hana ha I can almost guess where Zapier gets the values. You would have noticed that card badges for checklist does not differentiate between checklists.

I have developed a generic Butler add-on which returned httpresponse.amo and httpresponse.deco and their values will be the completed count using Butler Http Request.

If you need to gather all these values and write them to spreadsheet, you probably need to do some programming. Can it be done with "Code by Zapier"? I do not know but it can be done with other tools. Most of my work including those above are based on py-trello on Wayscript. 

Will check out "Code By Zapier" sounds interesting.

Hana ha August 26, 2020

@milynnus Thank you for your quick answer. Indeed, what you wrote is very interesting and seem to be a big step in what I am trying to achieve.

I guess it can be done with 'Code by Zapier', but as I don't have the data I want to work with yet, I can't test it. However it's very useful for many other things :)

But I am sorry I don't really know what is Wayscript or py-trello... do I have to develop a generic Butler add-on too ?

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2020

@Hana ha I just sign up to Zapier to take a look at Code by Zapier with Python. To what extent you can embed a py-trello program is unclear. Zapier cautioned that there are runtime and memory limits. What is interesting to me it that it can be using to invoke a request to an external endpoint to GET, PUT, POST stuff. Will try one a bit later. Will keep you posted.

Usually what can be describe simply in words need not mean to automate it is easy. That is why we have zapiers, wayscript, py-trello library....trying to make it simpler for different types of users. The add-on is developed by me to help users who wanted something Butler cannot do.

Let me say, to update a specific cell in Google Sheet is not trivial as there are many cards on the board and you cannot be sure no one moves things around on Google Sheet.

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2020

@Hana ha Looks like there are real limitations in terms what libraries you can use with Code By Zapier because I cannot get past line 1 which is to get some libraries which will allow my program to be a client to Trello to get the data. Will try call to external endpoint next. 

from trello import TrelloClient
client = TrelloClient(
api_key='14a2c67.............1d7',
api_secret='5578....................56027a4',
token='be9...........................cb4',
)
out_dict = {}
for board in client.list_boards():
out_dict[board.name] = board.id
output = out_dict
milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 26, 2020

@Hana ha  coming very close to using Code By Zapier for python.

Basically made a call to my Butler Add-on with a module I wrote based on your description

import http.client

data = '''{"board_name" : "Check Items in CL"}'''
conn = http.client.HTTPSConnection("25368.wayscript.io")
conn.request("POST", "/butler?registry=5f21...........5c6&module=5f4............2d1", data, headers={"Content-Type":"application/json"})
response = conn.getresponse()
return response.read()

 You can see the data coming back. Just need to resolve this.

Runtime.MarshalError: Unable to marshal response: b'{"Card A1":{"AMO":"1","DECO":"2"},"Card A2":{"Checklist A":"0","DECO":"0"},"Card B1":{"AMO":"2","DECO":"1"},"Card B2":{"AMO":"3","DECO":"1"}}\n' is not JSON serializable

Not sure how this will benefit you eventually but it does validate that perhaps the Butler Add-on can be useful for people using Zapier with Trello.

@Iain Dooley FYI 

Hana ha August 27, 2020

@milynnus  Thank you for your time. I think I understand what you mean, so add-on are used to add something more, I see.

I managed to update some specific cells in googlesheet using regular expressions and 'Code by Zapier', but indeed, I can't be sure of anything.

I have never thought that Zapier would have limitations regarding the libraries though... Right, the data is coming back perfectly ! Sure, I think the Butler Add-on would be very useful.

Thank you again for helping me !

milynnus
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2020

@Hana ha No worries. Managed to get the data into Zapier (see below). I explored further with Google Sheet and was able to see that you can use a column name identify the row to update other column values. 

I learned something very useful today. It validates that the Butler Add On can be used with Code By Zapier.

Screen Shot 2020-08-27 at 2.25.51 PM.png

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events