How to capture the number of times a user has run a function

Hi there.

I have built an MVP of a basic product where a user can login and perform a function that calls some APIs and returns data to them. I would like to let users do this for free for a certain number of times, but then pay (subscription signup) once they have hit that limit.

For example, they can run the function 5 times, but on the 6th time, they’d need to subscribe.

Can anyone suggest some tips around how I would go about creating a field (in the user data object I’d assume) and running a workflow, or adding an action to a workflow, that increases the number in the field every time they a user runs the function?

Thanks in advance.

I’m not sure what kind of tips you’re looking for, as you’ve basically explained exactly what you need to do right there.

Which part of that are you having trouble with?


Ha ha, thanks for the vote of confidence, Adam :grinning:. I know what I want to achieve…I’m not certain how to achieve it. What I assume I need to do is, at the end of the workflow that completes the function, I need to add a data action that adds a thing or sets a thing or makes changes to a thing… What I 'm not sure about is how to setup that logic. How would I configure action/s to basically say “increment this numerical field by 1”.

Just set the value to the current value plus 1

Well crap, that was easy. Thanks mate - maybe I just needed moral support.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.