How can I run a sequence of applications or actions on certain triggers on Android?
You should try Tasker for simple interface and quick setup.

If you are willing to do something by code and very specific, a good alternative is onX by Microsoft, you can write your code to do exactly the things you wanna do. Also there are some ready recipes that you can quickly setup.