Document actions trigger

How can I trigger a custom script for specific actions?
e.g:

frappe.ui.form.on('Doctype' {
   Buzz: function () {
      console.log('Buzz clicked');
   },
   Feed: function () {
      console.log('Feed clicked');
   }
})

Please try as detailed in this documentation.

But this trigger is for custom_button, I’m doing with workflow_state