Automation variables

Variables are special pieces of text enclosed in curly brackets that are replaced by a current value when an automation is executed. You can use variables in list names, card titles, card descriptions, and comments.

For example, in the automation when a card is moved into list "In progress", post comment "started on {date}", the {date} variable will return the date when the card was moved. 

Similarly, in the automation when a card is moved to "Done", post a comment "Closed by {username}" the {username} variable will return the username of the user who moved the card.

Time and date variables

Time and date variables return the value of a certain time or date.

Note: Long numbers are zero-padded to be of consistent length, which is necessary for sorting.

Time variables

Variable

Example

{time}

9:59 PM

{time24}

21:59

{timelong}

21:59:59 EDT

Date variables

You can prepend tomorrowyesterdaynextworkingday_, and previousworkingday_ to the following variables. For example, {previousworkingday_monthdaynumber}{tomorrowmonthdaynumber}{yesterdayisodate}.

Variable

Example

{date}

October 2, 2021

{monthdaynumber}

3

{monthdaynumberlong}

03

{yeardaynumber}

277

{yeardaynumberlong}

277

{weekdaynumber}

1

{weekdayname}

Monday

{weekdayshort}

Mon

{dateshort}

Oct 3, 2021

{datelong}

October 3, 2021

{datenumber}

10/3/2021

{isodate}

2021-10-03

{isodatetime}

2021-05-08T12:17:01+03:00

You can prepend last and next to the following variables. For example: {lastweeknumber}{nextusmonthweeknumber},{nextquarternumber}{lastyearshort}.

Variable

Description

Example

{weeknumber}

ISO week number (starts on Monday)

40

{weeknumberlong}

ISO week number (zero-padded)

40

{usweeknumber}

US week number (starts on Sunday)

41

{usweeknumberlong}

US week number (zero-padded)

41

{weekyear}

Year the week started (ISO week numbering)

2021

{weekyearshort}

The year the week started, short format (ISO week numbering)

21

{usweekyear}

Year the week started (US week numbering)

2021

{usweekyearshort}

The year the week started, short format (US week numbering)

21

{monthweeknumber}

Week within the month (ISO week numbering)

1

{usmonthweeknumber}

Week within the month (US week numbering)

1

{monthnumber}

The current month number

9

{monthnumberlong}

The current month number (zero-padded)

09

{monthname}

The current month name

September

{monthshort}

The current month name, short format

Sep

{quarternumber}

The quarter number for the current year

4

{year}

The current year

2021

{yearshort}

The current year, short format

21

Board variables

Board variables return the value of board-related data.

Variable

Description

Example

{cardboardname}

The name of the board where the card was found. Available only after find card with id.

Support planning

{boardlastactivitydate}

The date when the board was last active.

May 7, 2021

{boardlastactivityisodatetime}

The date and time when the board was last active (ISO week numbering).

2021-05-07T18:07:57+03:00

{boardlastactivitydateiso}

The date when the board was last active (ISO week numbering).

2021-05-07T18:14:27+03:00

{boardlastactivitydateshort}

The date when the board was last active, short format.

May 7, 2021

{boardinactivitydays}

The number of days the board is inactive.

3

{boardteamenterpriseid}

ID enterprise of the board’s team.

588efeb2ba9d0fb398

After the create board automation, the following board variables with the new prefix, such as {newboardlink}, refer to the new board. After the copy board automation, the variables with the copy prefix, such as {copyboardlink}, refer to the new copy of the board.

Variable

Description

{boardid}

The ID of the current board

{boardname}

The name of the current board

{boardlink}

The link to the current board

Card variables

Card variables return the value of card-related data. These variables are available in automations that have cards in the context.

General card information

{cardname}

The card's name.

{carddescription}

The card's description (not always available).

{cardlink}

The link to the current card.

{cardlistname}

The name of the list where the card is (not always available).

{cardid}

The internal ID of the card (for example, FY2OWrnc). This value is always constant.

{cardidlong}

The internal long ID of the card (for example, 571d07b591c8b68aeb4f6acc). This value is always constant.

{cardnumber}

The internal number of the card on the board (for example, 48). This value changes when the card is moved to another board (not always available).

{cardlistid}

The ID of the list where the card is.

{cardboardid}

The ID of the board where the card is.

{cardboardlink}

The link to the board where the card is.

{cardmoveisodate}

The last time the card was moved (for example, 2021-05-08T09:21:26.472Z).

{cardlastactivitydate}

The time when the card was last active.

{cardlastactivityisodatetime}

The time when the card was last active (ISO week numbering).

{cardactivetimeago}

The period that the card was inactive (for example, a few seconds ago or 9 days ago).

{cardcreationisodatetime}

The time the card was created (ISO week numbering).

