# Sync Gusto payroll to Google Sheets every payday

> Auto-append every processed Gusto payroll into a Google Sheets ledger so finance gets one clean row per employee per pay period.

- Workflow type: code
- Services: Gusto, Google Sheets
- Categories: Finance, Operations
- Published: 2026-07-17

## What it does

- Runs automatically on your payday schedule and pulls every processed payroll from Gusto in the last week
- Breaks each payroll down into per-employee rows with check date, pay period, department, gross, net, and taxes
- Appends the rows to a Google Sheets tab your finance team already owns, so they can pivot, filter, and report however they want
- Preserves exact amounts as strings so no rounding or precision loss creeps into the ledger

## What you'll need

- A Gusto account with permission to read payrolls and departments
- A Google Sheets file with a tab ready to act as your payroll ledger
- The spreadsheet ID and tab name so we know where to append
- A payday cadence to schedule the sync against (weekly, biweekly, or semimonthly all work)

## Prompt

Every payday at 6:00 PM, sync every processed Gusto payroll from the past 7 days into a Google Sheets ledger tab for the finance team. This is a deterministic node-based code workflow with no reasoning required. Trigger: cron, scheduled to match the company's pay cadence (default: every Friday at 18:00 in the org's timezone; adjust to biweekly or semimonthly as needed).

Step 1. Call gusto.List Payrolls with processed=true and a check_date range covering the last 7 days ending at the current run time. Paginate explicitly: increment the page parameter and keep reading until X-Total-Pages is reached (do not rely on the default cap). Collect the full array of payrolls returned across all pages.

Step 2. For each payroll in that list, call gusto.Get Payroll using the payroll UUID. This returns the full per-employee compensation breakdown (employee_compensations), pay period start and end, check date, and totals including employer taxes and employee taxes per employee.

Step 3. Flatten the results into one row per employee per payroll. For each employee_compensation on each payroll, build a row with these columns in order: check date, pay period start date, pay period end date, employee full name, department name, gross pay, net pay, employer taxes total, employee taxes total, payroll UUID.

Step 4. Call google-sheets.Append Values once with the full batch of rows against the configured spreadsheet ID and tab name (for example, 'Payroll Ledger!A:J'). Use USER_ENTERED as the value input option so Sheets keeps the values as-is.

Important nuances to bake in. Gusto returns money and hours as decimal strings such as "1234.56" to avoid floating-point precision loss. Do not convert these to numbers in code; pass the exact strings straight through into the Sheets row so precision is preserved. Include the payroll UUID column so finance can dedupe on the rare chance two runs overlap. If the List Payrolls call returns zero processed payrolls in the window, append nothing and finish cleanly. Spreadsheet ID, tab name, lookback days, and timezone should be configuration inputs on the workflow so finance can point it at their own ledger. Employee name should be concatenated from first and last name; department comes from the department object on each employee_compensation (fall back to an empty string if unassigned).

Output: an append-only Google Sheets ledger that finance can pivot however they want, updated automatically every pay cycle.

## How to customize

- Change the schedule to match your pay cadence, or point it at multiple tabs for multiple pay groups
- Swap in your own column layout by editing the row template (add bonus, PTO, reimbursements, or per-tax breakdowns)
- Widen the lookback window if you want to backfill historical pay periods on the first run

## FAQ

### Does this work with weekly, biweekly, or semimonthly pay schedules?

Yes. Set the schedule to run once after each payday and the workflow grabs everything processed in the previous seven days. If your cadence is different, widen or narrow the lookback window to match.

### Will it duplicate rows if I run it twice?

Every row includes the payroll ID, so if two runs ever overlap you can dedupe on that column in Sheets. Most teams schedule it to run once per pay cycle so overlap does not happen in the first place.

### Does it include contractor payments?

This workflow covers regular employee payrolls. Contractor payments live on a separate part of Gusto and would need their own version of the flow if you want them in the same ledger.

### Can I add columns like bonus, PTO, or reimbursements?

Yes. Gusto returns a per-employee compensation breakdown with those buckets, so you can add any column your ledger already uses just by extending the row template.

### What about the pay runs from before I turned this on?

You can do a one-off backfill by temporarily widening the lookback window on the first run, then let the recurring schedule take over from there.

Use this prompt in General Input: https://www.generalinput.com/prompts/sync-gusto-payroll-to-google-sheets-every-payday