Contacts and CRM

Google Contacts two-way sync

dolixgcontacts · version 1.0.0

Dolibarr contacts and Google Contacts synced both ways, for each user. Only the contacts with the “Dolibarr” label in Google are involved, and a field changed on both sides is settled by the rule you chose.

Price
€59 excl. VAT
Dolibarr
19.0 minimum
Version
1.0.0
Licence
GPL v3+
Languages
French, English, German

Sold directly to businesses in France

Direct purchase, with immediate download and an invoice by email, is open to businesses and associations established in France, on the French page of this module. From elsewhere, write to support@dolix.fr.

Support and contact
A user's page, with demo data: what is synced, then the log. Chloé Durand's town changed on both sides: the conflict is settled and the log keeps both values, “Sélestat” on the Dolibarr side and “Colmar-Centre” on the Google side.
A user's page, with demo data: what is synced, then the log. Chloé Durand's town changed on both sides: the conflict is settled and the log keeps both values, “Sélestat” on the Dolibarr side and “Colmar-Centre” on the Google side. Screenshot of the French-language interface.
01

What the module does

  • One Google account per user: each one connects it from Third parties > Google Contacts sync, through Google's consent page. Access tokens are stored encrypted.
  • Only the contacts with the “Dolibarr” label in Google are synced (the name can be changed): the other Google contacts never come into Dolibarr.
  • Dolibarr to Google: as chosen, all the contacts the user can see, those of the third parties they are sales representative of, or the contacts of one category.
  • Google to Dolibarr, optional: a contact put under the label in Google is created in Dolibarr and attached to the third party whose name is the company given in Google, if there is exactly one.
  • Conflicts settled field by field against the last sync: changed on one side only, that side wins; changed on both sides, the chosen rule decides (most recent by default, or Dolibarr always, or Google always) and the log keeps both values.
  • No duplicates: before creating a contact, the module looks for the same email address on the other side and links the two records.
  • Configurable deletions. By default, a contact deleted in Google is disabled in Dolibarr, and a contact deleted in Dolibarr is removed from the label in Google, where it stays.
  • Synced fields: first name, last name, job title, email, work, mobile and home phones, address, zip code, town, country, birthday. The third party name is sent to Google as the company.
  • Google data that Dolibarr does not know (other emails, other numbers, notes, photo) is kept.
  • Every 15 minutes through the scheduled job, or with the “Sync now” button. A log per user, and a general log for the administrator.
  • Number of writes per run limited (300 by default): beyond that, the rest is done at the next run.
02

Who it is for

The company's contacts are in Dolibarr; the ones users look up on their phone or in Gmail are in Google Contacts. Sending Dolibarr contacts to Google is not enough: a number corrected on the phone, or a contact added in Google, must also come back to Dolibarr. Without a two-way sync, the two address books drift apart and someone has to copy by hand.

The company’s contacts are in Dolibarr. The ones users look up on their phone or in Gmail are in Google Contacts.

Sending Dolibarr contacts to Google is not enough: a number corrected on the phone, or a contact added in Google, must also come back to Dolibarr. Without a two-way sync, the two address books drift apart and someone has to copy by hand.

Who it is for: Companies whose Dolibarr users also look up their contacts in Google Contacts, on their phone or in Gmail, and want a change made on one side to reach the other without copying.

03

What the module does not do

This section appears on all 29 module pages, without exception.

  • Only contacts (Contact/Address records) are synced, not the third parties themselves. The third party name goes to Google as the company, but does not come back: it is changed in Dolibarr.
  • No calendar, no other Google data: contacts only.
  • One Google account per Dolibarr user.
  • You create an OAuth client yourself in the Google Cloud console (once for the instance). With Gmail accounts, Google shows an “unverified app” warning when connecting.
  • A birthday without a year, possible in Google, is not copied into Dolibarr.
  • Other emails, other numbers, notes and photo from Google are kept in Google, but do not come into Dolibarr.
  • Writes limited per run (300 by default): a large address book is synced over several runs.
  • The log is not purged by the module.
  • Not tested: Google Workspace account, PostgreSQL, multi-company, Firefox and Safari browsers, address books of more than a few dozen contacts.
04

How it works

One Google account per user

