Set Value
Set a constant value (string, number, boolean, or JSON object) to use in your workflow
Node Type
Action
Category
Data Translation
Icon
Settings
Overview
The Set Value node is a utility node that allows you to define and output a constant value of any type (string, number, boolean, array, or JSON object). This powerful tool enables you to set configuration values, default values, or constants in your workflows, making it perfect for providing static data to downstream nodes or establishing workflow parameters.
Key Features
- • Multi-Type Support: Handles strings, numbers, booleans, arrays, and JSON objects
- • JSON Parsing: Automatically parses valid JSON strings into objects
- • Type Preservation: Maintains the original data type of your input
- • Validation: Ensures values are not null or undefined
- • Template Support: Works with template variables for dynamic values
- • Universal Output: Provides consistent output format for any data type
Prerequisites
Data Requirements
Understanding of data types and value setting
Use Case Planning
Strategic planning for constant values
Technical Requirements
System capabilities needed
Node Configuration
Required Fields
value
The constant value to set. Can be a string, number, boolean, array, or JSON object. For JSON, provide a valid JSON string. The node will automatically parse JSON strings into objects.
Examples & Use Cases
String Configuration
Set a constant string value for configuration
{
"value": "Welcome to our service!"
}Sets a welcome message that can be used in emails, notifications, or other communications.
Numeric Default
Set a default numeric value
{
"value": 42
}Sets a default number that can be used for calculations, limits, or configuration values.
Boolean Flag
Set a boolean configuration flag
{
"value": true
}Sets a boolean flag that can control workflow behavior or feature toggles.
JSON Object Configuration
Set a complex configuration object
{
"value": {
"apiUrl": "https://api.example.com",
"timeout": 5000,
"retries": 3,
"features": {
"notifications": true,
"analytics": false
}
}
}Sets a complex configuration object with nested properties for API settings and feature flags.
Array of Options
Set an array of available options
{
"value": [
"option1",
"option2",
"option3"
]
}Sets an array of options that can be used for dropdowns, random selection, or iteration.
Best Practices
Do's
- • Use clear, descriptive values that are easy to understand
- • Validate JSON syntax when using complex objects
- • Use appropriate data types for your use case
- • Consider using template variables for dynamic values
- • Document the purpose of your constant values
- • Test with different data types to ensure proper parsing
Don'ts
- • Don't use null or undefined values
- • Avoid malformed JSON syntax
- • Don't use overly complex nested objects unless necessary
- • Avoid hardcoding sensitive information in values
- • Don't forget to validate JSON when using object types
- • Avoid using this node for values that should be dynamic
Troubleshooting
Common Issues
JSON Parsing Errors
Symptoms: Node fails with JSON parsing errors
Solution: Ensure your JSON syntax is valid. Use a JSON validator to check your syntax. Common issues include missing quotes around keys, trailing commas, or unescaped characters.
Null/Undefined Values
Symptoms: Node fails with null or undefined value errors
Solution: Ensure the value field is not empty and contains a valid value. The node requires a non-null, non-undefined value to function properly.
Type Mismatch
Symptoms: Downstream nodes receive unexpected data types
Solution: Verify that the value you're setting matches the expected type for downstream nodes. Use the appropriate data type (string, number, boolean, object, array) for your use case.
Template Variable Issues
Symptoms: Template variables not resolving correctly
Solution: Ensure template variables are properly formatted with double curly braces {{variableName}} and that the referenced variables exist in your workflow context.