core / transform / schema v1
Collection
A durable list that grows across runs: collect entries (giveaway sign-ups, a waitlist, a queue), block duplicates atomically, then list, count, pick a random (or bonus-weighted) winner, remove or clear them. Scoped to you; optional expiry and size cap.
Prerequisites
No connection prerequisite is declared for this node.
Parameters
| Parameter | Type | Description |
|---|---|---|
Operationoperation | select Required | Add appends (optionally several at once, see Quantity) · Add if new blocks duplicates, ATOMICALLY (its {{added}} tells you if it was new, perfect for “already joined?”, safe under concurrent clicks) · Has checks membership · List/Count read · Random draws a winner (or N) with equal odds · Weighted random draws with odds proportional to bonus entries · Remove/Clear delete. Options: Add: append an entry (add), Add if new: skip duplicates (add_unique), Has: is this value already in it? (has), List: get all entries (list), Count: how many (count), Random. Pick a winner (or N) (random), Weighted random: odds by bonus entries (weighted_random), Remove. Delete an entry (remove), Clear: empty the collection (clear) |
Collection keykey | store_key Required | Which collection to work on. The same key always points to the same list, so scope it with a variable, e.g. giveaway:{{channel_id}}. |
Valuevalue | text Conditionally required | The entry to add / check / remove, usually a variable like {{user_id}}. Objects are stored as JSON and come back typed.Field conditions{
"visible": {
"key": "operation",
"values": [
"add",
"add_unique",
"has",
"remove"
]
},
"required": {
"key": "operation",
"values": [
"add",
"add_unique",
"has",
"remove"
]
}
} |
Quantityquantity | text Optional | For Add: push this many copies of Value in one go (e.g. {{option_bonus_entries}} bonus raffle tickets), which also become that value's WEIGHT for Weighted random. For Remove: the count used only when "How many to remove" below is set to "Remove exactly N". Empty/blank = 1.Field conditions{
"visible": {
"key": "operation",
"values": [
"add",
"remove"
]
}
} |
How many to picksampleSize | text Optional | Only for Random/Weighted random. 1 (default) picks a single winner as {{result}}; a higher number draws that many distinct winners as a list. The SAME winner never appears twice in one draw. Great for multi-winner giveaways.Field conditions{
"visible": {
"key": "operation",
"values": [
"random",
"weighted_random"
]
}
} |
How many to removeremoveMode | select Optional | "Remove every match" deletes ALL entries equal to Value. The original (and still default) behavior. "Remove only the first" deletes a single occurrence. "Remove exactly N" deletes the Quantity above, oldest first. Handy when Value can legitimately appear more than once and you only want to undo one Add. Options: Remove every match (default) (all), Remove only the first match (one), Remove exactly N (see Quantity) (quantity) Field conditions{
"visible": {
"key": "operation",
"values": [
"remove"
]
}
} |
Keep last N (optional)max | text Optional | Only for Add / Add if new. Cap the collection to the most recent N entries (older ones drop off). Empty = unlimited.Field conditions{
"visible": {
"key": "operation",
"values": [
"add",
"add_unique"
]
}
} |
Expire after (seconds, optional)ttlSeconds | text Optional | Only for Add / Add if new. The whole collection auto-deletes this many seconds after the last add. Great for time-boxed giveaways. Empty = keeps forever.Field conditions{
"visible": {
"key": "operation",
"values": [
"add",
"add_unique"
]
}
} |
Also publish asoutputAs | text Optional | Give this node's {{result}} output a name of your own (e.g. "winners"), so downstream nodes can reference {{winners}} directly. Handy when another node also publishes {{result}}, Noria would otherwise silently use whichever one ran last. {{result}} keeps working unchanged either way. |
Inputs and outputs
Inputs
execute- Execute (input)
Outputs
done- Done (output)result- Result (output)count- Count (output)error- Error (output)added- Added (Add if new) (output)exists- Exists (Has) (output)
Output data schema
[
{
"key": "result",
"type": "any",
"label": "Result",
"description": "The added value, the full list, the count, or the drawn winner. Depends on the operation."
},
{
"key": "count",
"type": "number",
"label": "Count",
"description": "How many entries the collection holds."
},
{
"key": "added",
"type": "boolean",
"label": "Added?",
"description": "Add if new: true when the entry was newly added (false = already there).",
"optional": true
},
{
"key": "exists",
"type": "boolean",
"label": "Exists?",
"description": "Has: true when the value is already in the collection.",
"optional": true
},
{
"key": "storage_key",
"type": "storage.list.key",
"label": "Saved item key",
"bindingRole": "selected_target",
"description": "The exact resolved key used by this step, in the current account. Reuse it to read, update or delete the same saved item."
},
{
"key": "storage_kind",
"type": "string",
"label": "Storage structure",
"bindingRole": "current_context",
"description": "The storage structure expected by this step: value, object, list or zset.",
"example": "list"
}
]Examples and troubleshooting have not yet been reviewed for this contract.
Version and compatibility
This reference follows the current authoring contract. Existing workflows retain their saved node revisions.
Contract identifier
4080d532b44c9fba9a7860a747f3efc5f14e76b7b7f32d68fee8e2bdc87c77e3