I’m currently testing out a batch add row workflow using a webhook.
I had previously been adding a selection of rows using the add new row to another table action. I have found this was taking considerable sync time and disturbing other app functionality when applied.
I have been trying to use the workflow with the following process;
The rows are selected and an action to update the date/time of the rows updated
The condition the workflow is checking is whether or not the date/time value has been changed from previous version using this formula
This is taking even longer than the previous action and I’m receiving this error in the log.
"Webhook HTTP post request failed with exception The remote server returned an error: (400) Bad Request. "
I can’t seem to find an appropriate action to trigger the workflow. Is there someway to know or record when the action is fired?
I’ve never had any luck with those ‘Preset’ AppSheet:__ settings. It was too buggy when it was first released so I just use ‘Custom’ and insert the endpoint URL manually.
I decided to give it another try this morning and created an AppSheet: Add Row webhook, then ran a few tests.
Execution times were excessive (~60 seconds)
400 Error on one attempt ( “Errors”: “Error: AppSheet Webhook action depth reached”)
I would suggest trying the ‘custom’ webhook, or maybe see if the new AppSheet Automations would work.
I think the SELECT formula thats causing the issue, I don’t want the entire table to be checked just the selected items that the action is applied to so its timing out
I think the SELECT formula thats causing the issue, I don’t want the entire table to be checked just the selected items that the action is applied to so its timing out
Is that the default template that was generated by AppSheet? Maybe just change the TRUE to filter out for your ‘selected items’.
The 400 error is a separate problem, though. Is the API enabled, under Manage Integrations?
Recently I’ve been seeing an increasing amount of people making use of the API for operations that could be achieved using actions; so it’s got me wondering?
What is the main differences between using a webhook to add these rows vs. an action?
To me, it seems that the webhook operation from this post (and all the others I’m referring to) could easily be switched to a reference action that creates the rows - and perhaps reduce some of the “coding” necessary.
Using the action to create rows in another table is taking significant sync time e.g. 18.5 minutes to do 46 syncs, some syncing is taking over an hour due to the large number of items they have selected to add.
We have noticed a pattern between users performing this action making the whole app and in some cases other apps under the same datasource, unfunctional. We receive an error “Too many requests being sent”.
Yeah… that’s a fair amount of records to deal with.
Do you use slices to create subsets of data?
For example:
In this formula, you’ve got the condition isnotblank([Date/Time Requested])
I would split that off into a slice
this way when you do a SELECT(), instead of doing it over the whole table, you can use your subset and “lighten the load.”
This is probly the most forgotten, or unknown, thing to do with AppSheet apps. The source of almost everyone’s problems is due to some sort of SELECT() they’ve got running somewhere - and it’s taking FOR-EV-ER. By creating data subsets you offset when calculations are done, greatly increasing the efficiency of everything invovled.
As Sarah explained, if you have more than just few records to add/update, it doesn’t matter. But if you have lot of, it’s better to bulk calculate them for example with the Start: & End expression.
I created a slice with the condition isnotblank([Date/Time Requested])
I tried to add 4 records, which was 4 syncs that ran for about 1 minute. But nothing added to the Order Details table due to this error from the editor
There were only 23 rows that met the slice condition, so not sure where I’m going wrong.
I think the workflow itself just isn’t adding to the correct table
400 Bad Request
a. The Application Access Key is missing.
b. The AppId is missing.
c. The Post body contains invalid data.
403 Forbidden
a. The Web API is not enabled for this application.
b. The Application Access Key is invalid. 4. 404 Not Found a. The application specified by the AppId cannot be found.
500 Internal Server Error
a. An unexpected error occurred.
In view of the error code, it sounds the issue is associated with accesskey or something.
Is your integration setting and turned on and the fresh access key available?