Skip to main content

Store Variable Action

The store_variable action persists a value to the Datastore during the automation chain. Stored values are scoped to your organization and can be read by future webhook requests via template interpolation using $store.<key>$.

Configuration

{
"type": "store_variable",
"name": "Save last order ID",
"config": {
"key": "last_order_id",
"namespace": "default",
"value": "$request.body.order.id$",
"ttl_seconds": 3600
}
}

Fields

FieldTypeRequiredDescription
keystringYesDatastore entry key (pattern: [a-zA-Z0-9_.\-:\/]+)
valuestringYesValue to store (supports interpolation)
namespacestringNoDatastore namespace (default: "default")
ttl_secondsintegerNoTime-to-live in seconds — entry expires after this duration

Behavior

  • The value is written to the Datastore immediately when the action executes
  • If a key already exists, its value is overwritten
  • Errors are non-fatal — if the write fails, the chain continues
  • Stored values are available in subsequent actions (and future requests) via $store.<key>$ or $store.<namespace>.<key>$

Examples

Store with expiration

{
"key": "rate_limit_counter",
"value": "$request.body.count$",
"ttl_seconds": 60
}

Store in a named namespace

{
"key": "last_event",
"namespace": "webhooks",
"value": "$request.body.type$"
}

Store a composite value

{
"key": "customer_$variable.customer_id$",
"value": "$variable.customer_email$"
}