Scripting, getting uuids of triggers inside a group when creating a group

So I'm using an HTTP request to create a touch bar group with a couple of buttons in the group. The idea, because I can't get the UUIDs of triggers created when I call add_new_trigger, would be to use update_trigger on the whole group, completely replacing the whole group, including contained buttons. The problem, though, when I do this is that contained buttons get left behind in the CAG. And since I can't get their UUIDs I can't delete them. Any thoughts or am I up against a brick wall?

  {
    "BTTPredefinedActionType": -1, 
    "BTTTouchBarButtonName": "A Group", 
    "BTTModifierMode": 0, 
    "BTTPredefinedActionName": "No Action", 
    "BTTTriggerTypeDescription": "Group", 
    "BTTEnabled2": 1, 
    "BTTAdditionalActions": [
        {
            "BTTPredefinedActionType": 206, 
            "BTTTouchBarButtonName": "b1", 
            "BTTModifierMode": 0, 
            "BTTNotesInsteadOfDescription": 0, 
            "BTTTriggerTypeDescription": "Touch Bar button", 
            "BTTEnabled2": 1, 
            "BTTTriggerType": 629, 
            "BTTTriggerConfig": {
                "BTTTouchBarButtonWidth": 100, 
                "BTTTouchBarButtonName": "+ Torq", 
                "BTTTBWidgetWidth": 400, 
                "BTTTouchBarItemIconHeight": 22, 
                "BTTTouchBarFreeSpaceAfterButton": 5, 
                "BTTTouchBarItemPlacement": 0, 
                "BTTTouchBarAlwaysShowButton": 1, 
                "BTTTouchBarOnlyShowIcon": false, 
                "BTTTouchBarButtonFontSize": 15, 
                "BTTTouchBarButtonColor": "75, 75, 75, 255", 
                "BTTTouchBarItemIconWidth": 22, 
                "BTTTouchBarButtonTextAlignment": 0, 
                "BTTTouchBarItemPadding": 0
            }, 
            "BTTMergeIntoTouchBarGroups": 0, 
            "BTTEnabled": 1, 
            "BTTDisplayOrder": 0, 
            "BTTTriggerClass": "BTTTriggerTypeTouchBar", 
            "BTTShellTaskActionConfig": "/usr/bin/python:::-c:::-:::", 
            "BTTOrder": 1, 
            "BTTShellTaskActionScript": "print( \"b1\" ) "
        }
    ], 
    "BTTTriggerType": 630, 
    "BTTNotesInsteadOfDescription": 0, 
    "BTTMergeIntoTouchBarGroups": 0, 
    "BTTEnabled": 1, 
    "BTTDisplayOrder": 0, 
    "BTTTriggerClass": "BTTTriggerTypeTouchBar", 
    "BTTOrder": 3
  }