# Cloud variables and private Firebase connection doesnt seem to work?

**URL:** https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100
**Category:** Questions about Thunkable X
**Tags:** firebase, solved, cloud-variable
**Created:** [January 30, 2021, 6:04pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100 "2021-01-30T18:04:47Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![roidanielsen](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@roidanielsen](https://community.thunkable.com/u/roidanielsen)
#### Post date: [January 30, 2021, 6:04pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/1 "2021-01-30T18:04:48Z")

</div>

I’m just trying to mess around with saving stuff to Firebase using the cloud variables.

It doesnt seem to want to add data to my private firebase realtime db. If i use it without adding my API key and url, it returns “undefined” instead of the text from the text input box.

What am i doing wrong here? I followed first the Docs, then i saw how Darren did it on Youtube, but i have no luck 🙂

Here is my code and other useful info.

![blocks](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/8/6/86a38d2a9a0c68871d660f83fb816fe4f78d3c5f.png)

![firebase api settings](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/a/6/a67fabbd1a856f06b980baf9dd9f4b2056e730a4.png)

 ![API key and url](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/3/339a1421f6485613fe2dbf2340b8a07ef21bc7c8.png)

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 30, 2021, 6:56pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/2 "2021-01-30T18:56:02Z")

</div>

The problem is that you are trying to save a value to the cloud variable called 0. There is no cloud variable or firebase entry called 0. You need to use the “set cloud variable to name” block and then use a firebase path as the name.

So if your Firebase data looks like this:

```auto
top
- next
   - leaf

```

Then your cloud variable name would be “top/next/leaf”

More info: [Replace GET or SAVE Blocks with cloud variables](http://community.thunkable.com/t/replace-get-or-save-blocks-with-cloud-variables/975738)

---

<div class="post-metadata">

### Author: ![roidanielsen](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@roidanielsen](https://community.thunkable.com/u/roidanielsen)
#### Post date: [January 30, 2021, 8:08pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/3 "2021-01-30T20:08:06Z")

</div>

Aha! I see, of course this makes sense. So the “name” block on the set cloud variable block is actually the path, kind of like paths in Windows file exlorer yes?

I will try to use the example in your link 🙂

---

<div class="post-metadata">

### Author: ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)
#### Post date: [January 30, 2021, 8:22pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/4 "2021-01-30T20:22:15Z")

</div>

> [@roidanielsen](#):
>
> So the “name” block on the set cloud variable block is actually the path, kind of like paths in Windows file exlorer yes?

Yes.

---

<div class="post-metadata">

### Author: ![roidanielsen](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@roidanielsen](https://community.thunkable.com/u/roidanielsen)
#### Post date: [January 30, 2021, 8:45pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/5 "2021-01-30T20:45:54Z")

</div>

I got it to store a string, but i’m a little bit confused about the Firebase side of things.

What does the “name” and “value” boxes mean, in Firebase? I have worked with SQL databases before, how does this structure compare? Should i consider the “Bottom” to be a row like in SQL or a “leaf” as you said??

Where/how can i see the data entry i made, from thunkable, inside my Firebase database?

Screenshots below for clarity, i guess. Sorry for the many questions lol.

 ![block](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/5/55dd875f246dedf82d523314e7ad6f25f5e84633.png)  
 ![design](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/5/b/5b8678909503ab51d3622112a351ad344abb4dc1.png)  
 ![firebae](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/3/1/3157b35261cf2e87a0ec89c2cf12c27fd4072969.png)

---

<div class="post-metadata">

### Author: ![roidanielsen](https://avatars.discourse-cdn.com/v4/letter/r/b19c9b/32.png) [@roidanielsen](https://community.thunkable.com/u/roidanielsen)
#### Post date: [January 30, 2021, 8:57pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/6 "2021-01-30T20:57:44Z")

</div>

LOL ignore the above, i just realized the Firebase Realtime DB is JSON.

---

<div class="post-metadata">

### Author: ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)
#### Post date: [April 2, 2021, 9:03pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/7 "2021-04-02T21:03:13Z")

</div>

> [@roidanielsen](#):
>
> I have worked with SQL databases before, how does this structure compare?

If you have a SQL database, could you use something like this in your project?

[https://www.sqltoapi.com/](https://www.sqltoapi.com/)

---

<div class="post-metadata">

### Author: ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)
#### Post date: [November 8, 2024, 1:30pm UTC](https://community.thunkable.com/t/cloud-variables-and-private-firebase-connection-doesnt-seem-to-work/1076100/8 "2024-11-08T13:30:27Z")

</div>


