How to create dynamic messages using your column names as variables

Lido's STRINGTEMPLATE formula allows you to merge your spreadsheet data into text: create custom emails, calendar events, PDFs, and more!

One of the most useful features of Lido is the ability to easily create templates for your data that can then be reused in many different scenarios, such as sending emails, creating calendar events, or filling out PDF templates. STRINGTEMPLATE is the formula that allows you to merge your templates and data right in your spreadsheet.

How to use STRINGTEMPLATE

We'll demonstrate how to use STRINGTEMPLATE using this example customer data:

First, we need to create our template. To keep it separate from our data, it's easiest to do this in a new worksheet. Click the plus button at the top-left of the page, and start typing your template in one of the cells.

If you type an open square bracket [ while editing your template, a list of table columns in your file will appear. You can select one, and Lido will insert [@column_name]at that place in your template. These are places in the template that you'd like to replace with values in that column. In our example, we want the customer's name and amount due to be inserted in the message:

(hint: to go to a new line when editing a cell, press Ctrl- or Cmd-Enter)

Now we can insert our STRINGTEMPLATE formula. Go back to your data table and type =STRINGTEMPLATE in the second cell next to your data. The only argument we need is the cell containing our template. You can either type this manually, or click the worksheet you just made and click on the cell.

One last thing: we need to anchor the cell so that it isn't changed as the column expands. By default, the behavior for columns is to increase the cell references by one row for each row in the table. To anchor the cell, just type a $before the letter and number of the cell reference.

And you're done! Now you can use this message in any of Lido's output formulas. Try out SENDGMAIL, SENDOUTLOOK, ADDCALENDAREVENT, or CREATEPDF!