Hi @Luti
yes sure you can use NiFi toolkit for this.
nifi pg-set-var -pgid b1f05b41-017f-1000-0000-00005ac6776e --varValue "Test2" --varName "MyVar1"
If the variable does not exist, it will create. If the variable exists, you will update the value.
I hope this will help you.