Help

Two way base updates - aka: dynamic synchronization. How to do this manually/via API?

Topic Labels: API
1846 3
cancel
Showing results for 
Search instead for 
Did you mean: 
Matthew_Moran
7 - App Architect
7 - App Architect

I am building a fairly simple projects and tasks list. However, we need to isolate tasks and information between individuals who the tasks are assigned to.

To do so we need to have a master project/tasks base and a series of other bases where tasks will be copied/synced to. Those bases will have 1 to 2 individuals assigned to them. They will view their tasks in their own base and when they make updates, their updates will write back to the master list.

I store the master record ID and the child record ID for each task assigned.

Right now, I write from the master table to the child when a record is added or updated using a webhook but today will switch to using the API key so that I can get a more complete response from any given update.

My question is general: Who has done something similar - two-way updates between bases - and what was the logic and triggers you used?

Not the code - more or less the concept. For instance, in a child base, the person can add a tasks as well but I need to have “awareness” of whether a task was added from inside the base versus via code so that the add tasks automation in the child base does not run (or ends without action) when the code from the master base adds the tasks.

I hope this made some sense.

Thanks.

3 Replies 3

Hi,

i did such thing (questions/answers) without using code and API, and with one simple automation on master side. The concept is - you sync a view from master to child base table.
Child table contains readonly synced fields (questions) and additional field for users answers. It also contain a view, that synced back to master base, another table.

Automation in master maintain links between source master table and other(returned from child), that’s done just for purposes of seeing source data together with filled on child side (via lookup fields)

Imagine you need to send some data to child which needs to be editable.
Just create automation there, copying data from synced field to editable with similar name and hide the synced field. Trigger may be “when record updated” on synced field. Or, to avoid case, when you change something on master side and it overwrite edited on child, by condition “when field {synced] is non-empty & field {copy_of_synced} is empty”

Thanks.

Right now I’m testing (with good results) creating a generic webhook processor on my master and child base.

I’m sending data from the master base that includes the task and the record number in the master base using a webhook. When I create a task in the child base, I return the record ID - so now I have the child record Id. I submit back to the master base using another webhook and update the master record with the child ID in a child ID field. That way, future updates know where to go.

When I indicate generic webhook processor, when I set up the webhook I send a generic json object with something like the following.

{ "myData" : "Anything" }

This lets me select “myData” as the input in the webhook.

After that I can send anything needed inside the object… like:

{ "myData" : {
"MasterRecordID" : "recordid",
"ChildRecordID" : "recordid",
"fieldOne" : "data",
"fieldTwo" : "data"
	}
}

We’ll see what tomorrow yields but I believe this will accomplish what I need.

Thanks for sharing your experience. I never used webhooks before, but I think to test them in action, to evaluate how it can help me in future.