Send survey responses to Google Sheets with Shopify Flow

Shopify Flow can add a row to a Google Sheet for each finished survey, or for each question a customer answers or skips. Zenith starts the workflow, and Flow's Add row to spreadsheet action writes the row through your own Google account. Zenith never sees that account.

Before you start

  • A Flow workflow that starts on Zenith's trigger. If you have not made one yet, follow steps 1 to 3 of setting up Shopify Flow for Zenith, then come back here for step 4.
  • A spreadsheet your Google account can edit, with a tab ready for responses. Flow's Add row to spreadsheet action needs its Google Sheets for Shopify Flow connector, which you add in step 4, where you connect your own Google account.

Add the Google Sheets action

  1. Connect Google Sheets

    Click + and choose Action. The list opens filtered to Installed apps, so Google Sheets is missing until you click × on that filter. Search for and choose Add row to spreadsheet. Flow says the app is not installed: click Install and sign in with your Google account. Allow Flow to See, edit, create, and delete all your Google Sheets spreadsheets, or it cannot add your rows (Shopify's guide to Add row to spreadsheet). Close the sign-in window and refresh the page.

  2. Fill in the row

    If the Add row to spreadsheet step is still in your workflow, select it. Otherwise click +, choose Action and choose it again. If it is greyed out, refresh the page. Fill in Spreadsheet URL and Tab name, then paste the row below for your trigger into Row contents.

  3. Turn it on

    To give it a name, click More actions, then Rename. Then click Turn on workflow, and Turn on to confirm.

One row per order (recommended)

The right choice for most stores. Choose Survey completed as the trigger in step 3, and each finished survey adds one row. Paste this into Row contents:

{{completedAt}}, {{orderId}}, {{questionsAnswered}}, {{questionsSkipped}}, {{npsScore}}, {{csatScore}}, {{cesScore}}, {{attributionAnswer | replace: ",", ";"}}, {{summary | replace: ",", ";"}}

That gives you nine columns: when the survey was finished, which order, how many questions were answered and how many skipped, the NPS, CSAT and CES scores, the answer to your attribution question, and a summary of every answer, one question per line in a single cell. A score your survey does not ask for arrives as n/a. A customer who stops partway adds no row. Every other field is in the variables tables, and any of them can go in the row the same way.

One row per answer

Choose Survey response received as the trigger in step 3, and every answer adds a row, including answers from customers who do not finish. Paste this into Row contents:

{{submittedAt}}, {{orderId}}, {{question | replace: ",", ";"}}, {{answer | replace: ",", ";"}}, {{status}}, {{comment | replace: ",", ";"}}

That gives you six columns: when, which order, the question, the answer, whether it was answered or skipped, and the comment. Every other field is in the variables tables, and any of them can go in the row the same way.

Commas and empty cells

Row contents is split on commas, so a value with a comma in it spreads across extra columns. That includes every answer with several choices, which arrives as a list such as Instagram, A friend. Both rows above swap the commas out of every field that can hold one; do the same for any field you add. Shopify also notes that an empty value can shift the cells after it. Zenith never sends an empty field, so that cannot happen to your rows: a field with nothing in it arrives as n/a.

What to know

  • One row per answer means one row per question. On Survey response received, a customer who answers three questions adds three rows. Skipped questions add a row too, with Status set to skipped; add a condition on Status if you only want answers.
  • Zenith cannot see your workflows. If rows stop arriving, check the workflow in Flow itself.

Install Zenith from the Shopify App Store