Auto populate emails
Asked by Rosanne Avila:

Hello,  
Is there anyway to have trello auto populate emails for mortgage? Buyer. seller, property address, etc?


Answers:
author: milynnus
body: [@Rosanne Avila](/t5/user/viewprofilepage/user-id/4101657) re: my earlier self correction about Butler email.

Here's what I have been able to do with Butler "collect all cards" and then invoking the email to send. The email_trigger checklist is created in another board and it is removed at the end. The trigger is when there is more than 1 card in the "Ready to Send" list.

```
when list "Ready to Send" has more than 1 cards, find a card titled "Trigger Email" in list "Address Book" on board "Trigger Master", collect all cards in list "Ready to Send" into links in checklist "email_trigger" using pattern "[{cardname}]({cardlink})", for each card linked from an item in checklist "email_trigger", send an email notification to "{{%Email}}" with subject "{{%Property Address}}" and message "Dear {{%First Name}} {{%Last Name}}\n\nStatus : {{%Status}}\n\nEnd of email", find a card with link "{foundcardlink}", and remove the "email_trigger" checklist from the card
```

If you have lots of email to send, an SMTP approach may be better.


author: milynnus
body: [@Rosanne Avila](/t5/user/viewprofilepage/user-id/4101657) Correction : for paid account, Butler email is available which suggest that if you can collect all cards as links (that you want to send emai) and you can structure your emails if you can have access to all the CF to construct the email. The Butler Email is under "Content" category.

[@Rosanne Avila](/t5/user/viewprofilepage/user-id/4101657) Butler email is hidden behind Butler Calendar and Board Button. It can be used to send reports using a report variable.such as {$email_list}. However, it is difficult to extract this for further automation. In this post ["A Powerful Combination"](https://community.atlassian.com/t5/Trello-discussions/A-Powerful-Combination/td-p/1479754) , I illustrated how I can the report variable and Butler Http Request to do more with the data in the report variable.

For your requirement, I have a prototype :

```
every day, create a report in variable "email_list" with all cards in list "Ready to Send" using pattern "{\"first_name\": \"{{%First Name}}\" , \"last_name\" : \"{{%Last Name}}\", \"email\" : \"{{%Email}}\", \"address\" : \"{{%Property Address}}\", \"status\" : \"{{%Status}}\"}", and post to url "https://29722.wayscript.io/smtp?user=None" with payload "{\"email_list\" : \"{$email_list}\"}"
```

It is processed by an endpoint (see inserted pic). The endpoint translates the payload into a list and this list is processed in a loop for each email details into an SMTP module.

I hope to make this generic so that Trello users can use it with their own SMTP hence in the URL there is a query parameter ?user=None at this moment.

![Screen Shot 2020-09-28 at 11.33.36 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/111933iCF53BD164E1364C9/image-size/large?v=v2&px=999 "Screen Shot 2020-09-28 at 11.33.36 AM.png")![Screen Shot 2020-09-28 at 11.03.22 AM.png](https://community.atlassian.com/t5/image/serverpage/image-id/111932iE47D71EB1988FBEA/image-size/large?v=v2&px=999 "Screen Shot 2020-09-28 at 11.03.22 AM.png")


author: Iain Dooley
body: [@Rosanne Avila](/t5/user/viewprofilepage/user-id/4101657) There's no native way to do this in Trello, however I have created similar systems for clients using a combination of Butler automation and my BenkoDesk product:

<http://www.benkodesk.com/>

Basically you can post a comment to a card like:

```
@to {{%First Name}} {{%Last Name}} {{%Email}}

Hi {{%First Name}},

Your purchase for the address:

{{%Property Address}}

is at stage BLAH BLAH BLAH.
```

When a reply from the person is received it will go back to the Trello card as a comment, and you can conduct the conversation from there.

Note that you can use something like the Crmble power up in conjunction with this to manage your customer data within Trello, they just released "custom fields", too. However you can't access Crmble variable data from Butler, instead you'd need to use direct API automation.

When I do this for clients I use the Trellinator framework I created for automating Trello with Google Apps Script:

<https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Introducing-Trellinator-Automate-Trello-with-Google-Apps-Script/ba-p/925271>

comments: author: milynnus
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) went to investigate this.

```
However you can't access Crmble variable data from Butler, instead you'd need to use direct API automation.
```

found out that it is now in plugin_data

```
[{'id': '5f7161bd14c4ef5491508680', 'idPlugin': '5e5e8b4b55a4ea5fedc0dafa', 'scope': 'card', 'idModel': '5f7161bcc8394e1fcd771838', 'value': '{"CRMBLE_CARD_CONTACT":{"crmbleFieldsValues":[{"id":"firstName","value":"Gimoteo"},{"id":"lastName","value":""},{"id":"phone","value":""},{"id":"email","value":""},{"id":"company","value":""},{"id":"jobTitle","value":"Apps Square S.L."},{"id":"dateCreated"},{"id":"origin"}],"googleUrls":[],"googleDrive":false,"dateCreated":"2020-09-28T04:08:28.791Z","dateLastUpdate":"2020-09-28T04:08:28.791Z","trelloUrl":"https://trello.com/c/jJfLHI23","trelloCardId":"5f7161bcc8394e1fcd771838"}}', 'access': 'shared'}]
```

It means that with Butler Http Request to an endpoint, you can make the CRMBLE variables for a deal available to Butler in the form, say, httpresponse.firstName and you get the value "Gimoteo".

I did the same for Typeform. The implementation there uses an attachment.


author: Iain Dooley
body: [@milynnus](/t5/user/viewprofilepage/user-id/3947182) oh that's interesting, I knew it was in pluginData (that's how I implemented the @crmble command in BenkoDesk <https://community.atlassian.com/t5/Marketplace-Apps-Integrations/How-to-send-emails-directly-from-Trello-to-your-Crmble-contacts/ba-p/1418295>) but didn't put 2 and 2 together that you could fetch that data from the endpoint using Butler and then use that data as variables from within your Butler commands.


author: milynnus
body: [@Iain Dooley](/t5/user/viewprofilepage/user-id/1416112) just completed the module. It creates variables in the format {httpresponse.keyname} and it includes dealvalue and user added variables except that they do not have any meaningful key name e.g. it has the form like httpresponse._95d9 for

```
"_95d9": 4578
```


Tags: automation

email