How to make a "counter" for variables

Pau Sanchez Updated by Pau Sanchez

Here you can find an easy solution to set up a counter/loop to add up variables. We have also prepared a demo you can find in here.

In this example we will create a counter with a variable called @counter. Our flow should look something like this:

  1. Create the variable @counter with a Set A Variable block, with a  Number format and a value of 0:

  1. Once the step that needs to be counted has passed, we add another Set A Variable block using the same variable but with calculations:

These scripts and how to's are not native functionalities. Landbot won't be able to support, help or guarantee these scripts and how to's. These Workarounds and How to's are for developers, as a learning and example material on how to extend or modify some of the platform limitations.  Due to platform updates, some scripts might stop working in the future.Please, note that in case of Scripts and Workaround the Custom Success Team can deliver limited support.

How did we do?

How to build a simple scoring bot system