title: How to access Cloud Firestore from Google Sheets?
body: <p>I am trying to access Cloud Firestore database from Google sheet with the help of <a href="https://github.com/grahamearley/FirestoreGoogleAppsScript" rel="nofollow noreferrer">FirestoreGoogleAppsScript</a> example, but as explained in the 5th point I have downloaded the file but not getting where to update the <code>client_email</code>, <code>private_key</code> and <code>project_id</code> in the project.
  So kindly guide me to move forward.</p>
  <p><em>When you press &quot;Create,&quot; your browser will download a <code>.json</code> file with your private key (<code>private_key</code>), service account email (<code>client_email</code>), and project ID (<code>project_id</code>). Copy these values into your Google Apps Script — you'll need them to authenticate with Firestore.</em></p>
  <p>with a demo
  Code.gs</p>
  <pre><code>function myFunction() {
    projectid: &quot;xxx&quot;;
    key: &quot;-----BEGIN PRIVATE KEY-----\nPrivateKeyHere\n-----END PRIVATE KEY-----\n&quot;;
    email: &quot;xxx@xxx.iam.gserviceaccount.com&quot;;
    
    var firestore = FirestoreApp.getFirestore(email, key, projectId);
  }
  </code></pre>
  <p>error</p>
  <pre><code>ReferenceError: &quot;email&quot; is not defined. (line 7, file &quot;Code&quot;)
  </code></pre>