Skip to content

Premium Integrations

How to Log WooCommerce Purchases to a Google Sheet

A simple sales log in a spreadsheet is easy to share, filter and chart. Zapify can add a row each time a product is bought, using the A product is purchased trigger and the Add a row to a spreadsheet action. The trigger is free; Google Sheets is Zapify PRO.

What this automation does

The automation is one trigger plus one action:

  • Trigger: A product is purchased (WC_PRODUCT_PURCHASED, WooCommerce)
  • Action: Add a row to a spreadsheet (GOOGLESHEETS_APPEND_ROW, Google Sheets)

When the chosen product is bought, Zapify appends one row to your sheet.

Before you start

  • WooCommerce installed and active.
  • A Google account with access to the spreadsheet, and its Spreadsheet ID, the long string in its URL between /d/ and /edit.
  • A header row in the sheet, such as Order, Date, Email, Product, Total.

PRO feature

Google Sheets is a Zapify PRO integration and needs a Connection under Settings → Connections. The WooCommerce trigger is free.

How to build the automation

Step 1: Connect Google Sheets

Google Sheets connects by signing in rather than pasting a key.

  1. Go to Settings → Connections.

Open the Connections tab

  1. Choose Google Sheets and click Add New.

  1. Sign in with the Google account that can edit your sheet and approve the permissions.

See Connections for how this works and how to reconnect one that expires.

Step 2: Create a new automation

  1. In the WordPress admin, go to Zapify → Automations.
  2. Click Add New to open the builder.
  3. Name it clearly, such as Log purchases to a sheet.

Create a new automation

Step 3: Add the "A product is purchased" trigger

  1. Click Add Trigger.

Add a trigger

  1. Choose WooCommerce as the app.

Select WooCommerce as the trigger

  1. Select A product is purchased.

Select A product is purchased

  1. In the Product field, choose the product that should start the automation.

Step 4: Add the "Add a row to a spreadsheet" action

  1. Click Add Action.

Add an action

  1. Choose Google Sheets as the app.

Select Google Sheets as the action

  1. Select Add a row to a spreadsheet.

Select Add a row to a spreadsheet

Step 5: Configure the action

Field Required What it does
Connection Yes The Google account from Step 1.
Spreadsheet ID Yes The ID from the sheet's URL.
Sheet name No The tab to append to. Defaults to the first one.
Columns Yes One entry per column, left to right.

For example, to match the header row above:

  1. {{trigger:ORDER_NUMBER}}
  2. {{trigger:ORDER_DATE}}
  3. {{trigger:BILLING_EMAIL}}
  4. {{trigger:PRODUCT_NAMES}}
  5. {{trigger:ORDER_TOTAL}}

Keep the order of the Columns entries the same as the sheet's columns.

Configure the Add a row to a spreadsheet action

Step 6: Set the steps Live and save

Each trigger and action has its own Live / Off / Draft switch. A new automation starts as a Draft and does nothing until its steps are Live.

  1. Set the trigger and every action to Live.
  2. Click Save.

Set the automation live

Step 7: Test it

Place a test order and check the sheet. Zapify → Logs shows the range Google reports it wrote to.

Tokens you can use

Token What it holds
Billing email / Billing first name / Billing last name / Billing phone The customer's details from the order.
Product names / Product IDs What was bought.
Order ID / Order number / Order total / Order currency / Order date The order itself.

Conclusion

With the A product is purchased trigger and the Add a row to a spreadsheet action, every sale lands in a sheet you can share and chart. For form submissions, see logging WPForms submissions to a Google Sheet.

FAQs

Is this free in Zapify?

The WooCommerce trigger is free. The Google Sheets action needs an active Zapify PRO licence and a Connection.

Can I log every product instead of one?

Use the A product is purchased trigger once per product, or use An order changes status set to Completed to log whole orders.

Is a value that starts with an equals sign a risk?

No. Zapify escapes values that begin with =, +, - or @ so a customer cannot put a formula into your sheet.

Why did the row land in the wrong columns?

The first Columns entry becomes the first column, and so on. Reorder the entries to match the sheet.

Do I need to write any code?

No. Everything is configured in the Zapify visual builder.

Was this page helpful?