Auto notifications if someone hasn't updated a card
Asked by Brett K.:

Hi all - do you know of a way to have Trello send a reminder to Members of a card if nobody has updated it in over a week, for example?


Answers:
author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

[Trello variable documentation](https://help.trello.com/article/1157-variables) does not have a variable for date of last activity. It is, however, a property of the card. Which means that with Butler you need to use Http Request and Trello API to fetch it.

However, I have a hack that compares A\<=B and outputs a C. In the example below it compares creation date+7d to Due Date and writes a report line to say it is incomplete.

```
every day at 8:55 pm, create a report in variable "card_days" with all cards with an incomplete due date assigned to anyone using pattern "{cardcreationdate+7d~YYYYMMDD}^{cardduedate~YYYYMMDD}^- [{cardname}]({cardlink}) task was created on {cardcreationdate} in this List {cardlistname}. You have set a due date {cardduedate} more than 7 days into the task and it is still incomplete at this time.", post to url "https://25368.wayscript.io/butler/?registry=5<registry ID>&module=5f8f85b37e48935f02fa954e" with payload "{\"report_variable\" : \"{$card_days}\"}", and send an email notification to "sgi.collective.sg@gmail.com" with subject "Card Days in List" and message "Here's your report : \n\n {httpresponse.condition_met_list}"
```

The above mechanism can be used to compare any A \<= B as condition to include C. It uses Butler Http Request and an add-on I created to the magic.

See [Superhero Power here](https://www.notion.so/Superhero-Power-ac42df32932f423fbbe2d60cf2d0dbab)

comments: author: Brett K.
body: Thank you for the reply but that was way too technical for me! Is there a simpler way to do it?


author: Brett K.
body: Or, if I'm not an HTTP guy how would you recommend I go about setting it up?


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

Because date of last activity is not available as a variable, I doubt there is any easier method other than to use a Power Up for Card Aging. That tells you the age of each card - I think based on creation date.

I built [Superhero Power](https://www.notion.so/Superhero-Power-ac42df32932f423fbbe2d60cf2d0dbab) to help those who need a Butler Add on for things Butler cannot do and do not have a facility to host the endpoint and run the program. The registration and activation instruction pages are hidden inside the toggle list under Superhero Sandbox or [here](https://www.notion.so/Authorise-the-Trello-user-and-activate-the-registry-record-3a926281d531486fb3d986e33773441b)


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376) Although {cardlastactivitydate} is not in the Trello Variable Help page it is actually available. I will work out the change to the above with this new 'hidden' variable. This is for a card that I added for testing.

* The last activity date for this card [This card is created today Oct 22 and I have added a checklist](https://trello.com/c/C1hyRhDr) is October 22, 2020.


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

Here's the revised solution. It compares {cardlastactivitydate\~YYYMMDD} with the report run date ie {date-7d\~YYYYMMDD} and write out the report line if last activity is \<= date-7d.

```
every day at 8:55 pm, create a report in variable "last_activity" with all cards using pattern "{cardlastactivitydate~YYYYMMDD}^{date-7d~YYYYMMDD}^- The date of last activity of this [{cardname}]({cardlink}) in this List {cardlistname} is more than 7 days ago. The last activity was on {cardlastactivitydate}.", post to url "https://25368.wayscript.io/butler/?registry=<registry ID>&module=5f8f85b37e48935f02fa954e" with payload "{\"report_variable\" : \"{$last_activity}\"}", and send an email notification to "sgi.collective.sg@gmail.com" with subject "Last Activity More 7 days Ago" and message "Here's your report : \n\n {httpresponse.condition_met_list}"
```


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

By the way, in order to send a reminder to the member(s) more work is needed to make condition work with Butler "Collect all cards" to produce a new checklist with a subset of all cards meeting the condition, and for each link item write a comment on the card to trigger a notification of all members on the card using @card.

Having this variable is very useful for people who need to keep things moving along without too much delay based on activity instead of waiting for due dates only.


author: Brett K.
body: Thank you for creating that code! I don't know where to put it to have it activated though?


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376) i am currently on Gold. Collect all cards is under Cascade.


author: Brett K.
body: oh ok. Does Gold cost $?


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376) Free for 12 months because I did a hobby board and invite new Trello users and got 1 month for each new introduction. ??


author: Brett K.
body: Got it. One more thing...where would I put this code to make it work?

```
every day at 8:55 pm, create a report in variable "last_activity" with all cards using pattern "{cardlastactivitydate~YYYYMMDD}^{date-7d~YYYYMMDD}^- The date of last activity of this [{cardname}]({cardlink}) in this List {cardlistname} is more than 7 days ago. The last activity was on {cardlastactivitydate}.", post to url "https://25368.wayscript.io/butler/?registry=<registry ID>&module=5f8f85b37e48935f02fa954e" with payload "{\"report_variable\" : \"{$last_activity}\"}", and send an email notification to "sgi.collective.sg@gmail.com" with subject "Last Activity More 7 days Ago" and message "Here's your report : \n\n {httpresponse.condition_met_list}"
```


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

Trello as a commercial entity knows how monetize their platform so (1) Butler HTTP request which I am using comes with Gold and Business class and beyond. (2) you need to sign to use Superhero Power.

Alternatively, now that we know there is this new variable use it generate a report and send it to you email and manual check and notify.

I should have a "collect all card" solution soon by tomorrow?


author: Brett K.
body: I just verified that I actually have Business class but don't see HTTP request under my Butler option.

Looking forward to hearing your collect all card solution


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

?in Butler Rules and Card Button it is under "Content" and Calendar, Board it is under "Other"


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376)

