# Get routine name from alexa node

**URL:** <https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871>\
**Category:** General\
**Created:** [8 June 2021 20:15 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871 "2021-06-08T20:15:09Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonMa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ronma/32/42531_2.png) [@RonMa](https://discourse.nodered.org/u/RonMa)\
**Post date:** [8 June 2021 20:15 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/1 "2021-06-08T20:15:09Z")

</div>

Hi everyone,  
this is the use case: I would like to trigger a flow once a certain Alexa routine was initiated. Using the Alexa Event node it is possible to identify that the object was created through an Alexa routine within the data objective (`domain: "Routines"`). However, I couldn´t find any further spot that gives me the name of the certain routine. Anybody has an idea if/where to catch it?

---

<div class="post-metadata">

**Author:** ![EmilWesselink](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/emilwesselink/32/65829_2.png) [@EmilWesselink](https://discourse.nodered.org/u/EmilWesselink)\
**Post date:** [8 June 2021 21:23 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/2 "2021-06-08T21:23:34Z")

</div>

No but I can share you my hack for Alexa routines in Node Red. With the node-red-local home automation node I have configured a "lamp" called routine. When configuring a routine I put this lamp on a unique brightness. So based on the brightness command I can see which routine is being called. I still hope for a better way. But for now this works perfectly.

---

<div class="post-metadata">

**Author:** ![RonMa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ronma/32/42531_2.png) [@RonMa](https://discourse.nodered.org/u/RonMa)\
**Post date:** [8 June 2021 21:37 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/3 "2021-06-08T21:37:32Z")

</div>

I have to admit this really is a super creative hack @EmilWesselink 😂 But this than makes you loose the connection to identify which Echo device the input was received from, so you can´t really have the right Alexa device answering do you?

---

<div class="post-metadata">

**Author:** ![EmilWesselink](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/emilwesselink/32/65829_2.png) [@EmilWesselink](https://discourse.nodered.org/u/EmilWesselink)\
**Post date:** [8 June 2021 22:13 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/4 "2021-06-08T22:13:23Z")

</div>

In the routine I use always "the device you speak to" to answer. But that are routine defined sentences. If you want to trigger a sentence build in Node Red I think I can combine those two in a Join node. I will have a go at it tomorrow. You gave me some inspiration.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [9 June 2021 04:57 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/5 "2021-06-09T04:57:48Z")

</div>

I use the node 'On Device Activity' in my flow [Pure Fun with Alexa](https://discourse.nodered.org/t/pure-fun-with-alexa-and-alexa-skills/46867) to report what message (in msg.payload.alexaResponse) and device-name (in msg.payload.name) triggered it from a Q&A Alexa Skill.

---

<div class="post-metadata">

**Author:** ![RonMa](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ronma/32/42531_2.png) [@RonMa](https://discourse.nodered.org/u/RonMa)\
**Post date:** [13 June 2021 11:31 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/6 "2021-06-13T11:31:57Z")

</div>

Hi @dynamicdave , thats exactly how I´m doing it right now. However this proceeding depends on finding wording combinations that Alexa has no own proceeding for - otherwise you have a conflicting in action.

Let me give you an example: I placed a temperature sensor outside my balcony. Now I want to ask any echo inside my home about the temperature outside based on the sensors' measurement. However, if I ask Alexa about the temperature, the very own Alexa routine kicks in giving me the overall weather forecast of my greater region.

I now want to create a certain routine in Alexa, which I would like to detect starting together with the initiating device, so that I can send the corresponding message.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [13 June 2021 12:10 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/7 "2021-06-13T12:10:18Z")

</div>

I agree you have to be careful with the wording otherwise she goes off on the wrong track.  
This is part of my setup (that works for me)...  
 ![Screen Shot 06-13-21 at 01.11 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/c/4/c424c26f7cf7ce6d912741d3de212de1a0f40a40.jpeg)  
 ![Screen Shot 06-13-21 at 01.09 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/e/ee46edc8b624f4f46dc3751236e03dd786abb7f2.jpeg)  
 ![Screen Shot 06-13-21 at 01.02 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/5/b/5bf228aded70c7861fe834174549b62fa97b007a.jpeg)  
 ![Screen Shot 06-13-21 at 01.03 PM](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/e/d/edab8e02f35eb0decae4bc50ddc36ecbe5ce8cb3.jpeg)

Here's what I have in the 'Switch' node...  
 ![Screen Shot 06-13-21 at 01.03 PM 001](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/6/6/66c0484d3b3c7ead1b6babea3a2a59c5d72e1e29.jpeg)  
In the last example, I tried giving a response ID - which also works.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [12 August 2021 12:10 UTC](https://discourse.nodered.org/t/get-routine-name-from-alexa-node/46871/8 "2021-08-12T12:10:27Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
