Skip to main content

Google Sheets integration

Written by Traian

With the Google Sheets integration, every completed quiz adds a row to a spreadsheet in your Google Drive once you've enabled it for that quiz: the date, the customer's email, name and phone, one column per question, the recommended products and a link to their results.

Step 1: Connect Google Sheets

1.1 In Lantern, open Integrations and find Google Sheets under Automations.

1.2 Click Connect Google Sheets. A Google sign-in opens in a new tab.

Image showing the Google Sheets integration under Automations, with the connection popup open and the Connect Google Sheets button highlighted.

1.3 Choose the Google account that should own the spreadsheets and allow access.
​1.4. Google's permission screen will ask you to enable the following: "See, edit, create and delete only the specific Google Drive files you use with this app". You must enable this before clicking Continue.

Image showing Google's permission screen with the required Google Drive access checkbox selected and the Continue button highlighted.


Lantern only asks for permission to see and edit the spreadsheets it creates itself or that you pick for it in your Drive, nothing else.

1.5 You're sent back to Lantern, and the Google Sheets card shows the connected account.

Image showing the Google Sheets integration marked as Connected, with the connected Google account displayed in the popup.


Next, you'll switch on the quizzes you want in a sheet. No data is sent until you do.

Step 2: Choosing which quizzes send data to Google Sheets

2.1 Open a quiz in the editor, go to its More Integrations tab and find Google Sheets
​2.2 Tick Send completed quizzes to Google Sheets. As soon as it's selected, Lantern creates a spreadsheet for that quiz with the column names corresponding to customer details, quiz questions and product recommendations. The app shows the spreadsheet's name with an Open link option.

You can also enable this for an unpublished quiz and test the integration by completing the quiz in Preview.

Image showing the Google Sheets section in a quiz’s More Integrations tab before and after enabling “Send completed quizzes to Google Sheets,” with the spreadsheet automatically created and the Open link visible.

2.3 Untick this option if you want the quiz data to stop being sent to Google Sheets.

New rows get created from the moment a quiz is switched on. Earlier submissions are not added; use the export on the Submissions page for those.

Using a spreadsheet you already have

If you'd rather use an existing spreadsheet:
​2.4 Open a quiz in the editor, go to its More Integrations tab and find Google Sheets
​2.5 Click Use an existing spreadsheet (or Use a different spreadsheet if the quiz already has one connected). Google's file selector opens with the spreadsheets of the connected account.

Image showing the Use a different spreadsheet option in Lantern and Google's file selector with an existing spreadsheet selected.


​2.6 Select your preferred spreadsheet.
​2.7 Lantern adds a new Submissions sheet/tab to it, writes the column names and switches on data sharing from the quiz, and shows the spreadsheet's name in the More Integrations card. Your other sheets/tabs remain the same, and Lantern only writes in the Submissions one.

Image showing an existing Google spreadsheet with a newly added Submissions tab, containing automatically generated column headers for customer details and quiz questions.


If Google's file selector doesn't open, Lantern will show a warning message, for example: "The API developer key is invalid". Check these in order:

  • Third-party cookies must be allowed in your browser. This is the usual cause. In Chrome, a crossed-out eye icon at the right of the address bar means they're blocked. If this appears, click the icon, choose to allow third-party cookies for admin.shopify.com, then reload the page and try again.

  • Sign in to Google in this browser with the account you connected to Lantern. If the chooser asks you to sign in, do that and try again.

Each quiz has one spreadsheet, but several quizzes can share the same spreadsheet: their rows all go to its Submissions sheet, and the column names are created and synced up as you select multiple quizzes. If you'd rather keep different quiz data separately, use a different spreadsheet per quiz.

How to find a new spreadsheet

A spreadsheet Lantern creates is named Lantern - [quiz name] and lands under the connected account's My Drive.
​
The Google Sheets card on the Integrations page lists every quiz and its connected spreadsheet name and direct link.

Image showing the connected Google Sheets integration in Lantern, with a list of quizzes and links to their associated Google spreadsheets.

​
The first row in each spreadsheet is frozen so the column names stay visible while you scroll.

The columns

Inside each submissions sheet, you'll find the following columns:

  • Submitted at (in your store's timezone)

  • Email

  • Name

  • Last name (right after Name, only for quizzes whose Optin Page asks for a last name)

  • Phone

  • One column per question in quiz order

  • Recommended products

  • Product links

  • Results link

  • Country

  • Language and

  • Session ID

Question columns may not appear in the same order as the questions in your quiz.

Rows are added as soon as the quiz is completed. The Email column therefore includes the email addresses collected on the Optin Page, before the results. If a customer leaves their email later through the optional sign-up on the Results Page, it is not added to the spreadsheet. If your sheet needs the customer's email, use the Optin Page. See Collect customer emails for how to set this up.

Image showing a Google Sheets Submissions tab with quiz responses, question columns, and product recommendations.

By default, each question column name is identical to the question itself, unless you've set up Question Property IDs. In this case, the property IDs become the column titles. We recommend setting up short and clear Question Property IDs like skin_type or budget to help you better manage your data.

If a question contains dynamic text, such as {{ pet_name | lowercase | capitalize }}, that dynamic text is not included in the spreadsheet's column header. For example, How old is {{ pet_name | lowercase | capitalize }}? appears as How old is ? when no Question Property ID is set.
​
The column names stay the same even if you later reword the question, and text questions get a column, but their answers are only filled in when the question has a Question Property ID.

Multiple choice answers are joined with commas in one cell.
​
Product links are added as one URL per line in a single cell.

Editing the spreadsheet

You can add columns, formulas, filters and tabs to your spreadsheet. Lantern only adds submission rows to the Submissions tab.

When you add a new quiz question, Lantern adds a new column at the far right. If you reword a question without a Question Property ID, the new question text also creates a new column at the far right.

If a question has a Question Property ID, you can change its wording without affecting the spreadsheet column, as long as the Property ID stays the same. Changing the Property ID creates a new column at the far right.

Lantern keeps the old columns and their previous data. New submissions use the new column, while the old column remains empty for future submissions. If you remove a question, its old column also stays in the spreadsheet.​

If you delete the spreadsheet, Lantern creates a new one for that quiz when the next submission comes in.

Disconnecting your Google account from Lantern

To disconnect your Google account from Lantern, go to the main Integrations tab and click Disconnect on the Google Sheets card. Lantern stops sending submissions to your spreadsheets and no longer has access to your Google account.

Your spreadsheets stay in Google Drive. If you reconnect the same Google account later, Lantern uses the same spreadsheets again.

If the card shows Reconnect required, Lantern’s access to your Google account has been removed or has expired. This can happen after a password reset. Click Reconnect and sign in again.

Submissions received while the account was disconnected are not added to the spreadsheets when you reconnect.

Good to know

  • Use a separate Google account for each store. One Google account can connect to one Lantern store at a time. Connecting it to another store disconnects the first store, which will show Reconnect required. You can share spreadsheets between Google accounts in Drive if needed.

  • Sensitive answers are not shared. Answers marked Don’t share or Don’t store are never sent to Google Sheets, just as with other integrations.

  • Test submissions are included. Submissions from the quiz preview are also added to the spreadsheet.

Before Lantern had a direct Google Sheets integration, you could use Zapier to send quiz submissions to a spreadsheet. This option still works if you prefer it. See Use Zapier to send quiz submissions to Google Sheets.

Did this answer your question?