How to create a variable automatically increment by 1 after every request in postman

Hi everyone, I have a json pattern as bellow:

                "timestamp": 1676947910,
                "message": {
                    "mid": "{{$randomBitcoin}}",
                    "text": "0"

I want the text field auto increment by 1 after every request.

You’ll need to store the value in variable. (Collection or Environment).

You then update your request to use the variable value. {{variableName}}, similar to how you’ve got the random variable set.

In the Tests tab for the request, you will then retrieve the variable, increment it by one and then resave it.

let myVar = pm.collectionVariables.get("variableName");
myVar ++ // increment by 1
pm.collectionVariables.set("variableName", myVar);

Using variables | Postman Learning Center