# Changing the data from Node-RED to Google Firebase

**URL:** <https://discourse.nodered.org/t/changing-the-data-from-node-red-to-google-firebase/2137>\
**Category:** General\
**Created:** [7 August 2018 13:45 UTC](https://discourse.nodered.org/t/changing-the-data-from-node-red-to-google-firebase/2137 "2018-08-07T13:45:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![amruta](https://avatars.discourse-cdn.com/v4/letter/a/e480ec/32.png) [@amruta](https://discourse.nodered.org/u/amruta)\
**Post date:** [7 August 2018 13:45 UTC](https://discourse.nodered.org/t/changing-the-data-from-node-red-to-google-firebase/2137/1 "2018-08-07T13:45:47Z")

</div>

![Database_sample](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/2X/1/10f10b5c5c81b063d546c03e13ed4e9fa6ecb523.png)

I am storing the entries in Google firebase database(IMEI number, the range of CO in ppm etc., as seen in the photo). For every newly signed-in user, the data gets stored under a unique-ID (UID).  
Since the UID is random and not fixed, I am not sure how to reach the node "50-70" and set its value as "on" from Node-RED using "Firebase.set()" node.  
Could someone help me on this issue?

---

<div class="post-metadata">

**Author:** ![xdesigns](https://avatars.discourse-cdn.com/v4/letter/x/50afbb/32.png) [@xdesigns](https://discourse.nodered.org/u/xdesigns)\
**Post date:** [19 October 2018 17:14 UTC](https://discourse.nodered.org/t/changing-the-data-from-node-red-to-google-firebase/2137/2 "2018-10-19T17:14:31Z")

</div>

Make a function after push firebase and add inside that function

msg.payload = msg.pushID  
return msg

That will return that unique id. (Just had the same problem so found the solution)

Good luck
