Hey @nico.io!
If you want to update and insert rows at the same time you'll need to use a combination of the "Update spreadsheet" and "Append data to a spreadsheet" actions (more on that here). Otherwise, if the rows just need to be updated you can stick with "Update spreadsheet"
For the second problem, can you try accumulating the data before passing it to the table? A pattern like the one described here may help. Instead of setting the table data on success, you can try adding the value to some aggregator and then setting your table:
const successes = [];
const promises = table1.data.map((row, i) => {
const values = {...};
return query1.trigger({
additionalScope: { values },
onSuccess: () => successes.push(values),
});
});
await Promise.all(promises);
table1.setData(successes);
Does that help? Let me know if it raises any further questions or issues!