Add triggers to a touch bar group using AppleScript

Is there a way to add triggers to a touch bar group using AppleScript? I've been messing around with update_trigger but that doesn't appear to work and results in weird behavior.

I face the same issue a while ago and you need to update the full touch bar group in that case.