Suggestions, please, for Alexa skill that triggers automation based on Yes/No response

Since it doesn’t exist, I’m going to try to write an Alexa skill that will ask a question, wait for a yes or no response, then take action accordingly. The thing is, I want it to be modular so it can be used in any number of scenarios/flows. I think the flow looks something like this…

Node-RED triggers Alexa to say [whatever the question needs to be]
Node-RED triggers Alexa skill that listens for a yes/no response. (Anyone know if an Alexa skill can be triggered without Alexa saying anything? If she has to say something, I guess it could be “Please respond with yes or no.”)
Alexa gets her response evaluates it and does [something] if it’s yes, [something else] if no.
The [something]/[something else] needs to be something that Node-RED is watching for. Some sort of generic [AlexaYES] or [AlexaNO] marker or signal that HA is expecting to see (because Node-RED started this in step 1). Maybe it’s a one-time MQTT message… (can Alexa do that?) maybe something else, I’m not sure - this is where I really need some input. The point is, since Node-RED started the whole thing, Node-RED knows what to do with an [AlexaYES] or [AlexaNO] marker/signal/message and the flow that’s triggered is specific to the original question. I hope that’s making sense. Let me try to explain it another way…


So the question can be almost anything. You would define it as part of the automation/flow. And the actions taken can be anything - like the question, they are specific to and exist within the context of the flow. The yes/no part (Alexa’s role in the automation) is therefor nonspecific and can be used in an infinite number of automations.

I’ll throw out an example to further clarify…

Automation For Playing Music
Home Assistant sees that someone is home and not in bed. It has been over an hour since the TV was turned off and no music has been playing for an hour.
HA triggers the Node-RED flow which triggers Alexa to say, “It’s awfully quiet around here. Would you like me to play some music?” Then triggers the AlexaYesNo custom skill.
Alexa listens for a response, evaluates the answer and puts something out that Node-RED is waiting to see.
Node-RED triggers a sequence of actions to turn on the home entertainment system and play some music (or not) based on the response.

Thoughts? Comments? Suggestions?

I tried posting this on the Home Assistant forum and got zero responses so I thought I’d try here.

Are you sure you can do that? I thought that you had to trigger Alexa with a voice command

There are other ways to trigger Alexa. I don’t know as much about it as I’d like but there’s a fair amount of talk about it on the Home Assistant forum -

Worst case scenario, I know there’s a way you can use Alexa as a media player, triggering playback of a media file or playlist, so you could either record a WAV/mp3 file or use tts to handle this step.

P.S. Thanks for your interest!

This will trigger an Alexa routine, so all that would be needed is a routine that asks the question. E.g. “It’s awfully quiet around here. Would you like me to play some music“. The custom Alexa skill could then be triggered and listen for the response. If it has to say something before listening, it could just say, “now?” and that would seem pretty natural.

Did you get any further with this @OctavioMasomenos?
I need something similar - i.e. the ability to solicit a yes/no answer after saying something.

In my case, I'm coding a method of turning off a light if it is left on too long but I want to have Alexa say something like "Shall I leave the light on?" and then wait for "Yes" or "No", defaulting to No if no response. So far I've sorted a flow which detects the light going on and starts a timer but then it has no way to allow the user to keep the light on...

I would also like to do something similar. Although node red integration is needed at some point from what I have learnt is the initial alexa question needs to be an alexa skill. I have tried to create a skill using the yes / no Intent but have found the amazon skill development very difficult.
I want alexa to ask me when both my wife and my phone is unable to be pinged to then ask if I want the house alarm arming. If I say yes or there is no response then to arm the alarm. If no to not arm. I have no problem with doing any of the other work apart from the skill.
I will definitely be keeping tabs on this post and will see what else I can contribute now I know other people are interested in doing something similar to what I need.