Create automation programmatically

Hi, how can I embed an automation to my app, so the user can install it in their Shortcuts app?

For example, the app must be opened everytime the iPhone connects to the car bluetooth (already paired). I know I can share a shortcut that opens the app, but how do I set to open it when the bluetooth is connected?

Thanks in advance

hey trying to do something similar, you ever figure out of this is possible?

Create automation programmatically
 
 
Q