Trigger function inside app when phone is locked through Siri

I want to know if there is a way to trigger a function of my app while the phone is locked by using siri or google assistant. Normally using an iOS shortcut Siri requests unlocking the phone first, so I want to if it is posible to start an app without unlocking. In this case, the function would be trigger linking to send another app a message.