Skip to content

Connect Google Sheets to LessonQ

To send your records to Google Sheets, LessonQ writes as a service account from your own Google Cloud project. Here you hand LessonQ that account’s key. Once it’s connected, you share spreadsheets with the account’s address, and LessonQ can write to those spreadsheets and nothing else.

In this video · 1:58

Read the narration
  • Who can do this: the academy owner and admins.
  • You need the key file you downloaded from Google Cloud: a .json file whose name starts with your project’s name. If you don’t have one yet, follow Get your Google key for Google Sheets first.
  • One account per academy. Every sheet the academy connects uses the same service account.

In the sidebar, open Settings → Google Sheets. It says Not connected.

Settings, Google Sheets: Not connected, the three steps, and the Connect service account button
  1. Connect service account. The same button is in the setup card below.
  1. Click Connect service account.
  2. Give it the key, in any of three ways: Upload .json file, drop the file anywhere on the window, or copy what’s in the file and Paste from clipboard.
  3. Look at What we check on the right: every line should be ticked.
  4. Click Test & connect. LessonQ asks Google to accept the key, and saves nothing until it does.
Connect a Google service account: Add your service account key, with Upload .json file and Paste from clipboard
  1. Upload .json file.
  2. Paste from clipboard.
The key file checked: its project lessonq-studio, the share address, Show key contents folded, and every check ticked but Google's
  1. Project: the Google Cloud project the key belongs to.
  2. Share address: the service account’s email. You’ll share spreadsheets with it.
  3. Show key contents. The key itself stays folded away. LessonQ stores it encrypted and never shows it again.
  4. What we check: valid JSON, a service account key (not an OAuth client), its email, and a complete private key. The last line, Google accepts the key, is checked when you connect.
  5. Test & connect.

The usual mistake is an OAuth client file instead of a service account key. Google offers both, and their files look alike. LessonQ spots it at once and saves nothing.

An OAuth client file refused: This key cannot be used. This is an OAuth client secret, not a service account key.
  1. Problem: what’s wrong with the file.
  2. Clear, to try another file.
What LessonQ says What it means
This is an OAuth client secret, not a service account key. You downloaded the wrong kind of file. Make a key from the service account’s Keys tab instead.
This isn’t valid JSON. Part of the file is missing. Upload the file itself, or copy all of it, braces included.
This JSON is not a service account key. It’s some other JSON file.
The private_key looks incomplete. Only part of the file was pasted. Upload the file instead.

Once Google accepts the key, the panel says Connected, and the service account’s address sits at the top.

Google Sheets, Connected, with the share address and its copy button, and the Service account button
  1. Connected.
  2. The share address, with a button to copy it. Every spreadsheet you want LessonQ to fill is shared with this address, as an Editor.
  3. Service account: the connection’s details.

Click Service account to see the connection.

Google service account window: Connected and verified, the share address, the project, Pick from Google Drive, Disconnect and Replace key
  1. Status, and the day Google last checked the key.
  2. Share address, with Copy.
  3. Choosing sheets: Pick from Google Drive when the Drive API is on in your project; otherwise you add a spreadsheet by pasting its link.
  4. Replace key: put in a new key. If it belongs to another service account, share your spreadsheets with the new address too, or they stop updating.
  5. Disconnect: removes the key and every sheet from LessonQ. Your spreadsheets and the rows already in them stay as they are.

Next, share a spreadsheet and choose what goes into it: Add a sheet.