I have a google doc with placeholders in it that need to be filled with actual data using Apps Script. e.g. of the Google Doc content:
This is template text. Replace this {TOKEN1} and this {TOKEN2} and this {TOKEN3} as well using Google Apps Script.
The requirement is to replace the tokens and repeat this paragraph multiple times. Each time the paragraph is replaced, a different set of values needs to be placed in the paragraph. The formatting should not be broken, in this case, the tokens were in bold hence the values also should be in bold as below:
This is template text. Replace this FOO1 and this BAR1 and this FUN1 as well using Google Apps Script.
This is template text. Replace this FOO2 and this BAR2 and this FUN2 as well using Google Apps Script.
This is template text. Replace this FOO3 and this BAR3 and this FUN3 as well using Google Apps Script.
Could you let me know the Apps script approach to achieve this functionality?