title: OnCreate Functions not firing but OnWrite Functions fire
body: <p>I have an oncreate function that doesn't seem to fire when I create data in my realtime database. I understand onCreate is used when new data is created in the Realtime Database. See code below.</p>
  
  <p>What am I doing wrong?</p>
  
  <pre><code>exports.getNewReport = 
  functions.database.ref('/Hotel_Complaints/Users/{usersId}/')
  .onCreate((snapshot, context) =&gt; {
    // Grab the current value of what was written to the Realtime Database.
    var user_id = context.params.usersId;
  console.log(user_id);
  // Grab the current value of what was written to the Realtime Database.
  var eventSnapshot = snapshot.val();
  
  var device_token = admin.database().ref('/Hotel_Staff/'+user_id+'/device_token').once('value');
  
  return device_token.then(result =&gt; {
  
  var token_id = result.val();
  
  console.log(token_id);
  
  var str = eventSnapshot.issue_description;
  
  var payload = {
      notification: {
          title: "New complaint",
          body: "New complaint for your department",
  
      }   
  
  };
  
  // Send a message to devices subscribed to the provided topic.
  return admin.messaging().sendToDevice(token_id, payload).then(function (response) {
          // See the MessagingTopicResponse reference documentation for the
          // contents of response.
          console.log("Successfully sent message:", response);
          return;
      })
      .catch(function (error) {
          console.log("Error sending message:", error);
      });
  
  });
  });
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/kfBIG.png" rel="nofollow noreferrer">See log here.</a></p>