Data Converter
Actions49
- Base64 Actions
- Binary Actions
- Encoding Actions
- Format Actions
- HTML Actions
- String Actions
Overview
The node performs various string transformations and data conversions related to text formatting, encoding, and case conversion. Specifically for the "String" resource with the "Snake Case" operation, it converts input text into snake_case format, which means transforming the text so that words are lowercase and separated by underscores (e.g., "firstName" becomes "first_name"). This is useful in scenarios where consistent naming conventions are required, such as generating variable names, file names, or database fields that follow snake_case style.
Practical examples:
- Converting user input or API response keys to snake_case for compatibility with certain programming languages or databases.
- Normalizing filenames or identifiers to a standard format.
- Preparing strings for use in URLs or configuration files that prefer snake_case.
Properties
| Name | Meaning |
|---|---|
| Input Data | The text string to convert to snake_case. |
| Binary Property Name | (Optional) Name of the binary property for output if binary output is enabled. |
Note: For this specific operation, only "Input Data" is required and used.
Output
The output JSON contains a field named result holding the transformed string in snake_case format.
Example output JSON:
{
"result": "converted_snake_case_text"
}
If the node supports binary output for other operations, the binary data would be attached under the specified binary property name, but for the "toSnakeCase" operation, output is textual.
Dependencies
- No external services or API keys are required.
- The node uses internal utility functions for string manipulation.
- No special environment variables or n8n configurations are necessary.
Troubleshooting
- Empty or invalid input: If the input string is empty or not provided, the output will be an empty string or may cause unexpected results. Ensure the "Input Data" property is correctly set.
- Unsupported characters: The transformation handles typical alphanumeric and underscore characters; unusual Unicode characters might not convert as expected.
- Error handling: If an error occurs during processing, the node will throw an error unless "Continue On Fail" is enabled, in which case the error message will be included in the output JSON under the
errorfield.