if App is open condition for shortcuts

Hello.

In personal automations we have a condition "when app is open/closed". Can i use similar condition for public shortcuts? I tried to do it using "if" statement, but it hasn't "open/closed app" condition in params. Or maybe i didnt find it?

For example, my case: When specified app is opened (e.g. LinkedIn), i need to set a VPN connection and when app closes VPN disconnecting

Thanks for help and have a good day to all

if App is open condition for shortcuts
 
 
Q