Each user with the module permission goes to Third parties > Google Contacts sync and clicks “Connect my Google account”. They go through Google’s consent page, then come back to Dolibarr. Access tokens are stored encrypted in the database. Nothing is synced until the user has chosen their settings.

Only the “Dolibarr” label

The module creates a label in each Google account, “Dolibarr” by default (the name can be changed). Only the contacts with this label are synced: the other contacts of the Google account never come into Dolibarr.

Both ways

  • Dolibarr to Google: as the user chooses, all the contacts they can see, the contacts of the third parties they are sales representative of, or the contacts of one category. They are created in Google under the label.
  • Google to Dolibarr, optional: a contact put under the label in Google is created in Dolibarr. If the company given in Google is the name of exactly one third party, the contact is attached to it.
  • After that, a change made on one side goes to the other.

Conflicts, field by field

The module keeps the values of the last sync and compares each field:

  • changed on one side only, that side wins;
  • changed on both sides, the chosen rule decides: the most recent change (default), Dolibarr always or Google always. The conflict is written to the log with both values and the result.

No duplicates

Before creating a contact, the module looks for the same email address on the other side. If it finds it, it links the two records instead of creating a second one.

Nothing deleted by default

  • A contact deleted in Google is disabled in Dolibarr.
  • A contact deleted in Dolibarr is removed from the label in Google, where it stays.
  • Removing the label in Google, or taking the contact out of the scope in Dolibarr, stops its sync without deleting anything.

Deleting on the other side is an option in the settings.

The fields

First name, last name, job title, email, work, mobile and home phones, address, zip code, town, country, birthday. The third party name is sent to Google as the company. Google data that Dolibarr does not know (other emails, other numbers, notes, photo) is kept.

Records saved in the Google Contacts interface are handled: translated phone labels, address on two lines, numbers typed without a label.

When

Every 15 minutes through the scheduled job, for users who ticked automatic sync, or at any time with the “Sync now” button. Each user sees their own log; the administrator sees every connected account and everyone’s log.

A user’s page on Dolibarr 24.0.2, with demo data. The log shows both directions: a town changed in Google, a country filled in Dolibarr, a contact created in Dolibarr from Google. Chloé Durand’s town had changed on both sides: the “Conflit réglé” (conflict settled) line keeps “Sélestat” (Dolibarr) and “Colmar-Centre” (Google), then the value kept.

The top of the same page: the connected Google account (fictitious address), the summary of the last sync, the “Synchroniser maintenant” (Sync now), “Reconnecter” and “Déconnecter” buttons, and the choice of contacts sent to Google.

Hugo Nouveau was created in Google, under the “Dolibarr” label, with the company “SARL Martin”. After the sync, his record exists in Dolibarr, attached to the third party SARL Martin, with his job title, phone and email.

The “Comptes connectés” (Connected accounts) tab, for administrators only: each user, their Google account, their scope, automatic sync, the number of linked contacts, the last sync, then everyone’s log.

The “Aide” (Help) tab gives the steps to create the Google client, then how the sync works.

A user's page Third parties > Google Contacts sync: Google account connected (fictitious address), summary of the last sync, “Synchroniser maintenant” (Sync now), “Reconnecter” and “Déconnecter” buttons, then the choice of contacts sent to Google.
A user's page Third parties > Google Contacts sync: Google account connected (fictitious address), summary of the last sync, “Synchroniser maintenant” (Sync now), “Reconnecter” and “Déconnecter” buttons, then the choice of contacts sent to Google. Screenshot of the French-language interface.
The contact Hugo Nouveau, created in Google under the “Dolibarr” label with the company “SARL Martin”: the sync created him in Dolibarr, with his job title, phone and email, and attached him to the third party SARL Martin.
The contact Hugo Nouveau, created in Google under the “Dolibarr” label with the company “SARL Martin”: the sync created him in Dolibarr, with his job title, phone and email, and attached him to the third party SARL Martin. Screenshot of the French-language interface.
The “Comptes connectés” (Connected accounts) configuration tab, for administrators only: each user with their Google account (fictitious addresses), what they send, automatic sync, the number of linked contacts and the last sync, then everyone's log.
The “Comptes connectés” (Connected accounts) configuration tab, for administrators only: each user with their Google account (fictitious addresses), what they send, automatic sync, the number of linked contacts and the last sync, then everyone's log. Screenshot of the French-language interface.
The “Aide” (Help) tab: the steps to create the Google client in the Google Cloud console (once for the whole instance), then how the sync works.
The “Aide” (Help) tab: the steps to create the Google client in the Google Cloud console (once for the whole instance), then how the sync works. Screenshot of the French-language interface.
05

