Merge tags
Merge tags enable you to reference to dynamic data in your spreadsheet or the context data of the automated workflow you are building.
Last updated
Merge tags enable you to reference to dynamic data in your spreadsheet or the context data of the automated workflow you are building.
Last updated
Merge tags are used to refer to dynamic data in Logic Sheet automation. When you use merge tags in fields that accept merge tags, the app will "translate" them into their corresponding values when the workflow is being executed. For example, if you use the merge tag {{range B12}} in an email, the merge tag will be replaced by the value in cell B12 when the email is sent.
Merge tags are all wrapped in double curly braces as in {{merge tag}}. While some merge tags are static, like {{automation name}} and {{spreadsheet url}}, others can be dynamic as you can change them to refer to more specific values, like {{last row 3}} and {{last row 5 value}}.
Each time you edit an input where merge tags are allowed, you will see a preview of the merge tags used as shown in the above screenshot. This feature allows you to preview what the merge tags will look like when the workflow is being executed.
Merge tags like {{range A1}}, {{column A}}, and {{form values 1}} are dynamic. It means that you can change the values in the merge tags to refer to different data.
For example, in the merge tag {{range A1}}, you can change the value "A1" into "B10" to make the merge tag refer to the value in cell B10.
In {{form values 1}}, you can change the number 1 into 3 to make it {{form values 3}}, which will refer to the 3rd value of the form submission that was received.
Some merge tags only work with specific types of triggers. For example, the merge tags {{old value}} and {{new value}} only work with the trigger type "The spreadsheet is edited" because they only exist when there is an editing behavior.
Similarly, the merge tags {{form values}} and {{form values 1}} are only available in the "A form response is received" trigger, because these values cannot be found in other trigger types.
Please note that if you use a merge tag that is limited to one trigger type in a different trigger type, you may see an error message when setting up the automation.
The value of the range A1 of the worksheet you have selected. You can change the range to refer to any other cell such as {{range B10}} and {{range F9}}. Since this merge tag only returns one value, multi-cell ranges will only return the value of the first range. For example, {{range A2:B10}} will return the value of range A2.
Some inputs expect a range value, and if you use a merge tag that will return a value, you may encounter an error. For example, in the condition step, if you use a merge tag that represents a value in the input "When the value of cell" (which expects a cell range, you may see the following warning message.
In this case, you will need to change the merge tag to something that represents a cell range, like {{last row 4}}, {{edited range}}, use simply type a cell range without the merge tag, like A1, F5.
All values in column A(dynamic). You can use other values like {{column B}}, {{column G}} as well.
All values in row 1(dynamic). You can use other values like {{row 3}}, {{row 99}} as well.
The name of the sheet that was edited or set in the trigger step.
This merge tag will get the data in any range of the spreadsheet and combine them to a test separated by commas. You can use any combination of sheet names of ranges in your spreadsheet. The sheet name and the range are separated by ! in this merge tag. For example, the merge tag {{Sheet5!B2:C6}} will return the values combined in the range B2:C6 in the sheet Sheet 5.
This merge tag is especially useful when you want to check if a range contains a certain value in the conditions.
The name of the automation workflow you have set.
The URL of the spreadsheet that this automation belongs to.
The A1 notation of the first cell at the 1st column of the last row. Accordingly, {{last row 5}} returns the A1 notation of the cell at the 5th column of the last row.
This merge tag only refers to the cell name, not the value in the cell. For the value in the cell, use the {{last row 1 value}} merge tag.
In this example, {{last row 3}} will return "C3", whereas {{last row 3 value}} returns "Sam".
The value of the first cell at the 1st column of the last row. Accordingly, {{last row 5}} returns the value of the cell at the 5th column of the last row.
You can also use column names in the last row merge tags. For example, {{last row C values}} is equal to {{last row 3 value}}.
Available in the "A spreadsheet is edited" trigger only. This merge tag will return the old value of the cell that has been edited. If an empty cell was edited, this merge tag will return "undefined". For example, if cell A1 was edited from 10 to 100, this merge tag will return 10.
This merge tag, like merge tags that are only available in the "A spreadsheet is edited" trigger, cannot be previewed because their data is only available when the automation is being executed. But you will see a green text telling you the merge tag is valid when previewing it.
Available in the "A spreadsheet is edited" trigger only. This merge tag will return the new value of the cell that has been edited. For example, if cell A1 was edited from 10 to 100, this merge tag will return 100.
Available in the "A spreadsheet is edited" trigger only. This merge tag will return the email address of the user who edited the spreadsheet.
Available in the "A spreadsheet is edited" trigger only. This merge tag will return the cell that has been edited in an on-edit trigger. For example, if cell A1 was edited from 10 to 100, this merge tag will return the text "A1".
Available in the "A form response is received" trigger only. All values of the form submission that was received. Values are separated by commas.
Available in the "A spreadsheet is edited" trigger only. The first value (or the nth value if you set the number as n) of the form submission that was received.
In the above example, we are using a Google Form to receive feature requests. When the automation is triggered, {{form values 2}} will return the second value of the form response, or the Feature name, and {{form values 3}} will return the Description of the feature requested.
Available in the "A spreadsheet is edited" trigger only. The merge tag will return the value of the cell at column N in the same row where the automation is triggered.
Available in the "A spreadsheet is edited" trigger only. The merge tag will return the A1 notation of the cell at column N in the same row where the automation is triggered.
In the following example, if the automation was triggered by an edit in range B3, {{triggering row C value}} will be the value of range C3, or 1396. {{triggering row C}} will return the range name of C3.
{{current date}}
This merge tag will return the date at the time when the automation runs. The format is dd/mm/yyyy, like 7/3/2024.
{{current year}}
This merge tag will return the year at the time when the automation runs. The format is yyyy, like 2024.
{{current month}}
This merge tag will return the month at the time when the automation runs. The format is the full name of the month, like January, or August.
{{current weekday}}
This merge tag will return the weekday (day of the week) at the time when the automation runs. The format is the full name of the weekday, like Monday, or Sunday.