title: How to set Firebase cloud functions to route to Firestore instead of Realtime Database
body: <p>I currently have a firebase project on android. I originally set up a realtime database, then attempted to add cloud functions, but decided to switch to firestore.</p>
  
  <p>I added a firestore database, but the cloud functions would not route there and instead added to the RTDB. I disabled the RTDB and started getting the error that the "database ___ has been disabled by the owner".</p>
  
  <p>I have resulted reverting my code back to before I set up cloud functions, and re set it up with only the Firestore available. It still tries to write to the RTDB even though it is disabled (still shows in console though).</p>
  
  <p>How do I route it to firestore? Thanks</p>
  
  <p>For reference, I used <a href="https://firebase.google.com/docs/functions/get-started" rel="nofollow noreferrer">this</a> to add cloud functions</p>
  
  <p>EDIT: Problem solved, I should have been using Firestore triggers, found <a href="https://firebase.google.com/docs/functions/firestore-events" rel="nofollow noreferrer">here</a></p>