Skip to content
Digital Inspiration DocsDigital Inspiration Docs

Mail Merge can copy the customers of your WooCommerce store into a Google Sheet, one customer per row, with the fields you pick as columns. You connect with a read-only API key, so the add-on can’t change anything in your store.

  1. In your WordPress dashboard, go to WooCommerce and choose Settings, open the Advanced tab and click REST API. Click Create an API key.

    WooCommerce Settings Advanced tab with the REST API section and the Create an API key button
    Create the key from the REST API section of the WooCommerce Advanced settings.
  2. Add a description, like Mail Merge, and set Permissions to Read.

    WooCommerce REST API key details with Read permissions selected
    Give the key Read permission only.
  3. Click Generate API key. Copy the Consumer key and Consumer secret and keep them somewhere safe.

  1. In your Google Sheet, go to Extensions > Mail Merge with Attachments > Import Contacts.

    Google Sheets Extensions menu with the Mail Merge with Attachments submenu open and Import Contacts highlighted
    Open Import Contacts from the Extensions menu in Google Sheets.
  2. Under Import data from, choose WooCommerce. In WooCommerce Store URL, type your WordPress site’s address, like https://example.com/. Paste the Consumer Key and Consumer Secret.

  3. Click Get Fields, then pick the fields you want as columns under Contact Fields, like email and first_name.

  4. Under Import Location, choose Append to current sheet or Create a new sheet, then click Import data.

    Mail Merge import window with a WooCommerce store URL, consumer key, consumer secret and customer fields
    Paste the store URL and keys, pick the fields, then click Import data.

Row 1 gets the WooCommerce field names, like first_name, and those become your merge fields: {{first_name}}. You can rename them to friendlier titles like First Name before you write your email. When you set up the merge, choose the email column in the Send to field under Recipients.

  • When you’re done importing, go back to the same REST API page and revoke the key. The customers you already imported stay in your sheet.
  • Curious how it works? This tutorial shows how the WooCommerce API is used with Google Apps Script to export customers.