ml-connector
Sage X3Google Sheets

Sage X3 and Google Sheets integration

Your finance team works in both Sage X3 and Google Sheets. Rather than exporting data from X3 and re-entering it manually into a shared spreadsheet, ml-connector flows the records automatically. Suppliers, purchase orders, and GL entries from Sage X3 populate into Sheets on a schedule you control, so spreadsheet-driven workflows see current data without manual re-keying. The integration bridges X3 OAuth2 authentication, maps GL accounts and cost center dimensions, and maintains a full audit trail of every record that moves.

How Sage X3 works

Sage X3 exposes suppliers, customers, purchase orders, sales and supplier invoices, products, GL accounts, and GL entries through REST (api1) and GraphQL (Xtrem) endpoints, with a customer-specific base URL and folder name. Authentication uses OAuth2 client credentials via a Connected Application, generating bearer tokens with a 5-minute lifetime and 30-day refresh windows. X3 does not support outbound webhooks, so records are detected via delta queries using updatedDate and modifiedDateTime fields. Access tokens expire quickly and refresh tokens are short-lived, requiring centralized token management. REST api1 returns a default page size of 20 records and has no formal OpenAPI spec, so entity class names must be looked up in the X3 metadata browser.

How Google Sheets works

Google Sheets is a cloud spreadsheet with a REST API (v4) for reading, writing, and formatting data. Authentication uses OAuth 2.0 with either user-delegated Authorization Code flow or Service Account credentials for server-to-server access. Data is stored in named sheet tabs with customer-defined schema - no native ERP entities, so suppliers, POs, and GL entries are defined by column headers. The API supports A1 notation ranges for reads and writes, named ranges for structured access, and Drive watch channels for event notifications, though watch channels expire hourly and require manual renewal. Sheets is general-purpose, not purpose-built for ERP integration, so column layout and entity mapping are customer-driven.

What moves between them

Sage X3 records flow into Google Sheets on a configurable polling schedule, typically every 15 to 60 minutes. Suppliers, purchase orders, invoices, and GL entries are read from X3 using OAuth2 bearer tokens and delta queries, then written to designated Sheets tabs using Service Account credentials. GL entries are mapped to customer-defined GL account and cost center columns, so payroll, manufacturing, and procurement allocations land on the correct dimensions. The flow is unidirectional from X3 into Sheets; Sheets is read-mostly for operational reporting, not written back to X3. Customer-defined column mappings ensure schema alignment across both systems.

How ml-connector handles it

ml-connector refreshes Sage X3 bearer tokens before they expire at the 5-minute mark, using the 30-day refresh token to obtain new credentials without re-authentication. It polls X3 using the updatedDate field on each entity class to detect changes since the last run, fetches changed records in pages of up to 100, and transforms them to the customer-defined Sheets column layout. GL entries are matched to their GL account and cost center codes so analytical dimensions land on the correct rows in Sheets. Service Account credentials are used for Sheets writes, avoiding user-delegated OAuth2 consent flows. Because X3 has no webhooks, polling is the only mechanism; the schedule can be tuned to balance freshness against API quota. Watch channels on Google Drive can detect Sheets modifications but are not used for this inbound flow. Every record carries a source timestamp and audit trail, so data lineage is traceable.

A real-world example

A mid-sized distributor uses Sage X3 for procurement, inventory, and finance, and maintains a Google Sheets workbook for daily financial planning, vendor aging, and budget variance analysis. Before the integration, the finance team exported supplier invoices and GL entries from X3 every morning, copied them into Sheets, and manually reconciled line items against budget codes. With Sage X3 and Google Sheets connected, each night the previous day's invoices and GL postings flow into Sheets automatically, mapped to the correct cost center and GL account, so the planning workbook is always fresh. The morning financial review starts with current data, variance analysis is accurate, and the manual export-and-paste step is eliminated.

What you can do

  • Sync suppliers, customers, and purchase orders from Sage X3 into designated Google Sheets tabs on a configurable polling schedule.
  • Map Sage X3 GL entries to customer-defined GL account and cost center columns so financial dimensions align across both systems.
  • Refresh Sage X3 OAuth2 bearer tokens automatically and manage short-lived access credentials so polling never stalls on authentication.
  • Detect changes in Sage X3 using delta queries based on updatedDate fields, so only modified records are synced and API quota is conserved.
  • Maintain a complete audit trail for every record, including source timestamp and transformation detail, so data lineage is traceable.

Questions

Does ml-connector handle Sage X3 short-lived access tokens automatically?
Yes. ml-connector monitors the 5-minute token lifetime and refreshes the bearer token using the 30-day refresh token before expiry, so polling is never interrupted by authentication timeouts. Token refresh happens transparently on every polling cycle.
How does the integration align GL entries from Sage X3 to Google Sheets column layout?
Customer defines a column mapping that specifies which X3 GL account and cost center fields map to which Sheets columns. ml-connector transforms each GL entry record using this mapping before writing to Sheets, so analytical dimensions land on the correct columns without manual re-keying.
Can data flow from Google Sheets back into Sage X3?
No. This integration is read-only from X3 into Sheets. Sage X3 is the source of truth for financial and procurement data, and Sheets is used for operational reporting and analysis. Writes to X3 require direct integration with its REST or GraphQL endpoints outside this connector.

Related integrations

Connect Sage X3 and Google Sheets

Free to use. Add your credentials, ping your real systems, and see if we fit.

Get started