Coded and Tested the module that will work with "Collect all cards". For each call to Butler Http Request, each item from the collect_items checklist will be processed one at a time.

I decided to add a condition parameter so you can check for {var A} == {var B}

I have continued to use the same {cardlastactivitydate} example but it can work for any two variable.

```
when custom field "Checkbox" is checked, collect all cards in list "Template Cards" into items in checklist "collected_items" using pattern "{cardlastactivitydate~YYYYMMDD}^{date-7d~YYYYMMDD}^{cardlink}", for each checklist item in a checklist named "collected_items", post to url "https://25368.wayscript.io/butler/?registry=<registry ID>&module=5f91fcc9086f616566ca126e" with payload "{"checklist_item" : "{checklistitemname}", "condition" : "LE"}", find a card with link "{httpresponse.returned_item}", post comment "You pass the test.", find a card with link "{triggercardlink}", and remove the "collected_items" checklist from the card
```


author: Brett K.
body: Nice work. My issue is I still can't find 'Collect All Cards' within Butler. I see Rules, Card Button, Board Button, Calendar and Due Date. Within those I don't see collect all cards anywhere. I also don't know where to enter this code?


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376) Collect all card is under rules after adding a trigger, under Cascade - it is the last command on the list.


author: Brett K.
body: I don't have that option. When adding a trigger under Rules my options are Card Move, Card Changes, Dates, Checklists, Card Content and Fields


author: milynnus
body: [@Brett K.](/t5/user/viewprofilepage/user-id/4133376) See pic. You might want to ask Trello since you have Business Class. By the way, is the board you are working on is on a Business Class Team?

![Screen Shot 2020-10-24 at 12.12.04 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/115483i2E328E2676C63B6A/image-size/large?v=v2&px=999 "Screen Shot 2020-10-24 at 12.12.04 AM.png")


author: Brett K.
body: so according to my Billing info I have Business Class and I thought this board would automatically be part of it. I do see 'Cascade' under my 'Card Button' menu item...

![Capture.JPG](https://community.atlassian.com/t5/image/serverpage/image-id/115505iF61BD8B54D39227B/image-size/large?v=v2&px=999 "Capture.JPG")