The Get Touch Bar Selection action (v8+) lets you display a set of buttons in the Touch Bar and process the result.
The buttons are separated by vertical bars (|) just like the Prompt for User Input Popup fields. So, for example
F__Fail|C__OK|B__Good|A__Excellent would display the four buttons Fail, OK, Good, Excellent and return a value of F, C, B or A.
Note that unlike the Prompt for User Input Popup fields, there are no separators and no concept of the initially selected field.
The resulting button can be: