Oh, this is very nice! Good idea, I haven’t considered using it like that. I’ll definitely use this in other scenarios
But I believe that in this one automation in particular, it wouldn’t do; And it’s totally my fault for not being very descriptive.
So, my Google Sheets data actually comprises from two automations:
First, one from users that registered with us (adds row after row)
Second, one from users that actually replied to us (It goes after already present rows and updates)
The first automation goes linearly. An user registers, Google Sheets adds a row, then the next users gets the next row. In this case, the mod operator would work! Thanks, I’ll use this in other scenarios where this would apply
But the second automation, the user could reply at random times, and the actual row number might vary with time, because it’s a search row/update row operation (as I add the “has replied” information to the row the client’s in)
I’m actually trying to change that second one. The user replies to us, I want it to count one. Second user replies, it marks as two. After 10 replies, it should do an action (which I demonstrated by sending an SMS), then reset the counter/variable.
The issue with using the mod operator in that scenario is that the row number doesn’t increase linearly. The next run could be Row 1, but the next could be Row 16, then Row 8, after that Row 10 (and the 10th execution would incorrectly run) and so on.
What I was thinking about was that, in the end of the second automation, it would add a +1 to a variable, and when that variable reaches 10, a filter would check if it’s equal to 10, which would then proceed to “send the HEY! SMS” and reset the variable back to 0, to start all over again.
Once again, thanks for the great suggestion, though!
As I need this running ASAP, I’ll just add another Google Sheets “Add Row” module, create a dummy sheet just to count these replies, and use your suggestion for the time being.
I believe there’ll be a more “elegant” solution than this workaround, but for now, I’ll do as you suggested, just to have it working at the moment!