WeeDB Key Value Remove

Remove WeeDB KeyValue

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, removalResult will be the outcome of removing the specified key.
  • If "Search Keys" is chosen, removalResult will be the outcome of removing all keys matching the provided pattern.

Dependencies

  • WeeDB Instance: Requires access to a WeeDB database.
  • Credentials: Must provide valid weeDBConnection credentials with a databaseId.
  • 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 weeDBConnection credentials are correct and that the database ID is valid.
  • 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

Discussion