Photo by Nick Fewings on Unsplash

How to Coda a 2 Way Sync?

An alternative for Coda cross docs to sync tables

Christiaan Huizer
4 min readMay 5, 2023

--

A while ago I wrote a blog with a bit of a provocative title. I explain how to update a table in another doc almost instantly using a webhook.

What is a two way sync?

A two-way sync solution is a bidirectional synchronization of data between two different docs. In other words, when rows are added, deleted or changed in one Coda doc, these changes are reflected in the other doc and vice versa. Both tables are in sync.

HR Case

By using 2WS you will be able to build an employee document to keep track of sick leave, holidays, wiki, policies… anything you can think of. The HR staff will have access to every row and detail for every employee.

You can build connected docs for the Finance, Sales, Engineering and any other department with subsets of employee data. Each department can edit this subset which will be synced to the main HR doc. At the same time, HR can change data that will be synced to the department doc(s) too.

HRM and the Team leaders have the same data at their disposal, although the team managers have no access to the main HR doc. They only have access to their specific doc related to their department. Why this matters you read below ⤵️

Advantages

Using a webhook trigger to update a table in an other doc has a number of advantages:

  • Fast: changes are almost immediate — generally in less than one minute instead of once per hour
  • Few automations, only when you change a row
  • Flexibele: select columns and and set filters, there is no need to create views just for syncing tables
  • Infinite: you can have more than 10K rows and will still stay synced.
  • Free of permissions: no need for corresponding permission logics in main & target docs.

Template 2WS — basic elements

We (me and Joostmineur) developed a template (for sale) that shows how to create your own solution.

We use automations

They keep your docs light and fast. You change one or more values in a cell and the changes show in the other doc without any action required from the user.

Controlled removal is possible

In our approach you need a button to delete rows. If you want, you can create buttons in both docs. It is a two steps setup:

  1. You prevent deleting rows with page locking — Team plan only.
  2. You create a delete button (with some extra code for the sync).
  3. Experienced users can enable the button for certain users and disable it for others.

Once deleted, the rows can be put back in a simple manner in the days after. Doing so you no longer have to worry about the history of your data. This recovery logic is not included in the basic set-up and as said is only temporary working (the first few days after the row got deleted).

controlled removal and archiving — source

Extra support

Our solution is well documented and easy to understand for intermediate and experienced users. But even if you are less experienced, you can implement 2WS by following the instructions. It took us time to develop, it will take time for you to apprehend and apply it in your docs.

The template contains background information, screenshots, code and a working example of the sync table. We highly recommend for you to take the extra support hour, allowing for a one on one explanation, feedback and getting started tips.

Pricing

We sell the 2WS template (a Coda doc) with or without support. For pricing details, please check this doc where you can also leave your details.

All rights reserved: our templates may not be copied by the buyer to use for clients or any third party (sub contractors included). We only sell to companies that need 2WS for their own docs and we don’t sell to agencies or consultants.

--

--

Christiaan Huizer

I write about how to Coda . You find blogs for beginners and experienced makers. I publish about 1 / week. Welcome!