How to export Square sales to Google Sheets automatically
Square’s dashboard reports are good, but sooner or later you want the numbers in a spreadsheet: to combine locations, share with a bookkeeper, track labor or food cost, or build a chart Square doesn’t offer. Square doesn’t have a scheduled export to Google Sheets, so here are the three practical options, from free-and-manual to fully automatic.
| Method | Cost | Effort | Stays up to date? |
|---|---|---|---|
| 1. CSV export from the Square Dashboard | Free | A few minutes, every time | No — it’s a snapshot |
| 2. Google Apps Script + Square API | Free | 30–60 min setup, plus maintenance | Yes, on a schedule you set |
| 3. A connector app (e.g. Rowquill) | Paid | About 2 minutes | Yes, daily or hourly |
Method 1: Export a CSV from the Square Dashboard
Best if you only need the data occasionally.
- Sign in to your Square Dashboard and open Transactions.
- Set the date range and location filters you want.
- Click Export and choose the transactions CSV (one row per payment) or the item detail CSV (one row per item sold).
- In Google Sheets, open File → Import → Upload, pick the CSV, and choose Replace current sheet or Append to current sheet.
For totals by day, the Reports → Sales summary page also has an export option. The downside is obvious: you repeat this every week or month, and anything built on the old data has to be re-pointed.
Method 2: A free Google Apps Script that pulls from the Square API
Best if you’re comfortable pasting code and keeping it working. This script adds yesterday’s payments to a Payments tab and can run every morning on its own.
Step 1 — Get a Square access token
- Go to the Square Developer Console, sign in with your Square account, and create an application (any name).
- Open the application’s Credentials page, switch to Production, and copy the access token.
Step 2 — Add the script
- In your Google Sheet, open Extensions → Apps Script.
- Open Project Settings → Script properties, add a property named
SQUARE_TOKEN, and paste your token as the value. - Back in the editor, replace the contents of
Code.gswith:
// Appends yesterday's Square payments to a "Payments" tab.
// Amounts from Square are in the smallest currency unit (cents for USD).
function exportYesterdaysPayments() {
var token = PropertiesService.getScriptProperties().getProperty('SQUARE_TOKEN');
var ss = SpreadsheetApp.getActiveSpreadsheet();
var sheet = ss.getSheetByName('Payments') || ss.insertSheet('Payments');
var end = new Date(); end.setHours(0, 0, 0, 0); // today 00:00 (script time zone)
var start = new Date(end.getTime() - 24 * 60 * 60 * 1000); // yesterday 00:00
var rows = [], cursor = null;
do {
var url = 'https://connect.squareup.com/v2/payments'
+ '?begin_time=' + encodeURIComponent(start.toISOString())
+ '&end_time=' + encodeURIComponent(end.toISOString())
+ '&limit=100' + (cursor ? '&cursor=' + encodeURIComponent(cursor) : '');
var res = UrlFetchApp.fetch(url, { headers: { Authorization: 'Bearer ' + token } });
var data = JSON.parse(res.getContentText());
(data.payments || []).forEach(function (p) {
var fee = (p.processing_fee || []).reduce(function (s, f) { return s + f.amount_money.amount; }, 0);
rows.push([
p.created_at, p.id, p.status, p.source_type, p.location_id,
money(p.amount_money), money(p.tip_money), money(p.total_money),
fee / 100, money(p.refunded_money)
]);
});
cursor = data.cursor;
} while (cursor);
if (sheet.getLastRow() === 0) {
sheet.appendRow(['Created at', 'Payment ID', 'Status', 'Source', 'Location',
'Amount', 'Tip', 'Total', 'Processing fee', 'Refunded']);
}
if (rows.length) {
sheet.getRange(sheet.getLastRow() + 1, 1, rows.length, rows[0].length).setValues(rows);
}
}
function money(m) { return m ? m.amount / 100 : 0; }
Step 3 — Run it and schedule it
- Click Run once and approve the permissions Google asks for.
- Open Triggers (the clock icon) → Add Trigger → choose
exportYesterdaysPayments, event source Time-driven, Day timer, and a time after midnight.
What to watch out for
- Duplicates: running it twice on the same day appends the same payments twice. Delete duplicates or add a check on the Payment ID column.
- Payments vs. sales: this pulls payments. Item-level sales, discounts and refunds come from Square’s Orders API, which needs a longer script.
- History: it only adds yesterday. To backfill, change
startandendand run it manually for each range. - Maintenance: if Square changes its API or your token is revoked, the script stops quietly. Check on it now and then.
Method 3: Use a connector that does it for you
If you’d rather not maintain a script, a connector keeps the same Sheet current without code. This is what we’re building with Rowquill: connect Square with read-only access, pick your reports (daily sales summary, item & category sales, transactions with fees, payment methods), and Rowquill creates and refreshes the Sheet in your Google Drive — including a history backfill.
General-purpose automation and data-connector tools can also do this; compare how they handle history, refresh frequency and price before you pick one.
Join Rowquill early access — first month free at launch.