Pro hack: Trigger cross-doc sync with an action (hidden formula)

Digging into document JSON files, just discovered a way to trigger cross-doc table sync with an action. It’s a bit tricky: the action must be triggered by Automation Bot, so you’ll have to set up automation.
Fair warning: uses hidden formulas (although they seem harmless)

  1. Create a button for your imported table with the following chain of actions:
RunActions(
  YourTableName._StartSync(),
  Crossdoc::_SyncTableTable([Your cross-doc connection], YourTableName),
  YourTableName._FinishSync()
)
  1. Since this button cannot be clicked by you, you must set up some sort of automation to click it for you. What you’re interested here is setting a trigger-based automation (e.g. on a cell value changed).

Now whenever you need to trigger sync programmatically, just change the value in that observed cell (e.g. set a timestamp to Now()), wait some time until it triggers the automation, which in turn presses the sync action button, which forces the cross-doc table to sync.


Still, a proper user-clickable action to directly request table sync is very much anticipated.

Please subscribe to codatricks.com. With the quarantine in effect, I might finally have time to start writing this blog.

3 Likes