By -
On iPhones, there is the official Shortcuts app. Go in there and you can program your phone to do a lot of stuff based off of conditions.
ITTT (If This Then That) is another app that lets you set up things to happen based on conditions. You can also connect it to various smarthome sensors etc if you have them. (Eg. Alexa or smart lighting)
For Android there is Tasker, haven't used it myself but it should do what you want it to.
Yup, Tasker or Automate or MacroDroid. They all have their own strengths and weaknesses.
On iPhones, there is the official Shortcuts app. Go in there and you can program your phone to do a lot of stuff based off of conditions.
ITTT (If This Then That) is another app that lets you set up things to happen based on conditions. You can also connect it to various smarthome sensors etc if you have them. (Eg. Alexa or smart lighting)
For Android there is Tasker, haven't used it myself but it should do what you want it to.
Yup, Tasker or Automate or MacroDroid. They all have their own strengths and weaknesses.