Directus (flagbit) icon

Directus (flagbit)

Consume Directus API

Utility → Get a Random String

AI-generated

Overview

This node generates a random string of a specified length. It is useful in scenarios where unique identifiers, tokens, or random data are needed, such as creating passwords, session IDs, or random keys for testing purposes.

Use Case Examples

  1. Generating a 20-character random string for a password reset token.
  2. Creating a unique identifier for a new user session.

Properties

Name Meaning
Additional Fields Collection of optional fields to customize the random string generation.

Output

JSON

  • randomString - The generated random string of the specified length.

Troubleshooting

  • If the length is not specified or is less than 1, the node may throw an error or generate a default length string. Ensure the length is a positive integer.
  • If the node fails to generate a string, check for any internal errors or misconfigurations in the node setup.

Discussion