K
Docs
API ReferencePiecesSave Spark
📌

Save Spark

base.variableBase SetLogic

Creates or updates a named spark that holds a typed value — text, number, yes/no, list, or object. Update existing sparks in place: numbers use Add/Subtract/Multiply/Divide, text uses append/prepend, lists use Add to list / Prepend to list (single items or rows), booleans support toggle. The spark is then available everywhere downstream.

When to use this
  • Update existing sparks: numbers (+/−/×/÷), text (append/prepend), lists (Add to list / Prepend to list — e.g. {{item}}), booleans (toggle)
  • Empty text and list values are allowed
  • After this piece, {{sparkName}} is available in all downstream pieces

On the canvas

This is what Save Spark looks like when you place it on your flow. Each field below is something you configure in the inspector panel.

📌
Save Spark
base.variable
Logic
namerequired
e.g. score, greeting, isWinner
type
select
op
select
value
{{user.name}} or any value

Config fields

FieldTypeReqWhat it does
name
e.g. score, greeting, isWinner
textyesSpark name 🏷️
typeselectType
opselectOperation
value
{{user.name}} or any value
textValue 📦

Sparks this piece adds

After this piece runs, these values are available as sparks in every node downstream.

{{score}}stringA string spark you saved

Output ports

outputMoves on with the spark available (or updated)
📐

In TypeScript, this would be…

Not something you need to write — just a look at what Kitcord does for you.

TypeScript
let score = 0;
score += 10;           // number: Add
greeting = "Hello!";   // string: Set
isWinner = !isWinner;  // boolean: Toggle
tags.push("new-tag");  // array: append