Use mustache templating!

Ever want to let your users write emails/texts with custom data? Look no further than mustache!

Setting up mustache is easy in retool.

First, include the mustache library in your organization’s custom libraries

Then, create a text box where users can enter a template:

Pro-tip, you can store the default value of the template in a transformer to make it easier to edit than the tiny tiny window by default.

Next, create a JS query to parse the template:

Note: you will need to use alternative tags as Retool uses the {{}} natively.



This is great, Alex. Thanks for sharing.

Just curious. What service do you use to actually send the email? How do you have it set up?