Interaction with Google Home

Would it be possible to interact with Google Assistant?

For example, if an automation is executed and among the actions I have the Google Home tts service that tells me “It’s raining, do you want me to close?”
It would be nice if it were possible to give an answer like yes or no and then have it execute a script or in any case a command based on the answer given.
The question would be, is it possible to set Google Home to ask a question and do something based on the answer?