Report: Webhook: Action "Add a new row to another table"

I have 2 Tables.
The first table is read only, because it get’s filled with Google App Script.
When a new row is added to Table1, the values should be copied to Table2.
I can’t use Webhook, because Table1 is not edited by AppSheet.
So I thought I could use Report that runs once a day.

I would like to use an Action “Add a new row to another table” that is fired with webhook in that Report.
In the HTTP Body I would like to use <<Start>> and <<End>> to copy all the rows that are new.

I forgot to mention: For this copy I can’t use Google App Script, because I have calculations in AppSheet.

Does anyone has experience with that?

0 3 358
3 REPLIES 3

My first thought is to add a column that indicates whether a row still needs copied (entered by your script). Then in the report have it run per each record, with a condition checking that column. Add a second action to the report that deletes that column after the row is copied.

If you’re wanting to use start expressions, I think you’d need to do so with a webhook to Appsheet API.

I’m confused-I think the answer is referenced action but I don’t understand your question.

Hi Fabian,

The approach seems viable.

The webhook JSON body template would construct the Add request. The <<Start>> and <<End>> in the JSON body template would construct each “Row” value in the Add request. The <<Start>> would filter based on a DateTime field value in Table1 that contained that record’s creation date and time. That would allow you to only do a Add to Table2 for the each newly added record in Table1.

There are limits on the number of records you can add in one request. This is an elapsed time limit on the total Add operation time. Remember that this time limit includes the time to invoke cascading workflow rules invoked as a result of the Adds you are doing in the webhook. If you are doing lots of Add keep the cascading workflow stuff to a minimum or avoid it altogether.

If you are adding thousands of records, you may need to break the adds into batches to avoid exceeding the elapsed time limit.

Top Labels in this Space