How to auto trigger a button in a workflow


I have a button (Icon actually) in a repeating group that when pressed, it saves the repeating group row as an item.

I want to make it in a way that it gets automatically clicked rather than the user having to manually click a button for each row.

The data in the repeating group basically gets returned by API and then put into inputs but I want the info to basically be saved the moment it gets returned by API (Like the button is automatically clicked and saving the data without the user having to do it manually)

How can I make it in a workflow that when something happens like the data is returned or an action happens, then the button is automatically clicked?

Why not save it directly in to the database rather than populating it to a repeating group?

Also, if the number of data is fixed, you could have a “do when condition is true” event wherein if the number of items in the repeating group is x, save it to the database

But the former is much faster and easier