Card labels 

{cardlabels}

The names and colors of all named card labels added to the card (comma-separated).

{cardlabelnames}

The names of all named labels added to the card (comma-separated).

{cardlabelcolors}

The colors of all named labels added to the card (comma-separated).

{cardlabelcount}

The number of labels added to the card.

Card members

{cardmemberusernames}

The usernames of all members of the card (comma-separated).

{cardmemberfullnames}

The full names of all members of the card (comma-separated).

{cardmembercount}

The number of members of the card.

{cardfirstmemberusername}{cardfirstmemberfullname}{cardfirstmemberinitials}

The information about the first member of the card.

Card checklists 

{cardcheckliststate}

A formatted text with the state of all the checklists in the card. You might use this variable to add a comment with a snapshot of the state of the card's checklists.

{cardchecklistcount}

The number of checklists on the card.

{cardcompletechecklistcount}

The number of complete checklists on the card.

{cardincompletechecklistcount}

The number of incomplete checklists on the card.

Card's date 

{cardduecomplete}

The value is "True" if the due date has been marked as complete, otherwise, it is "False".

{cardduedate}

The due date of the card (not always available). You can combine this variable with all time and date variables. For instance, {cardduedateweekdayname}{cardduedatemonthdaynumberlong}.

{cardstartdate}

The start date of the card (not always available). You can combine this variable with all time and date variables. For instance, {cardstartdateweekdayname}{cardstartdatemonthdaynumberlong}.

{cardcreationdate}

The date the card was created.

For the following variables, adding round at the end such as {cardagedaysround}, rounds the number to the nearest integer.

Card's time 

{cardagedays}

The card age in days, with two decimals. For example, 1 day 6 hours will be displayed as 1.25.

{cardagehours}

The card age in hours, with two decimals. For example, 1 hour 40 minutes will be displayed as 1.67.

{cardageminutes}

The card age in minutes, with two decimals. For example, 1 hour 40 minutes 30 seconds will be displayed as 100.5.

{cardhoursinlist}

The number of hours the card has spent in the current list, with two decimals. For example, 1 hour 40 minutes will be displayed as 1.67. You can use this variable to track time spent on tasks.

{cardminutesinlist}

The number of minutes the card has spent in the current list, with two decimals. For example, 1 hour 40 minutes 30 seconds will be displayed as 100.5. You can use this variable to track time spent on tasks.

{carddaysinpreviouslist}

The number of days the card spent in the previous list.

{cardhoursinpreviouslist}

The number of hours the card spent in the previous list.

{cardminutesinpreviouslist}

The number of minutes the card spent in the previous list.

{triggercardpreviouslistname}

The name of the list that the trigger card comes from.
Note: This variable is only available when the automation trigger involves the movement of a card to a new list.

Additionally, you can use the following variables if your automation has a trigger that involves a source card (like when a card is copied):

{sourcecardname}

The title of the source card.

{sourcecardlink}

The link to the source card.

Adding prefixes to card variables

Prefix

Usage

Variables unavailable with the prefix

{new}

Variables with the new prefix are available after the create a card automation and refer to the new card.

Card memberscard checklistscustom field variables

Example: when a card with a name containing "information security" is added to the board, create a new card with title "Security training" in list "In progress" and set the card's description to "{newcardname}: task for the current week"


Prefix

Usage

Variables unavailable with the prefix

{trigger}

Variables with the trigger prefix are available in automations where the automation trigger involves a card, such as when a card is copied, and refer to the trigger card. 

The list of unavailable variables differs depending on what Trello action triggered the automation.

Example: when a card is added to list "Doing", find a card titled "Rollup", and add item "{triggercardlink}" to checklist "Doing"


Prefix

Usage

Variables unavailable with the prefix

{copy}

Variables with the copy prefix are available after the copy a card action and refer to the copied card.

Card memberscard checklistscustom field variables.

Example: when a card with the blue "Marketing" label is added to list "Backlog", copy the card to the top of list "Week 1-3" on board "Marketing team", and rename the card to "{copycardname}: incoming request"


Prefix

Usage

Variables unavailable with the prefix

{found}

Variables with the found prefix are available after the find a card action and refer to the found card.


Card memberscard checklistscustom field variables.

Example: when a card with the yellow "Sales" label is added to the board, find a card titled "Sales tasks", move the card to the top of the list, and post comment "{foundcardname} deadline: end of the week" .


Prefix

Usage

Variables unavailable with the prefix

{multiplier}

Variables prepended by multiplier are available after the multiplier automation ( for each card) and refer to the current card.

Card memberscard checklistscustom field variables.

Example: when a card is moved into list "In progress", for each card linked in the attachments, set the card's description to "{multipliercardname}: In progress" .

