Overview
The WeeDB Key Value Get node allows you to retrieve data from a WeeDB key-value store within your n8n workflows. You can either fetch the value for a specific key or search for multiple keys using a regular expression pattern. This node is useful in scenarios where you need to access configuration values, user data, or any other information stored in WeeDB during workflow execution.
Practical examples:
- Retrieve a user's profile by their unique key.
- Search and return all keys matching a certain pattern (e.g., all keys starting with "user_").
- Fetch application settings or secrets stored in WeeDB.
Properties
| Display Name | Type | Meaning |
|---|---|---|
| Single or All | options | Choose between fetching a single value by key ("Single") or searching for keys by regex ("Search Keys"). |
| Key | string | The key to fetch if "Single" is selected, or the regex pattern to search keys if "Search Keys" is selected. |
Output
- The output is a JSON object with a single field:
item: Contains the result of the operation.- If "Single" is selected,
itemwill be the value associated with the specified key (or possiblynullif not found). - If "Search Keys" is selected,
itemwill contain the results of the key search (the structure depends on the underlying WeeDB implementation, typically an array of matching keys or key-value pairs).
- If "Single" is selected,
Example output (for "Single"):
{
"item": "value_of_the_key"
}
Example output (for "Search Keys"):
{
"item": [
{"key": "user_1", "value": "Alice"},
{"key": "user_2", "value": "Bob"}
]
}
(Actual structure may vary depending on WeeDB's searchKeys method.)
Dependencies
- WeeDB: Requires access to a WeeDB database instance.
- Credentials: Needs a configured
weeDBConnectioncredential in n8n, which must include a validdatabaseId.
Troubleshooting
Failed to initialize WeeDB:
- Cause: The node could not connect to the WeeDB instance, possibly due to incorrect credentials or missing database ID.
- Resolution: Check that your
weeDBConnectioncredential is set up correctly and that thedatabaseIdis valid.
No value returned:
- Cause: The specified key does not exist, or the regex pattern did not match any keys.
- Resolution: Verify the key or pattern you are using.
Invalid regex pattern (when using "Search Keys"):
- Cause: The provided pattern is not a valid regular expression.
- Resolution: Ensure your pattern is a valid regex supported by WeeDB.
Links and References
- n8n Documentation
- WeeDB documentation (if available; check your organization's resources or contact the developer)