rules_version = '2'; service cloud.firestore { match /databases/{database}/documents { // Allow read/write to drafts collection match /drafts/{document} { allow read, write: if true; // You can add authentication rules here } // Allow read/write to sent emails for tracking match /sentEmails/{document} { allow read, write: if true; // You can add authentication rules here } // Allow read access to email logs for admin purposes match /emailLogs/{document} { allow read: if true; // You can add admin authentication here allow write: if false; // Only functions should write to this collection } } }