Tuesday, 17 May 2016

OpenDental - Google Calendar Sync

(This plugin can sync OpenDental appointments to your Google Calendar)

1         How to set up Google Calendar 

In order to sync OpenDental appointments to Google Calendar, you need to create one calendar for each non-hidden operatory that is shown in your Appointment Module, operatories that are also in the"Operatories list" below (Setup/Apointments/Operatories menu).
For example, I have the following visible operatories: Operatory 1, Operatory 2, Operatory 3 and Hygiene Op 1 in my OpenDental.  I will have to create these 4 calendars with the "same name" in Google calendar. (see pictures below)

2         Update OpenDental config file

Since Google Calendar API is using extra DLLs library, we need to change “OpenDental configure file” to enable Google APIs. The a sample configure file in the plugin folder for download.

  1. Open OpenDental.exe.config with Notepad    
  2. Notepad must be " run as administrator", this file needs Administrator privilege to save.
  3. Go to Windows "Start Menu", type "Notepad" in the search box, right click on it and run it as administrator. In Notepad menu, click on File/Open and chose C:/Program Files (x86)/Open Dental/OpenDental.exe.config  
  4.  Find <runtime> element.  It should be at the end of the file.
  5. Add the following xml content into <runtime> element.
    IMPORTANT: do not copy this text from PDF document which might be corrupted your setting file because of PDF character format. Download from this website or type the config manually.
                                <assemblyIdentity name="System.Runtime" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                <bindingRedirectoldVersion="" newVersion="" />
                                <assemblyIdentity name="System.Threading.Tasks" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                <bindingRedirectoldVersion="" newVersion="" />
                                <assemblyIdentity name="System.Net.Http" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                <bindingRedirectoldVersion="" newVersion="" />
                                <assemblyIdentity name="System.Net.Http.Primitives" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
                                <bindingRedirectoldVersion="" newVersion="" />

The original <runtime> element should look like the screenshot below
The new <runtime> element should look like the screenshot below

3         Install the plugin in OpenDental

Download the "Required Dlls" zip file, unzip it into your OpenDental folder (usually under C:/Program Files/OpenDental)
Download the "Plugin File" that matches with your OpenDental major version (ie. 16.1),

  • delete version number from plugin file name, it means rename the file name to mopensoft.odplugins.apptsync.dll, 
  • place it in to your OpenDental folder

