ml-connector
FreshBooksMarketo

FreshBooks and Marketo integration

FreshBooks runs invoicing and expense tracking for small businesses. Marketo drives B2B marketing automation and lead management. Connecting the two enriches your prospect data with invoice and payment history, so your marketing campaigns can segment leads by their transaction activity and payment health. Invoice and payment events from FreshBooks flow into Marketo, and client data is kept in sync across both platforms. ml-connector bridges the OAuth 2.0 delegation and polling constraints between the two systems.

How FreshBooks works

FreshBooks exposes clients, invoices, payments, expenses, bills, and chart of accounts through REST APIs at https://api.freshbooks.com. Authentication uses OAuth 2.0 Authorization Code grant (user-delegated, not Client Credentials), with scopes set per resource. FreshBooks pushes invoice, payment, client, and bill events to a customer-supplied webhook endpoint via POST with HMAC-SHA256 signature. Event types cover creation, update, and deletion of invoices, payments, clients, expenses, items, and more. Webhook delivery can range from seconds to several minutes, and the system retries failed callbacks until they are disabled by persistent failures. Employees are not a standalone resource; they appear only via staffid on expense records. Purchase orders are not supported.

How Marketo works

Marketo is a B2B marketing automation platform accessible via REST API at https://<munchkin-id>.mktorest.com/rest/v1. It authenticates with OAuth2 Client Credentials, exchanging Munchkin ID, Client ID, and Client Secret for a Bearer token with a 3600 second expiry. Key entities include Leads, Companies, Opportunities, Sales Persons, and Activities. Marketo does not support inbound webhooks; all integrations must poll the REST API using updatedAt filters on leads and opportunities, or use the Bulk Activity Extract API with a maximum 31 day window. Batch size is limited to 300 records per request. Opportunities and Sales Persons become read-only if Salesforce or Dynamics sync is enabled. SOAP API is deprecated as of July 31 2026 and must be replaced with REST.

What moves between them

FreshBooks invoice and payment events are polled and transformed into lead activity records in Marketo. When a client is created or updated in FreshBooks, their company profile is created or enriched in Marketo with financial context such as payment terms, outstanding balance, and invoice count. Payment receipts trigger activity records on the corresponding Marketo lead to indicate payment received, updating the prospect's financial health status. Data flows primarily from FreshBooks into Marketo; FreshBooks client names and emails are read from Marketo for reconciliation. The sync runs on a schedule; ml-connector polls FreshBooks and Marketo on a daily or custom cadence you specify.

How ml-connector handles it

ml-connector stores FreshBooks OAuth 2.0 credentials encrypted and uses the user-delegated auth flow to obtain a refresh token on behalf of the customer. Marketo credentials (Munchkin ID, Client ID, Client Secret) are also encrypted and exchanged for a Bearer token on each sync cycle. Because FreshBooks provides webhooks while Marketo does not, ml-connector polls FreshBooks webhook events first, then polls Marketo Leads and Companies APIs separately using the updatedAt filter to detect changes. Invoice and payment events are mapped to Marketo activity records: invoices create 'Invoice Sent' activities, payments create 'Payment Received' activities, and overdue invoices trigger 'Invoice Overdue' alerts. Client records in FreshBooks are matched to Companies in Marketo by email domain or explicit mapping; if a match is found, company data is updated with payment status and invoice count. FreshBooks uses resource-specific scopes, so ml-connector requests only the scopes needed (invoices, payments, clients). Marketo rate limits are enforced; ml-connector includes exponential backoff on 429 responses. Every record carries a timestamp and audit entry for replay if a Marketo write fails.

A real-world example

A small B2B software company uses FreshBooks for invoicing and expense tracking, and Marketo to manage their SaaS sales pipeline and nurture prospects. Before the integration, the sales team manually noted whether a prospect had paid their invoice or was overdue, but data fell out of sync when invoices were sent or payments received. With FreshBooks and Marketo connected, invoice and payment activity automatically flows into prospect records, so marketing campaigns can adjust outreach based on payment health. Prospects who have paid in full receive a renewal nurture track, while those with overdue invoices get a collections-aware sequence. The sales team sees payment status in real time on every lead, eliminating manual lookups in FreshBooks.

What you can do

  • Sync FreshBooks invoice and payment events into Marketo as prospect activity records, updated daily or on a custom schedule.
  • Enrich Marketo Companies with FreshBooks client data including payment terms, outstanding balance, and invoice count.
  • Segment Marketo leads by payment status to trigger different marketing nurture campaigns for paid versus overdue prospects.
  • Map FreshBooks clients to Marketo Companies by email domain or explicit customer-configured matching rules.
  • Authenticate FreshBooks via OAuth 2.0 user-delegated grant and Marketo via Client Credentials, with encrypted credential storage and retry logic on rate limits.

Questions

How does the integration handle FreshBooks webhooks and Marketo's polling-only constraint?
FreshBooks sends webhooks but Marketo cannot receive them. ml-connector polls FreshBooks to read the webhook events table and then pushes the relevant activity records into Marketo via the REST API. This ensures data moves reliably despite the asymmetry in webhook support.
Which FreshBooks records map to Marketo, and what happens when a client is updated?
FreshBooks clients map to Marketo Companies by email domain or explicit mapping rules. When a FreshBooks client is created or updated, ml-connector reads the latest invoice and payment records for that client and updates the matching Marketo Company with financial summary data. Invoices and payments create timestamped activities on the corresponding lead.
Does the integration support multiple FreshBooks accounts or Marketo instances?
The integration is per Marketo instance and per FreshBooks account. If you have multiple FreshBooks accounts (e.g., separate businesses), each can be connected to the same Marketo instance with separate credential sets and company matching rules configured per account.

Related integrations

Connect FreshBooks and Marketo

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

Get started