# Device State Node Error Device Id not found

**URL:** <https://forums.losant.com/t/device-state-node-error-device-id-not-found/2000>\
**Category:** Help\
**Tags:** workflow\
**Created:** [July 11, 2019, 10:54pm UTC](https://forums.losant.com/t/device-state-node-error-device-id-not-found/2000 "2019-07-11T22:54:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mario\_Romero](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Mario\_Romero](https://forums.losant.com/u/Mario_Romero)\
**Post date:** [July 11, 2019, 10:54pm UTC](https://forums.losant.com/t/device-state-node-error-device-id-not-found/2000/1 "2019-07-11T22:54:05Z")

</div>

Hi there, sorry to bother I’m new and I believe this is basics … I have searched for something similar in the forum but have not found … not the best searching though, mom and wife says all the time …

So here is the thing after receiving a payload by webhook I do get node and state node and everything works fine when a specific device is selected in Device State, now I have the same payload incoming for different devices and there is the name of the device in the payload so I try to use the JSON form but I get device ID not found, which make a lot of sense because the deviceid I don’t know from the source so I only have Device Name … is there a way to do this? or I’m doing wrong to update different devices according to a payload attribute??

 ![image](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/0/096326498d7cffecf34febe8c58c299e44dfdef7.png)

This is my workflow [https://app.losant.com/applications/5ce5695940db32000804a61e/workflows/5ce56ed018e76f0007235c6d/develop](https://app.losant.com/applications/5ce5695940db32000804a61e/workflows/5ce56ed018e76f0007235c6d/develop)

Thanks for the help in advance.

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [July 12, 2019, 1:59pm UTC](https://forums.losant.com/t/device-state-node-error-device-id-not-found/2000/2 "2019-07-12T13:59:32Z")

</div>

Hi @Mario_Romero,

Welcome to the Losant Forums, I’d be happy to help 😄

I took a look at your workflow and you are so very close! Your Device: Get Node has a Result Path of `data.deviceResponse`, so the output of the node is placed on the payload at `data.deviceResponse`:

 ![23%20AM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/b/b340ce791c7298ed8f7c5ef99bb6257d8e653b4b.png)

Opening deviceResponse shows information about the device selected previously, and even includes the Device ID. Thus, your Device State Node would need to look like so:

![14%20AM](https://us1.discourse-cdn.com/flex015/uploads/getstructure/original/2X/a/a001cbcfa4b9ea6cb511b9abbf00d97eb32fee09.png)

Let me know if I can assist further!  
Julia

---

<div class="post-metadata">

**Author:** ![Mario\_Romero](https://avatars.discourse-cdn.com/v4/letter/m/3ab097/32.png) [@Mario\_Romero](https://forums.losant.com/u/Mario_Romero)\
**Post date:** [July 12, 2019, 2:58pm UTC](https://forums.losant.com/t/device-state-node-error-device-id-not-found/2000/3 "2019-07-12T14:58:28Z")

</div>

Excellent, thanks a lot, it worked like a charm !!!  
Regards
