Automation: Turning on device for variable time T

Hi,

I have an automation using a boolean input to turn on a device (irrigation switch).
I want to be able to turn it for a variable time T and also be able to do so with Google Home or with Alexa.

For example: Hey Google, turn on the switch for 15 minutes.

Is that possible at all and how?

Thanks!