Get Variable
AI-generatedOverview
This node, named Config Store, allows users to store, retrieve, update, and delete global configuration variables across workflows in n8n. It supports operations such as setting a single variable, getting a variable, setting multiple variables at once, retrieving all variables, deleting a variable, and clearing all stored variables. This is useful for managing environment-specific settings, API keys, or other configuration data that needs to be shared across multiple workflows.
Use Case Examples
- Store an API key as a variable and retrieve it in different workflows.
- Set multiple configuration variables at once for a new environment setup.
- Delete or clear configuration variables when they are no longer needed.
Properties
| Name | Meaning |
|---|---|
| Variable Name | The name of the variable to get, set, or delete. It is recommended to use uppercase for convention. |
| Options | Additional options for the operation, including whether the variable value should be masked in logs (secure) and whether to include the variable in the output data (addToOutput). |
Output
JSON
_configStoreoperation- The operation performed (e.g., get, set, delete).variable- The variable name involved in the operation.value- The variable value, masked if marked as secure.success- Indicates if the operation was successful.found- Indicates if the variable was found (for get operations).error- Error message if the variable was not found.variables- An object containing multiple variables and their values (for setMultiple and getAll operations).count- The count of variables affected or retrieved.deleted- Indicates if a variable was deleted.cleared- The number of variables cleared in a clear operation.
Troubleshooting
- If a variable is not found during a get operation, the output will indicate 'Variable not found' in the error field. Ensure the variable name is correct and has been set previously.
- When using the secure option, the actual value is masked in the output and logs as '***SECURE***'. Make sure to disable this option if you need to see the actual value in the output.
- If variables are not appearing in the output, check that the 'Add to Output' option is enabled.
Links
- n8n Config Store Node Documentation - Official documentation for the Config Store node in n8n.