Save current preset via JSON

Hi, is there a way to save current settings (effect, palette, speed, intensity) to a new preset via JSON?
The problem is I don’t know what is the last used preset ID, so I can’t do a psave.

TL;DR
I have a Christmas tree with 200 leds. Wled installed and perfectly working. I’ve setup a script to randomize all settings. Then I’ve installed a Shelly 1 on my wall, so every time I click the fake light switch (there’s no light), my tree changes effects. And so far so good.
Now I would like to put a nfc tag near the fake light switch, so when I see a very beatifull settings combination (effect, palette, speed, intensity) I put my phone near the fake light switch and save that settings to a new preset.

I’ve tried even the last release (0.13.0-b5 “Toki”) 'cause i read “JSON in/decrementing support for brightness and presets” but I didn’t succeed.