Gusto
Connect & Ingest data from Gusto
Gusto is a cloud-based payroll, benefits, and HR platform for small and medium businesses. The Sling Gusto connector extracts data from the Gusto REST API, supporting company details, employees, jobs, compensations, departments, payroll data, benefits, time-off activities, and contractor payments.
CLI Pro Required: APIs require a CLI Pro token or Platform Plan.
Setup
The following credentials and inputs are accepted:
Secrets:
client_id(required) -> Your Gusto OAuth2 application Client IDclient_secret(required) -> Your Gusto OAuth2 application Client Secret
Inputs:
company_id(required) -> The UUID of your Gusto company. Find it viaGET /v1/token_infoanchor_date(optional) -> The starting date for historical data extraction (default: 1 year ago). Format:YYYY-MM-DD
Authentication
Gusto uses OAuth2 Authorization Code flow. Sling handles the entire flow automatically β on first run, it opens your browser for authorization and stores tokens for future use.
Go to the Gusto Developer Portal and create an account
Create a new Organization and then a new Application
Note your Client ID and Client Secret
Set the Redirect URI to
http://localhost:4589/callbackConfigure the connection using the Client ID and Client Secret (see examples below)
On first run, Sling will:
Open your browser to the Gusto authorization page
You authorize the application and are redirected back to
localhost:4589Sling exchanges the code for access and refresh tokens, stored locally
On subsequent runs, Sling automatically refreshes the access token using the stored refresh token β no browser interaction needed.
Sandbox vs Production: By default, the connector uses the Gusto demo/sandbox environment (api.gusto-demo.com). For production, override base_url, token_url, and authorize_url in secrets to point to api.gusto.com.
Finding Your Company ID
After your first successful authorization, find your company UUID:
The response includes a resource.uuid field β that is your company_id.
Using sling conns
sling connsEnvironment Variable
See here to learn more about the .env.sling file.
Sling Env File YAML
See here to learn more about the sling env.yaml file.
With anchor date for historical data:
Replication
Here's an example replication configuration to sync Gusto data to a PostgreSQL database:
Endpoints
Company & Organization
companies
Company details, settings, and entity info
No
locations
Company office locations and addresses
No
departments
Company departments with assigned employees
No
Employees & Jobs
employees
All employees (active, onboarding, terminated)
No
jobs
Employee job records (title, hire date)
No
compensations
Compensation records (pay rate, FLSA status)
No
Payroll
pay_schedules
Pay schedule configurations (frequency, anchor dates)
No
pay_periods
Pay periods with payroll association
Yes
payrolls
Processed payrolls with compensation totals
Yes
Benefits & Time Off
company_benefits
Benefits configured for the company
No
employee_benefits
Individual employee benefit enrollments
No
time_off_activities_vacation
Vacation time-off balances and activity history
No
time_off_activities_sick
Sick time-off balances and activity history
No
Contractors
contractor_payments
Contractor payment records
Yes
To discover available endpoints:
Incremental Sync
The Gusto connector uses date-range-based incremental sync for supported endpoints:
First run: Fetches records from
anchor_date(default: 1 year ago) to presentSubsequent runs: Only fetches records after the last sync checkpoint
Incremental sync is supported for:
pay_periodsβ syncs by end datepayrollsβ syncs by check datecontractor_paymentsβ syncs by check date
Parent-Child Endpoints
Several endpoints use a queue-based pattern where parent records feed child endpoint iteration:
employeespopulatesemployee_idsqueue, used by:jobsβ fetches jobs per employeeemployee_benefitsβ fetches benefits per employeetime_off_activities_vacationβ fetches vacation activity per employeetime_off_activities_sickβ fetches sick activity per employee
jobspopulatesjob_idsqueue, used by:compensationsβ fetches compensations per job
Ensure parent endpoints run before their children in your replication configuration.
API Versioning
The connector uses Gusto API version 2025-06-15. Gusto uses date-based API versioning via the X-Gusto-API-Version header.
Rate Limiting
The connector automatically handles Gusto's rate limits:
Uses conservative rate limiting (3 requests/second)
Retries with exponential backoff on 429 (rate limit) responses
Maximum 5 retry attempts
If you are facing issues connecting, please reach out to us at [email protected], on discord or open a Github Issue here.
Last updated
Was this helpful?