Settings

Two levels. The administrator sets up the instance in the module configuration (Settings tab). Each user chooses what they sync on their page Third parties > Google Contacts sync.

Administrator setting Default Effect
Redirect URI shown To be copied as is into the OAuth client in the Google Cloud console.
Client ID, client secret empty The OAuth client created in the Google Cloud console. The secret is stored encrypted and never shown again; empty field = secret kept.
Google label Dolibarr Created in each Google account. Only the contacts with this label are synced.
Same field modified on both sides the most recent change wins Or “Dolibarr always wins”, or “Google always wins”.
Contact deleted in Google disable it in Dolibarr Or “Do nothing in Dolibarr”, or “Delete the contact in Dolibarr”.
Contact deleted in Dolibarr remove the label in Google The contact stays in Google. Or “Delete the contact in Google”.
Writes per run 300 Beyond that, the rest is done at the next run (Google quotas). Minimum 10.
User setting Default Effect
Dolibarr contacts sent to Google all the contacts I can see Or the contacts of the third parties I am sales representative of, or the contacts of one category.
Contacts created in Google ticked Creates in Dolibarr the contacts put under the label in Google.
Automatic sync unticked Ticked, the scheduled job syncs this account every 15 minutes.
The “Paramètres” (Settings) tab, for administrators only: the redirect URI to copy into the Google Cloud console, the client ID and secret (never shown again), the Google label, the conflict rule and the rule for a contact deleted in Google.
The “Paramètres” (Settings) tab, for administrators only: the redirect URI to copy into the Google Cloud console, the client ID and secret (never shown again), the Google label, the conflict rule and the rule for a contact deleted in Google. Screenshot of the French-language interface.
06

Security and safeguards

  • One dedicated permission, “Connect one’s Google account and sync one’s contacts”. Without it, no menu, no page, and the scheduled job skips the account.
  • Dolibarr permissions on top, also applied by the scheduled job: the user must be able to read contacts; private contacts of another user and inactive contacts are never sent; without the permission to see all third parties, only the contacts of their own third parties (and contacts without a third party) are taken. Without the permission to modify contacts, the sync only goes to Google; deleting in Dolibarr requires the delete permission.
  • Tokens and secret encrypted with Dolibarr’s encryption function. The client secret is never shown again.
  • Checked Google sign-in: Google’s answer is refused if it does not carry the random value sent at the start; if access to contacts was not ticked on Google’s page, nothing is stored.
  • Disconnecting: the module forgets the account’s tokens and links; nothing is deleted.
  • Configuration and list of accounts for administrators only.
  • One sync at a time per account (MySQL/MariaDB lock).
07

What you get

What the module writes to your installation
Database tables createdThree tables. llx_dolixgcontacts_account: one Google account per Dolibarr user (account address, encrypted access tokens, chosen scope, automatic sync, last result). llx_dolixgcontacts_link: the link between a Dolibarr contact and a Google contact, with the values agreed at the last sync, used to know which side changed. llx_dolixgcontacts_log: the log (creations, updates, conflicts with both values, deletions, errors). Settings are Dolibarr constants: DOLIXGCONTACTS_CLIENT_ID, DOLIXGCONTACTS_CLIENT_SECRET (encrypted), DOLIXGCONTACTS_GROUP_NAME, DOLIXGCONTACTS_CONFLICT, DOLIXGCONTACTS_ON_GOOGLE_DELETE, DOLIXGCONTACTS_ON_DOLIBARR_DELETE and DOLIXGCONTACTS_MAX_WRITES.
PermissionsOne permission: “Connect one's Google account and sync one's contacts”. It opens the page Third parties > Google Contacts sync. What is synced then follows the user's Dolibarr permissions: they must be able to read contacts; only the contacts they see are sent (not another user's private contacts, not inactive contacts, and only those of their own third parties if they may not see all third parties); without the permission to modify contacts, the sync only goes from Dolibarr to Google; deleting in Dolibarr requires the permission to delete contacts. The scheduled job applies each user's permissions. The configuration and the list of connected accounts are for administrators only.
Uninstalling
  • For a user to stop, the “Disconnect” button on their page makes the module forget their Google account. Nothing is deleted, neither in Google nor in Dolibarr.
  • Disable the module in SetupModules/Applications. No contact is deleted, neither in Dolibarr nor in Google.
  • The three tables (accounts, links, log) and the settings are not deleted when the module is disabled.

