Overview
The WeeDB Key Value Remove node allows you to remove entries from a WeeDB key-value database. You can either remove a single entry by specifying its key or remove multiple entries whose keys match a given pattern (using regex). This node is useful for workflows that need to clean up, delete, or manage data in a WeeDB instance, such as removing outdated cache entries, deleting user-specific data, or bulk-cleaning records based on naming conventions.
Example scenarios:
- Deleting a specific session token by its key.
- Removing all keys matching a certain prefix (e.g., "temp_*") after a batch process.
Properties
| Display Name | Type | Meaning |
|---|---|---|
| Single or All | options | Choose whether to remove a single key ("Single") or search and remove multiple keys by pattern ("Search Keys"). |
| Key | string | The key to remove if "Single" is selected, or the regex pattern to match keys if "Search Keys" is selected. |
Output
The node outputs a JSON object with an item field containing the result of the removal operation:
{
"item": <removalResult>
}
- If "Single" is chosen,
removalResultwill be the outcome of removing the specified key. - If "Search Keys" is chosen,
removalResultwill be the outcome of removing all keys matching the provided pattern.
Dependencies
- WeeDB Instance: Requires access to a WeeDB database.
- Credentials: Must provide valid
weeDBConnectioncredentials with adatabaseId. - n8n Configuration: Ensure the WeeDB credential is set up in n8n.
Troubleshooting
- Failed to initialize WeeDB:
- Error message:
Failed to initialize WeeDB - Resolution: Check that your
weeDBConnectioncredentials are correct and that the database ID is valid.
- Error message:
- No keys removed:
- If using "Search Keys", ensure your regex pattern matches existing keys.
- Invalid key or pattern:
- Make sure the "Key" property is correctly filled out according to the selected mode.
Links and References
- WeeDB Documentation (replace with actual link)
- n8n Credentials Documentation
- n8n Node Development Guide