I created an app with a flow, that is a long series of if then elses and built like a long custom form.
At the end of this flow, I need to add rows to an Airtable table.
The tricky part is that depending on criterias of the long form, I need to add from 1 to 6 rows with 2 types of rows. So it means that on the submit button of the form i need to create a custom action with 12 branches (if criteria 1 is met and criteria 2 is met then…), and several actions under these 12 ifs.
It makes a super complicated action, which makes my app super slow.
I don’t see any ETA on if conditions in the middle of an action tree. Do you have any idea on how to avoid this big mess?
You’ll soon be able to do this within Glide (give it a couple months). Until then, anytime I hear someone asking for a dynamic amount of added rows, the first thing that comes to mind is to ultimately create a json object that contains each row’s worth of data in an array and send that to Make via a webhook so that you can send it back to Glide using the Glide API.
If you want to keep it solely in Glide, I would suggest using Glide’s JSON template/JSON columns, or JavaScript to construct a HTTP call body that fits with Glide’s API.
Then, upon a button click, use the value above to add multiple rows. However, you must have access to the Call API action to do this.
An alternative is like Robert said, constructing a JSON of info for all rows you want to add (and ideally it should be the same as the HTTP call body above), then use a Trigger Webhook action to send that to a Make webhook, do a HTTP call to batch add the rows over there.