Thanks, @rolian.
Absolutely. The thought crossed my mind before (naively) imagining a token to do the job. I have a few macros I've borrowed and/reworked that grab and parse the group lists. I will take a look and see what I can learn.
I've just been dabbling with dictionaries so this might be a good exercise. I suppose I could also automate updating the dictionary on a schedule
EDIT:
Here is the dictionary I created, which gets the full list of macro groups and creates an entry for each group with its name and corresponding UUID. I'm not sure if I used the best approach to get and parse the list, using AppleScript and Search/Replace, but it works. I thought I'd share it here in case anyone finds it useful. And of course I am open to coaching
Build MacroGroups_dict.kmmacros (16 KB)
From there, I get the dictionary entry for the UUID based on the front application, like this:
Thanks, @rolian for the idea
Also, shout out to @DanThomas for both Variable Inspector Prompt and Dictionary Editor and Quick Access Macro Editor Palette, which made quick work of reviewing the dictionary and jumping back and forth between macros while I figured it out. Those really helped me learn as I went. Thanks!