Sure, I’ll try to elaborate a bit better.
So I’ve been working on a script (Help - adding to Jira) to add items to Jira. I’d like to pass the title of the draft in as the issue summary, and the body in as the issue description. So ideally I’d like to do something like this:
var summary = draft.title
var description = draft.body
The behaviour of the above is ‘summary’ will have a value populated from the title, but ‘description’ will be undefined.
To get around it, I’m currently adding a step in the action before the script gets run to copy the [[body]] to the clipboard, then declaring description with
var description = app.getClipboard();
So, in a way, I am using the template engine for this purpose, but it just feels kludgy to me to pass the data to the script through the clipboard. I guess what I’m getting it, is, is there a way to directly use template tags within a script itself?