I am running a cloud function whenever a firestore document is updated. The function reads the document, gets the user IDs and then takes the user token IDs from the realtim
According to the links below, all reads and writes are billable (or count toward reading count), even in cases of evaluating security rules, so Cloud functions should also be "billable".
According to Understand Realtime Database Billing,
All traffic to and from your database, including operations denied by security rules, leads to billable costs.
According to Cloud Firestore Pricing,
You are charged for each document read, write, and delete that you perform with Cloud Firestore.