n8n

How to Sync Pipedrive and MySQL Contacts?

Keep CRM people and database contacts in step without manual edits. Sales and ops teams get one clean list, so calls, emails, and reports stay consistent. Great for teams that store leads in a database but work deals in a CRM.

The flow runs on a schedule, pulls both sources, and lines them up by email. Contacts that exist in only one system are created in the other. Name and phone changes are spotted, and the most recent record wins based on the last updated time. Dates are formatted for a fair time comparison, then updates are pushed to the correct side. It uses Pipedrive for people and MySQL for the contact table.

To implement, you need a Pipedrive account and a MySQL database with id, name, email, phone, and updated_on fields. Map fields to match your schema and confirm the schedule fits your data flow. Expect fewer duplicates, less double entry, and faster team handoffs. Common uses include syncing internal apps with CRM, reconciling nightly updates, and easing data migration periods.

What are the key features?

  • Scheduled runs pull people from Pipedrive and contacts from MySQL on a regular interval.
  • Email based matching compares both lists and finds new, same, and changed records.
  • Creates missing records in Pipedrive or in MySQL so both sides stay complete.
  • Detects changes to name and phone only, reducing noisy updates.
  • Compares last updated times to decide which system should be updated.
  • Formats dates for accurate time comparison before syncing.
  • Updates Pipedrive persons or the MySQL contact table with the chosen fields.

What are the benefits?

  • Reduce manual contact updates from hours each week to minutes per day
  • Automate most repetitive record edits so teams focus on selling
  • Improve data quality by aligning names and phones across both systems
  • Eliminate double entry between CRM and database
  • Keep the newest data by choosing the record with the latest update time

How do you set it up?

  1. Import the template into n8n: Create a new workflow in n8n > Click the three dots menu > Select 'Import from File' > Choose the downloaded JSON file.
  2. You'll need accounts with Pipedrive and MySQL. See the Tools Required section above for links to create accounts with these services.
  3. Confirm your MySQL database has a contact table with id, name, email, phone, and updated_on columns. Ensure email is unique for correct matching.
  4. Open the Pipedrive node in n8n, then in the Credential to connect with dropdown click Create new credential and follow the on screen steps to connect your Pipedrive account.
  5. Open each MySQL node, then in the Credential to connect with dropdown click Create new credential and follow the on screen steps. Use the correct host, port, database, user, and password.
  6. Check the MySQL Select node query. If your table or column names differ, update the SELECT statement so it returns id, name, email, phone, and updated_on.
  7. Open the Set node that prepares Pipedrive data. Make sure the email field maps to your Pipedrive primary email and phone mapping matches your data format.
  8. Open the Compare Datasets node and confirm merge by email is correct for your use case.
  9. Set the Schedule Trigger to the frequency you need, such as every hour or once per day.
  10. Run a test with a few records. Check the Compare Datasets output to see same, different, and missing records. Confirm that new contacts are created on the correct side.
  11. Validate updates by changing a name or phone on one side and ensuring the newer record overwrites the older one as expected.
  12. If updates do not apply, verify Pipedrive permissions, confirm MySQL user has UPDATE rights, and check time zones for the Date and Time node.
  13. After testing, enable the workflow and monitor first runs. Review logs and adjust field mappings if you use custom fields.

Tools Required

$24 / mo or $20 / mo billed annually to use n8n in the cloud. However, the local or self-hosted n8n Community Edition is free.

MySQL

Sign up

MySQL Community Edition (GPL) – Free ($0)

Pipedrive

Sign up

Lite: US$14/user / mo (billed annually). API access included with every plan.

Similar Templates

Join Futurise to access 1,200+ automation templates

Get instant access to ready-made automation workflows for n8n, Make.com, AI agents, and more. Download, customise, and deploy in minutes.