Can We Trigger Automation on New Row Added in a Table using another automation?

I add rows to a table using an automation. Is there a way to trigger another automation to detect the added rows ?
I used row change but the automation is not triggered when the new row is added to the table.

Hello @Zainab_Fitian .
The usual trick for the automation to catch the new row is to have a dedicated text column with a default value of <whatever you want> and configure the automation to watch for changes on this column. Not sure if it works when the row has been added via an automation too thoughā€¦

If it doesnā€™t, maybe there is a way for your use case to write the actions of your second automation in the first automation ? Immediately after the creation ?

Thank you for your response. I tried this trick but it doesnā€™t work.
I wanted to write the actions in the first automation but I keep getting errors.

I have a table ā€œpublicationsā€, in which I apply the first automation. The last step of this automation (step 8) creates a new row in the table ā€œAllEventsā€ using the information from the JSON object that I have in the column ā€œinformationsā€



What I want to do next is to check if in the finale table ā€œEventsā€ thereā€™s a row with the same ā€œNameā€ and ā€œCompany Nameā€ as new row in ā€œAllEventsā€, if yes; I want to modify the column ā€œsourceā€ in the table ā€œEventsā€, if no; I want to add this row from table ā€œAllEventsā€ to the table ā€œEventā€

This is the formula that I wrote but it keeps throwing configuration error :

ForEach(thisRow.[Step 8 Result], WithName(CurrentValue, element , If(and(Name.Contains(element.Name), Company.Contains(element.Company) ), ModifyRows(Event.Filter( And(element.Name=CurrentValue.Name, currentvalue.Company=element.Company)),Event.Source, Event.Source+", "+element.Url) , AddRow(Event, Name, element.Name, Company, element.Company, [Function Type], element.[Function Type], Event, element.Event, Date, element.Date, Gender, element.Gender, Age, element.Age, Nationality, element.Nationality, Event.Source, element.Url ) ) ) )

Not sure with the formatting, but it seems your if statement doesnā€™t check values from the Events table but only the newly inserted rows.

You might need something like If(Events.Filter(Name=element.Name && Company = element.Company).isNotBlank()), ModifyRow..., AddRow...).

If you can provide a minimal copy of the document I can look into it later in the day or tomorrow if you want.

Now that Iā€™ve seen your doc, I suggest another approach: https://coda.io/d/_dIxcM8bFu2w/TEST-EVENTS_suH4C

That is to avoid copying info between your AllEvents and Events table. AllEvents should be the single source of truth, Events is just another way to display the data. Each row has a name and company and a relation to events matching these two criteria. Iā€™ve included a button as an example on how to regen such a table that you could call at the end of your main automation. But you could also directly use grouping functionality on AllEvents table if itā€™s just for display purposes : https://coda.io/d/_dIxcM8bFu2w/Using-groups_suq4R

Also take care, several columns are mixing different types of data, see the little red triangles in the upper left corner of cells.

This is just a quick and unoptimized answer, but I hope it can help you :slight_smile:

1 Like

Thank you so much @Martin_Portevin for your time and your help.
It is not directly answering my question but it is indeed helpful (:smile:

For the automation problem, maybe you could try to return a List() instead of using _Noop() in step 8. I guess it can make step 9 ForEach(thisRow.[Step 8 Result])... error as it wonā€™t be able to ā€˜readā€™ from the empy value returned in step 9ā€¦
But I did not test it as when I try to copy your existing automation, Coda detects Step 8 Result as a text value instead of a list of rows from AllEvents table.

Another way would be to mark all newly added rows in AllEvents with a checkbox column value of true, then only process those in your step 9 and reset the checkbox column at the end of the step.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.