“How do I connect WooCommerce orders to Google Sheets?”
– Ecommerce specialist
“Is there a way to display WooCommerce products in Google Sheets?”
Ecommerce maintenance takes hours to do. You want more time to strategize, not crunch numbers. If you maintain a WooCommerce website, you don’t experience any difference. You’re juggling different things at once so you want to do reports fast.
Why WooCommerce?
I did a small and quick survey in the Online Genius slack. WooCommerce is one of the most used e-commerce platforms with Shopify. Though not as high, the value comes from automating reports connecting ecommerce data with other data. Integration of information across platforms into one report is a goldmine to interpret data.
In this article, learn how to use the WooCommerce API in Google Sheets to import products data or orders information.
Why Pay for Automation at All?
Automations solve huge problems in organizations. So, most automation tools are paid products. Yes, you can do everything manually for free to save money. But in perspective, instead, you might want to spend a little to save time. The number of hours that you take back to avoid hellish and repetitive work is worth the price. You choose.
I hate a super cluttered desktop. Ever experienced a desktop (or Downloads folder) full of spreadsheet files? I hate them. It increases stress and productivity comes to an all-time low. The amount of time I clicked the Export CSV button is unbearable. Automation avoids all this.
Requirement: WooCommerce API
You need to go through the WooCommerce API to import the data into Google Sheets. Unfortunately, there’s no other way around as you need to go through some code syntax. Luckily, accessing the WooCommerce data is within reach and easy to do. But note that you need a little bit of coding knowledge to understand this.
First thing is to create the API key for WooCommerce. The guide assumes WooCommerce is already installed on your WordPress.
3 – Click on the big Create an API key purple button or Add key button.
5 – The Consumer key and Consumer secret are created.
IMPORTANT: Remember and note these API credentials now as you won’t see them again.
Remember that the Consumer key is your username and the Consumer secret is your password. You use these two components later on.
How To Connect WooCommerce Data To Google Sheets
This article shows two options on how to import WooCommerce orders to Google Sheets. Option 1 is using a Google Sheets add-on. Option 2 is using a third-party integration tool.
Option 1: Google Sheets Add-On
You’ll use Two Minute Reports for this example. TMR imports data from the WooCommerce API directly to Google Sheets in minutes.
Installing The Google Sheets Add-on
1 – Go to your Google Drive workspace.
2 – Click on + New then create a new Google Sheets file.
4 – Search for Two Minute Reports. Then install it.
Import WooCommerce Data Source
3 – Name your data source. Then select ‘API Bridge’ under Type.
4 – For ‘Base URL’, add your complete domain plus /wp-json/wc/v3
For example: https://www.yourdomain.com/wp-json/wc/v3
5 – For ‘Authorization’, select ‘Basic’. The username is the Consumer key while the password is the Consumer secret from before.
6 – For ‘Headers’, keep them empty.
7 – Click on Save.
You may choose ‘Test before saving’ to verify that the API base URL is valid. Select ‘GET’ for Method.
Add /orders
under Test URL Suffix. If not valid, the tool gives instructions on how to fix it.
If valid, the tool prompts ‘Successfully authenticated’.
Import WooCommerce Data Query
This point in the process is the importing orders list to the spreadsheet.
2 – Name your data query. Then find the API Bridge data source you imported earlier.
3 – ‘Save on Sheet’ is the location of the sheet where the data is imported to. The location might be ‘Sheet 1’ but it depends if you named your sheet.
4 – Add A1 under ‘Cell’.
5 – Unselect ‘Append new data’. Unselected means the data overwrites the current spreadsheet.
6 – Then follow the screenshot for the next set of inputs.
Method: GET
URL Path/Suffix: /orders
. We’ll list all orders in this example.
JMES Path: Leave it empty
Pagination: None
Output Format: Grid (default)
6 – Click on Run query.
Viola! You imported the orders data on a Google Sheet. These are the first steps in pulling in any important data from the WooCommerce API. At this point, you may take the steps on accessing your required data.
Other WooCommerce Data Points
At this point, the data you want to access depends on the API endpoints or API paths. All you need to do is change the URL Path/Suffix. For any attribute <>
, this means you need to change it dynamically to the appropriate one based on your labeling.
For example, if you need to list all customers, you add /wp-json/wc/v3/customers
in URL Path/Suffix. If you need information on product ID 04, you add /wp-json/wc/v3/products/04
in URL Path/Suffix. Learn more about WooCommerce API endpoints.
Information | API Endpoint |
---|---|
Retrieve an order | /wp-json/wc/v3/orders/<id> |
List all orders | /wp-json/wc/v3/orders |
Retrieve a coupon | /wp-json/wc/v3/coupons/<id> |
List all coupons | /wp-json/wc/v3/coupons |
Retrieve a customer | /wp-json/wc/v3/customers/<id> |
List all customers | /wp-json/wc/v3/customers |
Retrieve an order note | /wp-json/wc/v3/orders/<id>/notes/<note_id> |
List all order notes | /wp-json/wc/v3/orders/<id>/notes |
Retrieve a refund | /wp-json/wc/v3/orders/<id>/refunds/<refund_id> |
List all refunds | /wp-json/wc/v3/orders/<id>/refunds |
Retrieve a product | /wp-json/wc/v3/products/<id> |
List all products | /wp-json/wc/v3/products |
Retrieve a product variation | /wp-json/wc/v3/products/<product_id>/variations/<id> |
List all product variations | /wp-json/wc/v3/products/<product_id>/variations |
Retrieve a tax rate | /wp-json/wc/v3/taxes/<id> |
List all tax rates | /wp-json/wc/v3/taxes |
Retrieve a payment gateway | /wp-json/wc/v3/payment_gateways/<id> |
List all payment gateways | /wp-json/wc/v3/payment_gateways |
Retrieve a shipping method | /wp-json/wc/v3/shipping_methods/<id> |
List all shipping methods | /wp-json/wc/v3/shipping_methods |
Schedule WooCommerce Reports
Two Minute Reports has a scheduling function. This means the spreadsheet refreshes the acquired data from the API. Reports are automated even more.
2 – Once inside, you can set the terms of the report schedule.
-Name
-Repeats: This is where you set how often the data refresh happens. Two Minute Reports can do hourly refreshes.
-Timezone
3 – You can also set the notification terms. Two Minute Reports can email you a PDF or Excel of the data. You can also decide to have the email contain the sheet content in the email body.
4 – Click on Save.
Scheduling helps when you need to report on WooCommerce over time. No more copy and paste every day, or every week, or every month.
Option 2: Third-Party Integration Tool
You’ll use Integromat (now branded as Make) for this option. Make is a powerful integration platform that allows you to visualize, design, and automate your work in minutes. In other words, it lets apps talk to each other so that you can remove repetitive tasks.
Create a Make account and get started.
Getting Started
Setting Up WooCommerce Connection
The first section is setting up the WooCommerce connection.
2 – Under Connection name, name the connection. The name is arbitrary so it’s up to you. But I suggest writing a descriptive name for later use.
3 – Under Store’s URL, enter the domain of your store. Include https://
.
4 – Under Consumer key, enter the generated consumer key from earlier.
5 – Under Consumer secret, enter the generated consumer secret from earlier.
6 – Click on Continue.
7 – Under Watch, select either New only, Completed only, or All changes.
8 – Under Maximum number of returned orders, if it appears, enter 10 for now.
There may be advanced settings. Ignore those for now.
9 – Click on OK.
Done! At this point, you’re finished with the WooCommerce connection side.
Setting Up Google Sheets Connection
Next is setting up the Google Sheets connection. But first, you need to go to Google Drive and create a new Google Sheets file.
1 – Go to your Google Drive workspace.
2 – Click on + New then create a new Google Sheets file.
3 – Name the Google Sheets file. The name is arbitrary so it’s up to you. But I suggest writing a descriptive name for later use.
4 – Name the tab or sheet on the bottom. The name is arbitrary so it’s up to you. But I suggest writing a descriptive name for later use.
5 – Name the headers. It’s helpful to map out the correct data point in the integration process later.
Column A
Column B
Column C
Column D
The first steps are done! Go back to Integromat.
1 – Under Connection, click on Add.
2 – Name the connection. The name is arbitrary so it’s up to you. But I suggest writing a descriptive name for later use.
3 – Click on Continue. A pop-up window appears.
5 – Click on Allow. Integromat asks permission to access your Google account. This is standard procedure. The window closes after clicking it.
6 – Back in Integromat, under Mode, choose Select spreadsheet and sheet. This is to make the integration simpler.
7 – Under Spreadsheet, select the Google Sheets file you created earlier. Find the name you gave it.
8 – Under Sheet, select the Google Sheets tab from earlier. Find the name you gave it. After which, the Values are created.
9 – Under Values is where it gets tricky. The headings from the Google Sheets file are the parameters where you decide the values. Once you click on the field, you’re presented with different parameters. Don’t be overwhelmed. Read the context of the parameters to know which one is mapped to which.
Under (A), select Created at
.
Under (B), select Order number
.
Under (C), select Status
.
Under (D), select Total
.
The parameters that appear here are from the WooCommerce connection. Other parameters are also available. Make sure to add an extra column and name it on the Google Sheets spreadsheet so on and so forth.
10 – Click on Continue. Now it’s time to run and process the integration.
A spinning wheel and a Log
on the bottom right appear. Wait for the integration to finish. How long the integration takes depends on the Maximum number of results you select. It’s finished when a) green checkmarks appear, and when b) The scenario run was completed appears in the Log
.
Go to your Google Sheets file and you now see the ecommerce data successfully exported from WooCommerce. Viola! Congratulations you imported WooCommerce orders to Google Sheets with complete information! You may also add other parameters or fields if you need them.
Schedule Automation and Reports
Integromat can schedule the automation based on cycles. The schedule is up to you.
2 – Under Run scenario, select the schedule you need. What you select on this parameter dictates the next ones.
If you select At regular intervals, you need to select the minutes that Integromat processes the automation.
If you select Once, you need to select the date.
If you select Every day, you need to select the time.
If you select Days of the week or Days of the week, you need to select the days.
3 – Click on Activate. Ignore any advanced settings for now.
Viola! Congratulations! You now know how to import WooCommerce orders to Google Sheets with the API. The methods above automate accessing data without manual import and export. It avoids spreadsheet headaches.
More articles on automation:
Import GA4 data to Google Sheets
Import Shopify data to Google Sheets
Import Google Ads data to Google Sheets
Import WooCommerce data to Google Sheets
Import Google Analytics data to Google Sheets
Import Facebook Page Insights to Google Sheets
Import LinkedIn Ads API data to Google Sheets
Import Facebook Ads data to Google Sheets
Import Mailchimp data To Google Sheets
Export Gmail to Google Sheets
Import JSON to Google Sheets
Import TikTok ads to Google Sheets
Conclusion: Create WooCommerce Reports Faster
Know how to use an API in Google Sheets for your ecommerce needs. Google Sheets is a web-based spreadsheet app that provides an easy way to analyze data. With the help of Google Sheets add-ons, you can use external APIs and automate reporting.
You’re wasting time manually importing and exporting data. If you’re a marketer, automated reporting through APIs makes lives easier.