Add multiple rows (Bulk Add)

FatLou
New Member

I want to Filter a Table and then add the resulting Filter to a different table. I currently have an action that filters my Table A. I also have a webhook that triggers Zapier every time a filter is run (It does not really do anything). I need the to take the results of the filter and add them to Table B which has a different column structure.

Any Help!!.
I have read through (https://help.appsheet.com/articles/1980012-adding-records-to-a-table). Its helpful but not incredibly detailed.

Cheers,
Wil

0 11 3,723
11 REPLIES 11

To my knowledge appsheet doesnโ€™t currently have any internal methods of adding more than one record at a time. tagging along to see if this has changed somewhere along the line.

Appsheet does not but I think I should be able to do it through Zapier. Or at least trigger the Zapier from appsheet and then post the results to the google sheet.

Have you considered using a webhook to the REST API?

I have a webhook to Zapier but it doesnโ€™t really do anything. I am struggling trying to figure out how to make the Zap and w=the bulk add actually happen.

Cheers

Now I understand what you were talking about. It did not work using the Appsheet API so now I am looking through the audit logs.

It is not showing up in the audit logs, so I am not sure what I need to fix or what is failing.

Cheers

It sounds like you are trying to add two or more rows to the target table via a single request.

I donโ€™t believe that is possible using Zapier. It has a single row at a time interface.

It is possible to add two or more rows to a target table in a single request using the AppSheet REST API. You simply include two or more row values in the REST API Body.

You can create an AppSheet webhook that invokes the REST API directly without going through Zapier. That is what I was suggesting.

When you create a webhook and specify the REST API in the URL, we automatically generate a JSON template for the webhook Body that works with the REST API. You can then tweak the JSON template to select the row values you want to add to the target table.

Webhooks are described in this article https://help.appsheet.com/articles/962008-invoking-webhooks-from-a-workflow-rule-or-scheduled-report
See topic โ€œCreating a JSON Body Template Fileโ€ for a discussion of using the webhook to invoke the AppSheet API.

This is the first in a series of articles describing the REST API. https://help.appsheet.com/articles/1979966-api-the-essentials

Thanks I will get back to with my hopeful success story!

FatLou
New Member

@Phil
I was able to add multiple rows via the AppSheet API! Good deal, the next step would be to programmatically generate the json. Do you guys have any special way of doing this. I want to use FIlter or SELECT and then take the result of that search and add corresponding rows to a different table.
STEP 1:
I was thinking that I would have a work flow with two Actions. The first action would Filter the results from Table A and build the JSON file on google drive.
STEP 2:
The next action would point to the json generated in Step 1 to add the rows.

In this case then json file would be named the same (disable time stamp) so that it is overwritten every time so that the file path remains the same.

Is this the correct path or do you guys have a simpler way of doing things?

I think you can do everything directly in the webhook.

The JSON template you specify with the webhook can include a Start expression that uses Filter or Select to pick the rows to include in the resulting JSON body. (It works just like a Start expression in an email template. But instead of creating an email body or PDF attachment, it is creating the JSON body sent by the webhook.)

When the webhook workflow rule is triggered, we read and evaluate the JSON template. This produces the JSON Body that is sent by the webhook.

Thanks Phil,

I got it all working using the start statement.

Cheers

Good work!

Top Labels in this Space