KeyValue icon

KeyValue

Store and retrieve key-value pairs on the filesystem

Actions20

Counter → Increment

AI-generated

Summary

Increment a named counter stored as a plain text file. If it does not exist, initialize it from Start At, add Increment By, save the new value, and return it.

Inputs

  • Counter Name (required) — Name of the counter to update.
  • Increment By — Amount to add; defaults to 1.
  • Start At — Initial value used only when the counter does not yet exist; defaults to 0. Increment By is then added to this value.

Output shape

One item per input item, with a JSON object containing the counter name and updated value.

The operation writes the updated value to the counter file. Errors are raised for failed execution unless Continue On Fail is enabled.

Links

Discussion