title: How to export the data returned from snap.data() into a GCP bucket?
body: <p>I am trying to get a Firestore export of only new documents being added to my Firestore sub collection: reviews. The below .onCreate method logs the new fields whenever I create a new document. However, I want to export only the new documents to my GCP bucket to import it later to a BigQuery table. Any idea how I can achieve this?</p>
  <p><strong>Cloud Function code:</strong></p>
  <pre><code>const functions = require('firebase-functions');
      
      const admin = require('firebase-admin');
      
      exports.createUser = functions.firestore
          .document('vision_data/{id}/reviews/{reviewsId}')
          .onCreate((snap, context) =&gt; {
        
          console.log(snap.data());
          
          return null;
          
          });
  </code></pre>