Skip to content

Remove from Store

The Remove from Store node removes an item from a named user data store for the current user.

Configuration

PropertyTypeDefaultDescription
storeNamestring--Required. The name of the data store (e.g., favorites, wishlist). Only lowercase letters, numbers, and underscores are allowed.
itemIdstring--The item ID to remove. If empty, the node extracts id or item_id from the input data.

Input

Accepts any data type. If itemId is not configured, the node looks for id or item_id in the input.

Output

Returns the input data with _removed: true added on success.

json
{
  "id": 42,
  "_removed": true
}

If the user is not logged in, the input is returned unchanged (no error).

How It Works

  1. Gets the current user ID. Returns input unchanged if not logged in.
  2. Sanitizes the store name.
  3. Resolves the item ID from config or input.
  4. Executes DELETE FROM nexus_user_stores WHERE user_id = ? AND store_name = ? AND item_id = ?.
  5. Removing a non-existent item is a no-op (no error).

Example Use Cases

Remove from favorites

storeName: "favorites"
itemId: "`{ {input.id}}`"

Unfavorite button action

Context --> Remove from Store (storeName: "favorites") --> Output

Clear a wishlist item

Context --> Require Auth --> Remove from Store (storeName: "wishlist") --> Output

TIP

Pair with Add to Store for toggle behavior.