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

Mikes Trello Tips: Sync due date from one card to another with automation + API πŸ“…βž‘οΈπŸ“…

Another quirk of Trello automation is that you can't sync dates directly between cards....Until now!

Trello automation + API to the rescue again!!

  Screenrecording2024-11-2714.17.22-ezgif.com-video-to-gif-converter.gif

Part 1 - Setting up your Trello API key and tokenπŸ”‘

As with all of the Automation + API Articles, this is probably the most complicated part but you only have to do it once and if you have already followed one of my other Automation + API guides, you can skip this step:
If this is your first time using Automation + API, my Trello buddy @Brittany Joiner has made a super simple video to show you how.

Copy both the API key and Token to a safe place, you will need them later...

 

Part 2 - Create the automation 

Not many people know this but Trello automation includes the ability to issue HTTP requests.  If you're interested in this, look here

But its not important to know about it, just follow my steps.

 

In this example, I am setting the due date of a card in List 1 and the automation will update it on the linked card in List 2

 

Step 1 - Create the Trigger

For this, we are going to use the trigger

when a due date is set on a card in list 1

Screenshot 2024-11-27 14.25.24.png

 

Step 2 - Add the cascade action

In this example, I am going to set the date of the card linked as an attachment to Card 1

find the first card linked in the attachments

Screenshot 2024-11-27 14.23.46.png

Step 3 - Create the HTTP request action

  1.  Go to the Content Actions Page and scroll to the bottom to find the HTTP request action
    Screenshot 2024-11-16 13.50.28.png
  2. Set the action in the drop down to put to
  3. In the URL below,  replace the text PASTEYOURAPIKEYHERE with the API you saved earlier and PASTEYOURTOKENHERE with the Token you saved earlier.\

    https://api.trello.com/1/cards/{triggercardid}?key=PASTEYOURAPIKEYHERE&token=PASTEYOURTOKENHERE
  4. Copy and paste the URL from number 3 above into the URL field
  5. Paste the following payload into the Payload field

    {"due": "{triggercardduedate}"}

The automation looks as follows:
Screenshot 2024-11-27 14.38.56.png

πŸ€“ Trello Nerd Step - Add lead or lag to card 2 date

What if you want the date on Card 2 to be 1 week after the date on Card 1. That can be done too...Use this guide as a reference:
https://support.atlassian.com/trello/docs/arithmetic-and-formatting-in-date-variables/ 

Simply replace the payload above with this one:

{"due": "{triggercardduedate+1w}"}

You can use min for minutes, h for hours, d for days, w for weeks, m for months and y for years

You can also add or subtract by using either + or -

 

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events