Programically modify certain dashboard widget outputs

For example, I would like to dynamically modify the payload output of a dashboard button.

I cannot find the answer in the docs.

I tried using the mustache format in the payload output field, similar to setting other parameters in the button, but to no avail.

You can't. You can use a following change node or function to do that.