Taskt SL icon

Taskt SL

Perform Taskt operations

Overview

This node allows users to execute a custom script with variable substitution capabilities. It is designed to perform operations where dynamic scripting is needed, and variables can be injected into the script before execution. This is useful in scenarios such as data transformation, templating, or preparing dynamic commands based on input data.

For example, you might use this node to run a script that generates personalized messages by replacing placeholders with actual values provided as variables.

Properties

Name Meaning
Script The script text to be executed. It can contain placeholders for variables to be replaced.
Variables A collection of key-value pairs where each key is a variable name and the value is what will replace it in the script.

Output

The node outputs an array of JSON objects, each representing the result of processing the script with the given variables. The output JSON structure corresponds to the transformed script after variable replacement.

If an error occurs during processing and the node is set to continue on failure, the output JSON will contain an error field with the error message.

No binary data output is produced by this node.

Dependencies

  • Requires an API authentication token credential (referred generically) to function.
  • Uses an external helper function replaceVariablesInScript from a bundled dependency to perform variable substitution within the script.

Troubleshooting

  • Common issues:

    • Errors in the script syntax or invalid variable references may cause failures.
    • Missing or incorrect variable names in the "Variables" property can lead to unexpected results or errors.
    • If the node is not configured with the required API authentication token, it will fail to execute.
  • Error messages:

    • Errors thrown during script processing will include the error message describing the issue.
    • To handle errors gracefully, enable the "Continue On Fail" option; otherwise, the node will stop execution on the first error.

Links and References

  • No external links are provided in the source code. For more information on scripting and variable substitution, refer to general JavaScript templating resources or n8n documentation on custom scripting nodes.

Discussion