Toggle open/close a specific app

I'd like to create a button that opens and closes a specific app, but I can't find a suitable action for that.

Any ideas?