In this article:
1. How to Create the Rule?
2. How to Set Up and Enable the Rule?
2.1. WHEN
2.2. AND
2.3. THEN
3. Practical Examples of Using the 'Card is Updated by Email' Rule
This Business Rule will trigger a predefined action (create, move, update, send a notification, call web service) whenever a comment is added via the email integration feature. For example, you can move a card to "Waiting on us" when a customer replies to one of your emails → the email is processed by the email integration → and created as a card comment.
Note: To be able to send/receive emails from the card comments and trigger the rule, you need to have set up the email integration first.
1. How to Create the Rule?
Only users with "Account Owners" or "Manage Business Rules" privileges can create business rules.
Go to your Administration panel by clicking on Administration at the top right of your screen. Open the Business Rule tab and select the "Card updated by email" rule icon.
Note: If there is a set of defined rules to your account → use the Add new rule button at the upper right side of the panel.
2. How to Set Up and Enable the Rule?
In the Name and Description fields, you can change the name of the rule and describe the scenario you will achieve with it. This way you can easily overview your active business rules because once created, they are all present in the Business Rules panel.
PRO tip: You can specify the board name in the rule name in order to easily distinguish rules configured for each of your boards.
You can share the rule with other users (e.g. with a Workspace managers), if appropriate. In this case, they will be able to edit/disable/enable the rule.
Business Rules are a sort of "point-and-click" programming language with which you can automate any process. Each Business rule has three main properties: When; And; Then.
1. WHEN
This is the event that will trigger an action when it occurs (i.e. a card is updated by email).
2. AND
Here you define the filters, which specify the conditions under which the actions should be triggered.
- When users create a new rule, the Board filter will be applied by default. This means that the rule will be executed only for the boards you specify in the filter. If you remove the board property and enable the rule, it will be executed for the entire account. You can use "or" to add extra boards and optimize the scope of the rule. Use the delete sign to remove a board.
- Click on the Add new property button to add extra filters, if necessary. Select a Regular field or/and a Custom field → click on Add.
For all time-related fields, you can select the following units: Days, Hours, Minutes, Seconds. When you have added the filter, set it up by clicking on Not set, or enter a value.
Note: You can add as many filters as you wish by clicking on Add new property and repeating the steps.
3. THEN
Select an action to be triggered.
Click on Add new action under the type of action you wish to be triggered → select your preferred action if there are several options → click on Add → choose the value from the dropdown or click on Not set to configure it. You can add more than one action from one type by repeatedly clicking on Add new action and configuring it.
The following actions can be triggered:
1) Create cards or subtasks: The following types of cards can be created:
Practical tip: When a Card is updated by email and the Board is "X" → create a Subtask.
Define the subtask during the configuration process.
2) Update the card details: The following card details can be updated upon card creation
Select a regular field or a custom field that you have created and added to the corresponding boards in your Workspaces and click on Add. Choose the value from the dropdown or click on Not set to configure the action.
Practical tip: If a Card is updated by email and the Board is "X" → set a deadline. Define the deadline during the configuration process.
3) Send notifications: The system will notify a user of your choice when a card is updated by email. Create a template for the notification, which is to be sent, and click on Save Message.
- In the To:/Cc: field → use the "add internal users" dropdown which opens a list of all users in your account including: Self, Owner, Watchers, Contributors, and Reporter. Select and add the user/s you wish to be notified. The "add custom field" option is used in the following case: if you have a custom field with an email address and the created card contains this custom field, the notification will be sent to this email address.
- The subject of the notification email contains the card ID and the text "was updated" by default. You can modify the title by clicking on add card fields and selecting your preferred field/s, or you can remove all fields and write a custom title.
- Email body: you can either keep the predefined text or modify it by deleting and creating a new text.
Practical tip: When a card is updated by email and the Board is “X”→ the system will automatically send an email notifying a user (e.g. the Owner).
4) Move the card: choose where to move the card. Select a board (1) from the dropdown and a position (2) from the board minimap (you can select a cell or an entire column/swimlane by clicking on its name).
Practical tip: When the card is updated by email and the Board is "X" → move the card to the "Follow up" column on the same board.
This option is very useful for creating an email tracking scenario on the Kanban board.
5) Invoke web service:
Click on Add new action to add a call to external web service → click on Not Set to configure the parameters.
You can configure the following options:
- Name – a human-readable identifier for the web service call
- URL – the address of the endpoint service
- Method – which HTTP method should be used for the call (available options are POST, GET, HEAD, PUT, DELETE, OPTIONS, PATCH)
- Authentication – NONE or BASIC authentication supported for the moment
- HTTP Body – Whether you want to send the payload as raw JSON-encoded values, directly in the HTTP body
- Parameters – parameters to be sent to the endpoint service
- Headers – custom headers to be sent to the endpoint service
To send the parameters in the body of the web service call → activate the checkbox.
Additionally, the POST, PUT, DELETE, and PATCH requests send an additional parameter – “kanbanize_payload” that contains information about the card that has been created or moved. The payload is in the following format:
{
“trigger” : “taskCreated”,
“timestamp” : “2015-03-04T14:19:38+00:00”,
“card” : {
“taskid” : “35156”,
“title” : “”,
“description” : “”,
“tcolor” : “#34a97b”,
“priority” : “Average”,
“size” : null,
“owner” : “testAdmin”,
“deadline” : null,
“typeName” : “”,
“tags” : “”,
“extLink” : “”,
“reporter” : “testAdmin”,
“createdAt” : “2015-03-04 14:19:33”,
“columnname” : “Requested”,
“lanename” : “Default Swimlane”,
“boardName” : “my board”,
“customFields” : [
],
“boardid” : “131”
}
}
When the payload is received by the endpoint, the content of “kanbanize_payload” can be parsed and the external system can then perform the required actions.
Click on the green plus sign to add a parameter. Select a field you wish to set as a parameter → click on Apply.
When you have configured your parameters, use the Test Settings button to send a pre-scanned request for testing and debugging purposes only.
Click on Save Service to save the configuration. Learn more in our API documentation.
To enable the rule → click on the Save button at the lower right corner of the configuration panel. Click on the red x-sign to cancel the creation of the rule.
Read more to find out how you can use the "Card Updated By Email" business rule for "Email Tracking" on the Board.
3. Practical Examples of Using the ‘Card Is Updated by Email’ Rule
This rule comes in handy when sending and receiving updates on cards through email and you would like to perform a specific action whenever a user replies to a card via email.
In a customer support/service scenario, a common usage for this rule would be to move a card from the 'waiting on customer' column to the 'follow up' column whenever an end user sends a response to an already existing service request.
Note that this scenario would require an email integrated user to be configured before that.
In addition, you can configure any other actions that you would like to be triggered, e.g. send a notification to a group of users or invoke a web service call to post a message in an external application (e.g. MS Teams).