Discourse Workflows

It appears to be Discourse Workflows’ own JavaScript expression system, evaluated server-side in a sandbox rather than a separate templating language such as Liquid or Handlebars.

So, for example:

={{ $json.topic.title.toLowerCase() }}

works because the contents of {{ ... }} are evaluated as JavaScript, and toLowerCase() is the normal JavaScript string method.

The implementation is in plugins/discourse-workflows/lib/discourse_workflows/expression_resolver.rb; it exposes workflow-specific globals such as $json, $input, $itemIndex, $trigger, $execution, and $().

The syntax and concepts are quite n8n-like. There is actually an explicit n8n reference elsewhere in the Workflows source:

the oneboxed commit below added the merge-node combine behavior and includes a test described as:

defaults clash handling to add_suffix (matches n8n position combine)

So there is evidence that parts of Workflows deliberately match n8n behavior, although I couldn’t find anything explicitly saying that the expression language itself is copied from or based on n8n. I’d therefore describe it as sandboxed JavaScript expressions provided by Discourse Workflows, with some n8n-like conventions.

3 Likes