Templates with variables and links

I am emailing interviewees with set templates. We used to send these emails with fields written as “XXX” marking for the hiring staff to replace those “XXX” with the staff’s name, or other information that changes based on person.

I wanted to streamline this by using variable fields often seen in email merges on other platforms. I did this by using RegexReplace ie templates.regexreplace(“{{First Name}}”,name) This works to replace variables, however, doing so makes the template a strictly text field and strips away any links added to the template.

Please let me know if there is a better way of doing this, with multiple variables, and keeping links intact. Thanks!

Hi Lin,

What I have used in a doc for work (which mean I can unfortunately not share) is to use the compose column to create a text template. In this you can reference any column in the same table. The full CFL is also available so you can access information in any other table. I then use this column as the “content” in the email message.

This won’t work for us as we have over 100 different templates! Its not sustainable to use formulas as the templates. And because of the large number of templates, everyone needs to be able to easily add/remove/edit templates as needed. Which is the purpose of a dedicated templates table.

There are many, many ways to skin this cat.

You can move the compose column to a template table, use Format() to build the body/content of the mail. maybe even use a canvas column with a switchif() for different “types” of canvas column templates.

It all depends on what you mean with “variables”, how many there are and the frequency with which they are re-used across the various templates.

And of course, the template itself can also simply be a variable.

The issue isn’t with the replacing of variables. Using regexreplace works perfectly to replace our numerous variables ie
{{First Name}}, {{Last Name}}, {{Position}}, {{Age}}, etc. Some templates use multiple variables, some templates use none. They all appear in different places throughout the templates and is not predictable to use format to input these variables.

The issue arises with the links disappearing from the templates when using regexreplace for the variables.
If there are no links in the template, this system is perfect.

I am more wondering if there is a way to preserve links when a canvas (or even just a text column) is converted to be a strictly text column.

Edit: A part of this system is that (without links) we can create a template in 10 minutes by just typing what we want to send via a mass email merge without needing to change formulas. Thats what the variable placeholders are for. If we need to include links however, this stops working since the links get stripped.

Looks like I asked a question that was just recently asked and answered.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.