Lola Tally Counter icon

Lola Tally Counter

Lola Tally Counter

Overview

The Lola Tally Counter node is designed to manage and manipulate counters associated with user profiles. It supports reading, incrementing ("touch"), and setting the value of named counters for a given profile. This node is useful in scenarios where you need to track counts or quotas per user, such as API usage limits, gamification points, or feature unlocks.

Practical examples:

  • Tracking how many times a user has performed a specific action.
  • Limiting the number of times a user can access a resource within a period.
  • Resetting or initializing counters for onboarding flows.

Properties

Name Meaning
Profile ID User Profile ID, must be unique and taken from Lola Profile V2.
Counter Name The name of the counter to be used or manipulated.
Token Operation The operation to perform on the counter:
- Read: Read a counter's value
- Touch: Increment the counter by 1
- Set: Set the counter to a specific value (usually 0)
Set Counter Value To The value to set the counter to (only shown when "Set" operation is selected).
Enable Maxium Value Whether to enable a maximum allowed value for the counter.
Maximum Value The maximum value allowed for the counter (inclusive; only shown if "Enable Maxium Value" is true).
TTL enabled Whether to enable time-to-live (TTL) for the output data (only available for "Set" and "Touch" operations).
ttl (seconds) The TTL duration in seconds for which the output will be cached (required if "TTL enabled" is true and operation is "Set" or "Touch").

Output

  • The node outputs an object under the field lola_tally_counter inside the main json property.
  • The structure is:
    {
      "lola_tally_counter": {
        "<Counter Name>": <Current Value>
      }
    }
    
  • If the counter exceeds the specified maximum value (when enabled), the item is routed to the second output (error path); otherwise, it goes to the first output (success path).

Dependencies

  • May require credentials for lolaKeyApi if configured.
  • Relies on external functions (getTallyCounter, icrementTallyCounter, setTallyCounter) likely provided by the Lola service or its SDK.
  • No mandatory n8n environment variables are specified, but integration with Lola Profile V2 is implied.

Troubleshooting

Common issues:

  • Missing or invalid Profile ID: Ensure the Profile ID is unique and exists in Lola Profile V2.
  • Counter exceeds maximum value: If the counter surpasses the set maximum, the item is sent to the error output. Adjust the "Maximum Value" or reset the counter as needed.
  • Operation errors: Errors thrown during counter operations (read, touch, set) will result in node failure with a descriptive message.

Error messages:

  • "NodeOperationError": Indicates a problem occurred during the requested operation (e.g., network issue, invalid parameters). Check the error details and verify all input values.

Links and References


If you need more details about a specific operation or property, please provide additional context!

Discussion