Oct 30, 2025

Two Way Sync Between Pipedrive and MySQL

Two Way Sync Between Pipedrive and MySQL Using n8n In today’s business environment, keeping data consistent across multiple platforms is critical to maintaining operational efficiency and data integrity. This is where a two-way sync between CRM tools like Pipedrive and databases like MySQL becomes essential. In this detailed guide, we’ll explore how to build an […]

Two Way Sync Between Pipedrive and MySQL

Two Way Sync Between Pipedrive and MySQL Using n8n

In today’s business environment, keeping data consistent across multiple platforms is critical to maintaining operational efficiency and data integrity. This is where a two-way sync between CRM tools like Pipedrive and databases like MySQL becomes essential.

In this detailed guide, we’ll explore how to build an automated two-way synchronization workflow using the powerful automation tool n8n. This workflow ensures that contact data in your MySQL database and Pipedrive CRM stays consistent and up to date.

Overview of the Workflow

The workflow connects Pipedrive and MySQL, periodically comparing datasets from both sources to detect new, updated, or missing records. It then creates or updates contacts on either platform based on data differences.

  • Sources: Pipedrive (CRM) and MySQL (Database).
  • Trigger: Scheduled trigger initiates sync at regular intervals.
  • Comparison: Dataset comparison is performed by matching email addresses.
  • Actions: Create or update contacts in the respective system.

Step-by-Step Breakdown

1. Schedule Trigger Node

This node triggers the workflow at defined intervals (e.g., hourly, daily) to automate the synchronization process without manual intervention.

2. MySQL Read Query

Queries the contact table in MySQL to retrieve the list of contacts including id, name, email, phone, and updated_on timestamp.

3. Pipedrive Fetch Contacts

Fetches all person records from Pipedrive using the API to get a current snapshot of CRM contacts.

4. Set Node

Prepares and formats the retrieved Pipedrive data, structuring it to be compatible for dataset comparison.

5. Compare Datasets

Uses the email field as the key to compare both datasets. The node outputs four paths:

  • In A only: Contacts in MySQL but missing in Pipedrive — triggers create person in Pipedrive.
  • In B only: Contacts in Pipedrive but missing in MySQL — triggers creating contact in MySQL.
  • Different: Contacts found in both but with different data — triggers update process.
  • Same: Identical contacts — no action needed.

6. Conditional Node – IF Data Changed

Checks whether any significant fields such as name or phone differ, indicating the need for an update.

7. Date & Time Formatting

Formats the updated_on timestamp for consistent comparison of records to detect the most recent update.

8. Conditional Node – IF Updated On

Determines which system has the most recent update by comparing timestamps, deciding the sync direction.

9. Set Input1 and Update Person (Pipedrive)

If Pipedrive has a more recent update, this path prepares the updated data and pushes changes back into Pipedrive.

10. Set Input2 and Update Contact (MySQL)

If MySQL contains the latest update, this node prepares and performs an SQL update query to keep MySQL contact data current.

Why Implement This Integration?

  • Data Consistency: Avoid outdated or conflicting records between CRM and internal databases.
  • Efficiency: Automate repetitive manual data entry and updates.
  • Centralized View: Ensure teams using different tools have synchronized customer information.
  • Scalability: Easily extendable to include more fields or other data sources.

Conclusion and Call to Action

This two-way sync template is critical for businesses relying on accurate contact data across different systems. Leveraging n8n’s visual workflow editor, you can customize and automate syncing operations to save time and reduce errors.

Ready to optimize your data workflows? Try integrating your Pipedrive and MySQL databases with this template and keep your contact data perfectly aligned!

Leave a Reply

Your email address will not be published. Required fields are marked *