The dolixgcontacts folder, in readable PHP, under the GPL v3 or later: the module descriptor, the user page, the Google sign-in return page, the three configuration tabs, the Google API class, the sync class, the SQL files of the three tables and the icons.

  • Languages: French (fr_FR), English (en_US) and German (de_DE).
  • A README.md and a ChangeLog.md.
  • No Dolibarr core file modified, nothing to add to conf.php.
  • Three tables: llx_dolixgcontacts_account (one Google account per user, encrypted tokens), llx_dolixgcontacts_link (the link between a Dolibarr contact and a Google contact, with the values of the last sync) and llx_dolixgcontacts_log (the log, with old and new values). The log is not purged by the module.
  • Your contacts are modified by the sync: creation, update and, depending on the settings, disabling or deletion. Every write is logged.
  • Synced contacts are sent to Google, into the account of the user who syncs them. The Dolibarr server talks directly to Google (OAuth sign-in and People API); nothing goes through Dolix.
  • Settings are Dolibarr constants (DOLIXGCONTACTS_…).
08

Compatibility

The module descriptor only declares a minimum version. No upper bound is written in the code: the versions below are those on which the module has actually been run.

Compatibility of the Google Contacts two-way sync module
Dolibarr versionsDolibarr 19.0 minimum. Installed and run on 19.0.4, 20.0.4, 21.0.4, 22.0.5, 23.0.4 and 24.0.2; tried with a real Google account on 24.0.2.
Minimum PHP7.1
Dolibarr modules to enableThird Parties
LicenceGPL v3 or later, full source code
LanguagesFrench, English, German
Menu“Google Contacts sync” entry in the left menu of Third parties, for users with the module permission. Module configuration in three tabs: Settings, Connected accounts, Help.

The test results, Dolibarr version by version, are on the Compatibility tested page.

09

Installation

  1. Buy the module on dolix.fr (module page, “Acheter directement”), then download the zip file.
  2. In Dolibarr: HomeSetupModules/Applicationstab “Deploy/install external module”, then upload the zip. Otherwise, unzip the dolixgcontacts folder into htdocs/custom/.
  3. Enable “Google Contacts two-way sync” in the module list. The three tables and the scheduled job are created.
  4. In the Google Cloud console, create a project, enable Google People API and create a “Web application” OAuth client, with the redirect URI shown in the module settings. The module's Help tab gives every step.
  5. Paste the client ID and secret into the module's Settings tab, and choose the rules (conflicts, deletions).
  6. Give the users concerned the permission “Connect one's Google account and sync one's contacts”. Each one goes to Third parties > Google Contacts sync, connects their account, chooses what is synced, then runs the first sync or ticks automatic sync.
  7. For automatic sync, Dolibarr's Scheduled jobs module must be enabled and running.

The details — permissions on the custom folder, shared hosting, upgrades, uninstalling — are on the page Installation and upgrades.

10

Frequently asked questions

Which Dolibarr versions does this module work with?

The descriptor requires Dolibarr 19.0 at least. The module has been installed and run on 19.0.4, 20.0.4, 21.0.4, 22.0.5, 23.0.4 and 24.0.2, under PHP 8.2 to 8.5, with 71 checks out of 71 on each version against a simulated Google. It was also tried with a real Gmail account on 24.0.2. If in doubt about your installation, write before buying.

What has to be done on the Google side?

Once for the whole instance: create a project in the Google Cloud console, enable Google People API and create a “Web application” OAuth client with the redirect URI shown by the module. The module's Help tab gives every step. With Gmail accounts (“External” type), the app must be published: in Testing mode, Google cuts the access after 7 days. When connecting, Google then shows “Google hasn't verified this app”: it is your own app, you go through Advanced then Go to.

Will my personal contacts end up in Dolibarr?

No. Only the contacts with the “Dolibarr” label in Google (the name can be changed) are synced. The other contacts of your Google account are never imported.

