struggling with app automation

hi so im trying to create a simple app that has two pressable buttons that turn a spa mode on and off wishing another app so far I have the UI figured out the app works the only issue is right now when I press spa on I have setup so it opens Siri Shortcuts and enables the shortcut is there a way to make the app revert back to mine after the action is done? or is there another way to open the other app and navigate to the button within that app and enable it behind my app

struggling with app automation
 
 
Q