ml-connector
XeroPipedrive

Xero and Pipedrive integration

Xero manages your accounting records. Pipedrive manages your sales pipeline. Connecting the two keeps your customer master data and invoicing in sync with your sales process. New contacts created in Xero flow into Pipedrive as organizations and persons, invoice payment records trigger deal stage updates, and customer credit limits can feed into Pipedrive deal value thresholds. ml-connector bridges the two systems so your sales team sees the same customer information your accounting team is recording.

How Xero works

Xero is a cloud-based accounting platform that exposes invoices, purchase orders, contacts, payments, accounts, and manual journals through the Xero Accounting API. REST calls use OAuth2 bearer tokens that expire after 30 minutes, requiring refresh token rotation every 60 days with the offline_access scope. All API requests must include the Xero-tenant-id header to target the specific organization. Xero rate limits at 5 concurrent calls, 60 per minute per tenant, and 5000 per day. The platform publishes webhooks for contact, invoice, credit note, payment, and purchase order events on CREATE and UPDATE, but webhook payloads contain only metadata; ml-connector must follow up with a GET request to fetch the full record. Deleted records are not returned by default.

How Pipedrive works

Pipedrive is a sales CRM that exposes deals, organizations, persons, products, activities, and custom fields through REST APIs in both v1 and v2 formats. Authentication uses either an API token header or OAuth2 bearer tokens. Pipedrive publishes webhooks for create, update, delete, and merge events in both v1 and v2 formats, with HMAC-SHA256 signature verification available via the X-Pipedrive-Signature header. Webhook payload format differs between versions; v1 uses action.object format while v2 includes action and entity fields in a meta block. Pipedrive imposes a daily token budget based on plan tier and seat count, with single entity reads costing 2 tokens and list operations costing 20 tokens. API tokens are tied to user accounts, so if a user is deleted or a token is regenerated the integration breaks; OAuth is recommended for production stability. Pagination uses cursor-based offsets with a limit up to 500 records per request.

What moves between them

The main data flow moves from Xero into Pipedrive. Xero contact records, triggered by webhook CREATE and UPDATE events, flow into Pipedrive as organizations and persons. Invoice records linked to those contacts sync the payment status and invoice amount so Pipedrive deals can reflect the customer financial state. Payment records from Xero trigger updates to Pipedrive deal stages when a payment is received or recorded. The sync runs on a webhook-driven schedule when Xero publishes contact, invoice, or payment events; ml-connector fetches the full record via GET, maps the Xero contact and invoice data to Pipedrive organizations and persons using the contact email and name as the linkage, and upserts into Pipedrive. There is no reverse flow from Pipedrive to Xero; Pipedrive records are read-only in this integration.

How ml-connector handles it

ml-connector stores OAuth2 credentials for both systems encrypted and refreshes Xero tokens before they expire. On the Xero side, it captures webhook events for contacts, invoices, and payments, validates the webhook signing key from the Xero Developer portal, and immediately fetches the full record from Xero using the resource ID in the event metadata. It maps Xero contacts to Pipedrive organizations by name and email; a single Xero contact becomes a Pipedrive person linked to an organization. Invoice amounts and payment status from Xero map to Pipedrive deal values and stage progression. Because Xero webhook payloads contain only metadata, full record GET requests are mandatory; ml-connector handles the follow-up automatically. Xero enforces the Xero-tenant-id header on every request, so ml-connector includes it with the stored tenant ID. For Pipedrive, ml-connector validates OAuth token expiry and refreshes via the refresh_token if needed, and handles Pipedrive's daily token budget by checking remaining balance before high-cost operations like list queries. The two systems use different field names for the same concepts; ml-connector maintains a mapping table so Xero contact name, email, and address map cleanly to Pipedrive person fields. Rate limit retries are applied when either system returns 429 or rate-limit headers, with exponential backoff to avoid overwhelming the endpoints. Every record sync is audited with timestamps, direction, payload size, and success or failure reason, so failed syncs can be replayed.

A real-world example

A mid-market service business runs Xero for invoicing and GL management and uses Pipedrive to track customer relationships and deal pipelines. Before the integration, the sales team manually entered new customer details into Pipedrive after they were created in accounting, leading to duplicates and data drift. When an invoice was paid, the sales manager had to check Xero separately to update deal status in Pipedrive. With Xero and Pipedrive connected, new customers created in Xero flow automatically into Pipedrive as organizations and persons, and invoice payment status updates trigger deal stage changes. The sales pipeline now reflects accurate customer payment history without manual re-entry, and the team spends less time on data entry and more time on selling.

What you can do

  • Sync Xero contacts to Pipedrive as organizations and persons, keeping customer master data in agreement across accounting and sales.
  • Flow Xero invoices into Pipedrive deals, mapped to the matching organizations and using invoice amount and payment status to update deal value and stage.
  • Validate Xero webhooks using the signing key from the Developer portal and automatically fetch full records to ensure all fields are captured.
  • Handle Xero OAuth2 token refresh before expiry and Pipedrive token budget consumption to prevent authentication failures and rate limit errors.
  • Maintain a full audit trail of every contact and invoice sync with timestamp, direction, field mapping, and success or error detail for replay and debugging.

Questions

Which direction does data move between Xero and Pipedrive?
Data flows from Xero into Pipedrive. Contacts, invoices, and payments in Xero trigger updates to organizations, persons, and deals in Pipedrive. Pipedrive records are not written back to Xero; Pipedrive is read-only in this integration.
Why does ml-connector need to fetch full records after Xero webhooks?
Xero webhook events contain only the resource ID and metadata, not the full record. ml-connector captures the event, validates the webhook signature against the Xero-signed header, then immediately fetches the complete contact, invoice, or payment record from Xero using the resource ID so all fields are available for mapping to Pipedrive.
How does the integration handle Pipedrive's daily token budget?
ml-connector checks remaining daily token balance before executing list queries and other high-cost operations. If the budget is low, it defers non-urgent syncs to the next day or alerts the user so they can adjust their Pipedrive plan tier to increase the token allocation.

Related integrations

Connect Xero and Pipedrive

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

Get started