What happens if the same contact is changed on both sides?

The module compares field by field with the values of the last sync. A field changed on one side only takes the new value. If the same field changed on both sides, the chosen rule decides: the most recent change by default, or Dolibarr always, or Google always. The conflict is written to the log with both values and the result.

Can the module delete contacts?

Not with the default settings: a contact deleted in Google is disabled in Dolibarr, and a contact deleted in Dolibarr is removed from the label in Google, where it stays. Deleting on the other side is an option to choose in the settings. Removing the label from a contact in Google, or taking it out of the scope in Dolibarr, stops its sync without deleting anything.

What does a sales representative see?

Only what Dolibarr shows them: the contacts they can see, without other users' private contacts or inactive contacts, and only those of their own third parties if they may not see all third parties. They can also choose to send only the contacts of the third parties they are sales representative of. Without the permission to modify contacts, the sync only goes to Google.

Where does my data go?

The Dolibarr server talks directly to Google's servers (sign-in and People API): the synced contacts are sent to the Google account of the user who syncs them. Nothing goes through Dolix. Access tokens and the client secret are stored encrypted in your database.

Who provides support, and how do updates work?

Support is provided by the person who wrote the module, at support@dolix.fr. The module is sold directly on dolix.fr to businesses and associations established in France; new versions remain downloadable for two years at dolix.fr/telecharger/. Outside France or buying as an individual: write to support@dolix.fr.

11

Version history

Taken from the module’s ChangeLog.md file: a single source.

1.0.030 October 2026

First version: one Google account connected per user, two-way sync of the contacts with the “Dolibarr” label, scope as chosen (visible contacts, contacts of the third parties the user is sales representative of, category), conflicts settled field by field with both values logged, matching by email address, configurable deletions (nothing deleted by default), Dolibarr permissions respected, scheduled job every 15 minutes and “Sync now” button. Records saved in the Google Contacts interface handled (translated labels, address on two lines, numbers without a label). Interface in French, English and German.

12

Support for this module

Write to support@dolix.fr. The person who wrote the module is the one who replies.

Reply within two working days. This is not an on-call service.

To include in your message

  • The exact Dolibarr version.
  • The module concerned and its version — here dolixgcontacts 1.0.0.
  • What you did, and what you expected.
  • The error message copied exactly, or a screenshot.
  • How Dolibarr is installed, if you know.

Sold directly to businesses in France

Direct purchase, with immediate download and an invoice by email, is open to businesses and associations established in France, on the French page of this module. From elsewhere, write to support@dolix.fr.

Support and contact
Also

The other modules

Multiple barcodes

dolixmultibarcode · v1.0.1

Several barcodes for one product: supplier code, old code, in-store label, pack code. Scanned in TakePOS, each code adds the product to the ticket with its quantity: the code of a pack of 6 adds 6 units.

Sold in FranceRead more

Orders to collect in TakePOS

dolixretrait · v1.0.2

The customer comes to collect a pre-order: one click in TakePOS copies it into the ticket, and after payment the order is classified billed, even if the weight changed.

Sold in FranceRead more

TakePOS cash closing

dolixcloture · v1.0.0

Bank deposits, withdrawals to the safe, cash in and cash expenses recorded from TakePOS, a count by notes and coins, and the discrepancy booked so that the cash account matches the drawer.

Sold in FranceRead more

For your sales of goods to consumers in other EU countries: the VAT rate of the customer's country, found from the product's customs code and the European Commission's official rates, draft invoices fixed in one click, tracking of the €10,000 threshold and the quarterly OSS return.

Sold in FranceRead more

Stored computed fields

dolixcalc · v1.0.0

An extra field computed by a formula written without PHP, with its value stored: right in the lists, sortable, filterable and printable on PDFs.

Sold in FranceRead more

Keyboard shortcuts

dolixshortcuts · v1.0.0

Ctrl+S (Cmd+S on Mac) saves the record you are filling in, without scrolling down to the button. g then a letter opens third parties, proposals, orders, invoices or products. ? shows the help.

Sold in FranceRead more

Dolix Coop

dolixcoop · v1.0.0

For cooperative and community grocery stores: shelf labels with the price per kilo or per litre, the customer's membership status in the TakePOS checkout, a simplified home page and menu for volunteers, a quick inventory on the phone.

Sold in FranceRead more