Member variables

Variables are only available in automation rules (automation with when triggers):

Example: when a card is moved into list "Done", post comment "Completed by {username}"


Variables available only in Rules that have a card in the context and in Due Date automations:

Variable

Description

{creatorusername}

The username of the user that created the card.

{creatorfullname}

The full name of the user that created the card.

{creatorinitials}

The initials of the user that created the card.

Example: when the due date is marked as complete in a card in list "In progress", post comment "Completed by {creatorusername}"


The following variables are available only for particular match types (addmention) and in automations with triggers where a user is matched such as when someone is added to a card or when someone is mentioned.

In multipliers (for every member in the card), the following variables are only available for comments and email notification actions.

Variable

Description

{matchedusername}

The username of the member that was matched (added, mentioned, etc) in the automation.

{matchedfullname}

The full name of the user that was matched (added, mentioned, etc) in the automation.

{matchedinitials}

The initials of the user that was matched (added, mentioned, etc) in the automation.

{addedusername}

The username of the member that was added to the card.

{addedfullname}

The full name of the user who was added to the card.

{addedinitials}

The initials of the user that was added to the card.

{removedusername}

The username of the member that was removed from the card.

{removedfullname}

The full name of the user that was removed from the card.

{removedinitials}

The initials of the user who was removed from the card.

{mentionedusername}

The username of the member that was mentioned in the card.

{mentionedfullname}

The full name of the user who was mentioned in the card.

{mentionedinitials}

The initials of the user that was mentioned in the card.

Using variables in automations with specific triggers

This section includes the list of variables that are available in automations only in certain trigger conditions.

Automations with triggers that include a custom field value:

{customfieldname}

The name of the custom field.

{customfieldvalue}

The value of the custom field.

{customfieldvaluebefore}

The value of the custom field before the change.

Rules with triggers such as when a list is createdwhen a card is added to the board (these variables are available in automations that have a list in the context):

{listname}

The name of the list

{listid}

The ID of the list

Rules with when a due date is added trigger:

{cardduedate}{cardduedateweeknumber}{cardduedatemonthdaynumber}, etc.

Date variables for the due date

{cardstartdate}{cardstartdateweeknumber}{cardstartdatemonthdaynumber}, etc.

Date variables for the start date

Rules with when a comment is posted trigger:

{commenttext}

The text of the comment

{commentlink}

The link to the comment

Rules with mentioning triggers (for example, when a card is mentioned, when a member is mentioned) and after the find the mentioned card action:

{mentionbacklink}

The link to the card where the mention occurred.

{mentiontext}

The text (comment, card description, or checklist item) that includes the mention.

{linklessmentiontext}

The text (comment, card description, or checklist item) that includes the mention, with all card mentions and links removed.

{usernamelessmentiontext}

The text (comment, card description, or checklist item) that includes the mention, with all user mentions (@username) removed.

{mentionlessmentiontext}

The text (comment, card description, or checklist item) that includes the mention, with all user or card mentions removed.

Rules that involve a checklist in a trigger such as when a checklist is added:

{checklistname}

The name of the checklist.

Rules with when a checklist item is checked/unchecked trigger:

{checklistitemname}

The name of the checklist item.

{checklistitemstate}

The state of the checklist item: the word "Complete" or "Incomplete".

Rules with triggers that involve a label such as when a green label is added:

{labelname}

The name of the label.

{labelcolor}

The color of the label.

Rules with when the name of a card starts with trigger and trigger conditions such as when a card with a name containing:

{matchedtext}

The text that matched the condition, typically used with a condition including a {*} wildcard.

{textbeforematch}

The text before the matched text.

{textaftermatch}

The text after the matched text.

Rules with when the name of a card contains a date trigger:

{matcheddate}

The date interpreted by the Automation.

Rules with triggers such as when an attachment is added to a card:

{attachmentlink}

The link to the attachment.

{attachmentname}

The name of the attachment.

Rules with triggers such as when the name or the description of a card starts with:

{changedfield}

The name of the field changed (name or description).

{textbefore}

The text of the name or description before the update.

{textafter}

The text of the name or description after the update.

Variables available after an HTTP request:

{httpresponse}

The body of the response.

Variables available after a Jira issue is created:

{jiraissuelink}

The link to the created Jira issue.

Variables for the Butler Bot

Note: Butler Bot is no longer officially supported. If you're starting out with Butler, you won’t be able to use the legacy functionality. Please see Automation overview guide to learn more about automating your Trello workflows.

To see the current value of most variables, in the Automation list, create a new card named print variables. For example, when a label is added to a card, print variables.

You can see the variables in the Rule Logs after you run the automation.

Still need help?

The Atlassian Community is here for you.