Custom template filler

[string/Custom template filler]


Substitutes parameters into a template. Parameter placeholder's (token) start/end can be customized. Example:

  1. "Hello {#subject#}!"@0 is received via template

  2. {"subject":"world"}@0 is received via params

  3. "{#"@0 is received via token start

  4. "#}"@0 is received via token end

  5. "Hello world!"@0 is sent via filled


Input ports

  • template: string

    Receives the template string to replace parameters in. Example: "Hello {#subject#}!"

  • params: {string: any}

    Receives the parameters to replace in the template. Example: {"subject":"world"}

  • token start: string

    Receives the string that marks the start of the parameter placeholder (token) within the template. Example: "{#"

  • token end: string

    Receives the string that marks the end of the parameter placholder (token) within the template. Example: "#}"

Output ports

  • filled: string

    Sends the template string with replaced parameters. Example: "Hello world!"

  • error: {"error": string}

    Sends error in case any occurs during operation. Example: {"error": "Some error message"}

Last updated