I use an ImportRange formula to get data from multiple tabs into single one. The formula looks like
=QUERY({IMPORTRANGE("123","B1!A2:D");IMPORTRANGE("123","B2!A2:D")},"where Col1 is not null", 0)
Is it there a way to add rows to table automatically if they are needed? With formula or setting - not by app script.