Directus (denkhaus) icon

Directus (denkhaus)

Consume Directus API

Overview

This node provides a utility function to generate a random string of a specified length. It is useful in scenarios where you need unique identifiers, temporary passwords, tokens, or any situation requiring a random alphanumeric string within your n8n workflows.

Practical examples:

  • Generating a random password for a new user account.
  • Creating a unique token for API requests.
  • Producing random reference codes for tracking purposes.

Properties

Name Meaning
Additional Fields A collection of optional settings for the operation.
Length (Within "Additional Fields") The desired length of the generated random string. Minimum value is 1.

Output

The node outputs a JSON object containing the generated random string. The structure typically looks like:

{
  "randomString": "<generated_string>"
}
  • randomString: The randomly generated string of the specified length.

Dependencies

  • No external services or API keys are required.
  • No special n8n configuration or environment variables are needed.

Troubleshooting

Common issues:

  • If the "Length" property is not set or is less than 1, the node may throw an error or return an empty string.
  • Providing non-numeric values for "Length" could result in validation errors.

Error messages and resolutions:

  • "Length must be at least 1": Ensure that the "Length" field is set to a number greater than or equal to 1.
  • "Invalid input type for Length": Make sure to enter a numeric value.

Links and References

Discussion