Control an app feature in another app's TouchBar preset

Hi there!

I have something I need to do every time I use an app that consists in clicking a button in another app, is it possible to put that action in the Touchbar of the first app?