Lola Tally Counter
AI-generatedOverview
The Lola Tally Counter node is designed to manage and manipulate counters associated with user profiles. It supports reading, incrementing ("touch"), or setting a specific value for a named counter tied to a unique profile ID. This node is useful in scenarios where you need to track counts or quotas per user, such as limiting the number of actions a user can perform, tracking usage statistics, or implementing rate-limiting logic.
Practical examples:
- Limiting the number of times a user can access a feature within a given period.
- Tracking how many times a user has performed a certain action.
- Resetting a user's counter (e.g., daily quota reset).
Properties
| Name | Meaning |
|---|---|
| Profile ID | User Profile ID, must be unique and should be 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 counter to a value |
| 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 value check for the counter. |
| Maximum Value | The maximum allowed value for the counter (inclusive; only shown if "Enable Maxium Value" is enabled). |
| Skip | Whether to skip processing the tally counter for this execution. |
| TTL in Seconds | Time to live for the counter in seconds. If empty or zero, no TTL is set. |
Output
- The node outputs the input item with an updated
json.lola_tally_counterfield. - The structure of
lola_tally_counteris an object where each key is a counter name and its value is the current value of that counter after the operation.
Example output:
{
"lola_tally_counter": {
"myCounter": 5
}
}
- If "Enable Maxium Value" is set and the counter exceeds the maximum value, the item is routed to the error output.
Dependencies
- May require credentials for
lolaKeyApiif configured. - Relies on external functions (
getTallyCounter,icrementTallyCounter,setTallyCounter) likely provided by the Lola service or API. - No mandatory n8n environment variables unless required by the Lola API integration.
Troubleshooting
Common issues:
- Missing or invalid Profile ID/Counter Name: Ensure both are provided and valid.
- Exceeding Maximum Value: If the counter exceeds the specified maximum, the item will be sent to the error output.
- API errors: Errors from the Lola API (e.g., network issues, authentication failures) will cause the node to throw an error and stop execution for that item.
- TTL misconfiguration: Setting TTL to zero disables expiration; ensure this matches your intended behavior.
Error messages:
- Errors thrown by the underlying Lola API will be wrapped as n8n
NodeOperationError. Check the error message for details about what went wrong (e.g., "Counter not found", "Invalid credentials").
Links and References
- n8n Documentation
- (If available) Documentation for the Lola API or service you are integrating with.