title: How to read a value from Firebase realtime database with a Google cloud functions?
body: <p>I'm starting to use firebase cloud functions, and I have trouble reading an entry <strong>"Hello"</strong> from my database tree :</p>
  
  <p><a href="https://i.stack.imgur.com/JcjHS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/JcjHS.png" alt="enter image description here"></a></p>
  
  <p>I'm trying to read the <strong>"Hello"</strong> value inside <strong>HANDLE/suj1/part1</strong> from my tree. I am using a firebase cloud function that is triggered when I create an other entry with an IOS Application in the database inside <strong>"INTENT"</strong>. The functions gets called well but every time I try to read the "Hello" value , it returns a null value in my firebase console where I expect it to return "Hello".</p>
  
  <p>Here is the code I use :  </p>
  
  <pre><code>const functions = require('firebase-functions')
  const admin = require('firebase-admin')
  admin.initializeApp()
  
  exports.match = functions.database.ref('INTENT/{userid}').onCreate(snapshot =&gt; {
  
  const user = snapshot.key
  
  
  return admin.database().ref('HANDLE/suj1/part1').once('value', (snap) =&gt; {
      const hello = snap.val()
      console.log(hello) // Null
   });
  </code></pre>
  
  <p>Can someone tell what am I doing wrong ?</p>