You need to create an OD program link for this plug-in.   In OD main menu, go to Setup/Program Links and click Add button to create and enable this plugin (more instructions are available in this link: http://www.opendental.com/manual/programlinks.html)
Enter the same text provided in the circled textboxes like the screenshot below:

Parameters and Auto-sync
·         sync.auto.anychange: this specifies whether any change to the appointment will automatically sync to Google Calendar; including add new, delete, update, move, etc... . Value "0 " is do not sync and "1" is sync automatically. This feature may cause a tiny delay when you make any appointment changes. Currently, it’s implemented but not used. Hooks need to be added to OpenDental first.
·         sync.auto.frequency.minute: this specifies the frequency of the auto-sync. For example, the default value is "30" which means the sync is triggered every 30 minutes automatically.
·         sync.interval.day: this specifies how many days from today, the appointments are synced. For example, the default value is "30" which means the appointments between today and the next 30 days will be automatically synced to Google Calendar.
The setting shown in the screenshot above specifies that every 30 minutes, all appointments between today and the next 30 days will be synced to Google Calendar.

NOTE: to test the auto sync, you can change the frequency to 1 minute instead of 30 minutes.

Manual sync
When you click the plugin button "gcSync" in OD main menu, a pop-up dialog will appear and will ask you to enter the time period that you want to sync with Google Calendar. Here you can modify the default preset value ( sync.interval.day)   from 30 days to any time period that you need.
Click “Sync OD -> Google” button to sync appointments.

4         Google authorization (required one time only)

Be sure that no other Google account is open in the background or in a different browser. Sign out of all your Google accounts if you have few ones open.
Once you have completed the OpenDental and Google Calendar settings, now you need to authorize the plugin to access your Google Calendar.
When you log out and log in to OpenDental, automatically the plugin will open your internet browser and bring you to your Google account login page.  Login to your Google account and enter the correct username and password of the Google account that has the correct calendars created in it.
The Google calendar settings will ask for permission to "Allow" access.  Once the access is granted, the plugin now can sync OpenDental appointments with Google Calendar.

5         How to change to another Google Calendar account.

The first time you run Open Dental with Google Calendar plug-in, and after you “Allowed” access to Google Calendar, an access token (mopensoft_gcal_sync.json)  will be stored in your “.credentials” Folder (/Documents/.credentials/mopensoft_gcal_sync.json)
This will be used to access your selected Google Account so that you do not need to enter your Google username and password each time you are running the plug-in.
If at any time you decide you want to use another Google Account, i.e. setup a new clinic calendar, you just need to delete the “mopensoft_gcal_sync.json” folder.
Once deleted, and the next time you run OpenDental, you will be asked to login to the new Google Account that you are switching to, and you will enter the new username and password.
Reminder: if you are switching to NEW Google Calendar account , you must create the Google calendars with the “same name" as your operatories (see step 1)


  1. This comment has been removed by the author.

  2. This comment has been removed by the author.

  3. Hey, guys. I'm struggling a bit with this.

    I'm running OD 16.3.42, and have followed the instructions given. I created and appropriately named the Google calendars. I edited the config file as instructed (using your dropbox template). I've copied the zipped dll files into the Open Dental folder overwriting the files there (was this correct?). I've moved the mopensoft.plugins.apptsync.dll file into the program folder. I've also gone through the program link.

    When I load the program I get the following error:

    Error loading: plugin: mopensoft.odplugins.apptsync.dll Exception has been thrown by the target of an invocation.

    When I press the gcSync button from the appointments menu nothing happens.

    Do you have any idea what I could be doing wrong?


  4. I think it could be the required dlls have updated to new version. I'm positive that my compiled OD 16.3.40 which include the plugin and its dlls worked. Can you get the OD binaries from my Dropbox and give it a try.

  5. Hi, I got this working but I had lots of trouble with copy/pasting the config file. Firstly I already had an entry to NewtonSoft so my 'before' didn't look like the example. Then every time I made changes, OpenDental wouldn't load. I got it working by copy/pasting my working NewtonSoft entry and changing the contents to match those on the website one field at a time.

    Also I did not have an 'all modules' option, so I added it to the menu bar instead.

    1. There's a few changes in OD recently that changes configuration file. Please do not copy/paste configure changes from the webpage, there's a sample configuration file in the download folder. Some screenshots are out-of-date now, ie. AllModule options which replaced by the selection of all modules in the list.

      If you need further assistance, please contact me and provide your OD version.

  6. This is an amazing blog post. This blog post has actually taught me to make a calendar plug-in. And indeed, this has made our life at Tracy Arch Dental very easier. And moreover, it helped us to be more organized.
    Click here:http://bit.ly/2o5jdVh

  7. best blog and best thing being made! Amazing! We at Tracy Arch Dental always wanted to do something and wanted to have something like this! Thank god!
    click here: http://bit.ly/2o5jdVh

  8. Great instructions. Hoping to sync it with google and use yocale to get online bookings. Also, I am getting wordpress plugin on my website (www.hudsondentalcenter.com) that can sync with google and allows patients to book online from my portal.

  9. Hello, I am looking to implement this in my office. I have version, and I am trying to use the plugin to automate my bookings. Which config file and dll file would I use? Thank You

  10. Hi,
    1)does this work 2 ways? for example - if i add a new appointment to my google calendar, will that create a patient in open dental and put them on our schedule?
    2) how much is this plugin?
    please reply to smilecenter215@gmail.com