Data not pushing to Google Sheets, configuration issue?

Goal:
I have a public application that searches a database and returns results. As part of this search process, I would like for these search terms to be cached in a Google Sheet (so that I can track basic things about utilization).

Issue.
My application works when I am browsing in non-incognito, but when I test the public application when incognito mode, the text input ("Search Terms") are not appended to the Google Sheet. Is this an authentication issue?

Steps

  1. Created Google Sheet in Drive
  2. Authenticated Google Sheet (OAuth) by adding it as a resource in Retool
  3. Created a query that successfully pushed the Search Term to a database
  4. Ran search in production and successfully created the query (note: I am on chrome and logged into my chrome account, which I use to authenticate/login to Retool platforms).
  5. RESOLVED ISSUE: Repeat Step 4, but incognito and input is not pushed to database

I believe this is an authentication issue, so I looked to cache the data by authenticating via a "Service Account".

  1. In Google Cloud Admin, created a new service account and downloaded Private Key
  2. In Google Cloud Admin, assigned the Service Account an "Editor" Role related to my retool project
  3. In Retool, updated the Resource (which connected to Google Sheets via oAuth) to connect via a "Service Account".
  4. In Retool, inserted the Service Account's Private Key
  5. CURRENT ISSUE: Response from Retool Application when executing Query: "Caller does not have permission"

Questions

  1. Are there any resources available on retools website for Google Service Account Configuration and permissions that a newbie can understand?
1 Like

SOLVED:

I had to perform one extra step to get this to work:

  1. Open up Google Sheet and click "share"
  2. Input the Google IAM email address (associated with the Private Key) into the Google Sheet email-input textbox
  3. Click save
2 Likes