All Collections
Automate tasks and emails in Trello
Save email details to Trello Custom Fields
Save email details to Trello Custom Fields

Use Trello Automation to extract details from an email to automate tasks in Trello using content from the email.

Mark Fowles avatar
Written by Mark Fowles
Updated over a week ago

Being able to receive emails in Trello is useful - you can read the email, collaborate and reply. But you might want to extract specific details from an email so that the information can be used in other areas of Trello. For instance, saving the body of an email as the card description so that it is the first thing you see when you open the card. Or save the contact email address to a custom field so that it can be used by another Power-Up to integrate to your CRM.

With the help of Trello Automation, you can automate these and many other tasks.

Here's an example

Let's say you receive a simple email like this:

Using SendBoard, the email would arrive in Trello as a new card. The detail would all be in a comment like this:

You can use Trello Automation to extract specific details from the comment, and add it to fields on the Trello card, so that the card will look like this:

A few things to note:

  • The card description shows the Contact name "Jane Smith" as well as the email body "Hello there..."

  • There is a custom field with the contact's email address.

  • A second custom field contains the contact's name.

  • There's also a custom field for the status of the card - set to 'Open'.

Setting up your custom fields

Before using Butler to automate anything, you'll need to first set up your board with the required fields. Ensure that you've added the 'Custom Fields' Power-Up and then configure the following fields.

  • Email  is a 'Text' field

  • Contact  is a 'Text' field

  • Status  is a 'Checkbox' field with Open and Closed as options.

These are just examples. You can use whatever names and options make sense for your board.

Creating an automation rule

If you're new to Trello Automation, you might want to first check out Trello’s Introduction to automations

Understanding Butler Patterns and Wildcards

The most difficult thing to understand, is how to get specific details out of the email. You can achieve this with Butler through 'Pattern matching and wildcards' - creating a trigger that searches through a comment for information that matches a specific pattern. And because all SendBoard emails are added as comments to the card, Butler can access the email through the comment. 

For any SendBoard email, the pattern to search through a comment looks like this:

📩 [Email]({*}) From **{*}<{*}>**{*}------{*}------{*}To: {*}

Wherever you see {*} , it is a 'wildcard' that represents any number of text characters. The smart thing about wildcards in Butler triggers, is that each wildcard is made available to you within actions in your Butler rule. Because there are multiple wildcards, they are referred to by the sequence in which they appear. 

So in the above example, the wildcards each represent a different part of the email:

  • wildcard1 is the URL to access the full email thread.

  • wildcard2 is the Contact Name.

  • wildcard3  is the From Email Address.

  • wildcard5 is the Email Content.

  • wildcard7  is the To Email Address.

Wildcards 4 and 6 are just used in the pattern, and won't include any useful detail.

Creating a Rule Trigger

Now that you have the pattern to detect a SendBoard email, you can create a trigger for your rule.

  1. The trigger needs to fire whenever a new comment is posted, so select 'Card Content' for the trigger. 

  2. Make sure 'Advanced' is selected.

  3. Choose to fire the trigger whenever a new comment is posted.

  4. But only if the comment contains the pattern above "📩 [Email] ({*}) From...".

  5. And only if the description of the card is currently empty. We only want this trigger to fire for the first email received on the card.

  6. And only if the comment is posted by "@sendboardbot***". You should select the SendBoard bot on your board here to ensure that the trigger is only fired for incoming emails. Outgoing emails will be posted by the Trello user who sent the email.

Define actions for your rule

With the trigger in place, and wildcards ready to be referenced, the actions are quite straight forward.

  1. Add the Contact Name and Email Content wildcards to the card Description. You can add other wildcards here and play with the formatting yourself. 

  2. Set the Contact custom field to the Contact Name wildcard.

  3. Set the Email custom field to the From Email Address wildcard.

  4. Set the Status custom field to Open. This is not a wildcard, but we can set the status to open because we know it's a brand new email. You could have similar rules in place to change the status again when a reply is sent.

That's it. After saving your rule, the above actions will automatically run each time a new email comes in.

And with just a few changes to the rule, you can configure a wide range of automated tasks to be performed each time an email is sent or received on your board.

For example, to extract the email address from an email that does not have a sender’s name, try this:

when a comment starting with “📩 [Email]({*}) From { }*{}------{}------{}To: {}” is posted to a card by @sendboardbot1234, set custom field “Email” to “{wildcard2}”

More useful examples

Did this answer your question?