Automation via email

Hi, we are trying to have a card moved to another column based on keywords in an email. We have it setup so a card is created based on an email using a rule in outlook. We would really like to be able to have it moved to a column but need to have it use the job number to identify the card. Is there a way that trello can receive an email and move a card based on the job number in the card and in the subject of an email?
Capture

You can use a butler rule with a custom {get} action to a web service that has a token back into your board to perform actions as a user. Meaning, the butler rule is “When a card is created in this list…” you then:

I tested this really quick and created a php file called “card.php.” I put it on up on my server. Here is the code:

<?php
// Get the query string
$query_string = $_SERVER['QUERY_STRING'];
// Define the filename for the output file
$filename = __DIR__ . '/output.txt'; // Assumes the PHP script is located in the same directory as the output file
// Write the query string to the output file
file_put_contents($filename, $query_string);
?>

Then I made the butler rule, for when a card is created on list “Backlog”, URL GET, https://server/card.php?id={cardid}&name={cardname}.

I then created a card on my “Backlog” and on my web server I see an output.txt file with:

id=QxCtyp09mM&name=Test&card&for&Bob

So you get the card Id and the card name in the query string, you can then analyze the name for which operation to perform, then use the ID to change the list using the REST API to update the card:

https://developer.atlassian.com/cloud/trello/rest/api-group-cards/#api-cards-id-put

I have not tried this last part, and it would require a token on your server to perform the work but you technically would have all the information you need to make this happen as needed, and fully customizable with code.

1 Like