usewaypoint / email-builder-js

A free and open-source block-based email template builder.
https://emailbuilderjs.com
MIT License
307 stars 92 forks source link

Placeholder/variable in email template #118

Closed mcfung closed 1 week ago

mcfung commented 1 week ago

Hi, thank you for such a great library.

May I ask how can I implement placeholder/variable in the email template? My use case is to create a welcome email template, but the name of the user is a variable. So that when I send the welcome email, I can insert the name of the user for each recipient.

Currently one of the possible way is that I can put something like {{userName}} in the content section, and then replace it right before send. Am I correct?

Thanks in advance.

jordanisip commented 1 week ago

Hi Mike, at the moment EmailBuilder.js does not support variables within content inputs and we do not have plans to support this in the forseeable future.

Your instincts are correct – we recommend looking into processing blocks with LiquidJS to support those variables (eg. {{username}}). If you are curious, this is exactly what we do on our 'pro' version of our template builder on Waypoint. You are welcome to create a free trial workspace to poke around :)

mcfung commented 1 week ago

Thank you very much!