To target the first empty row in the column, use the following code:
var firstOpenRow = sheet.getLastRow() + 1;
var firstOpenRange = sheet.getRange(firstOpenRow, columnNum, numRows, numColumns);
If you want to fill that row with data from an existing row, get the data from that row and set the values of firstOpenRow
:
var existingData = sheet.getRange(rowNum, columnNum, numRows, numColumns);
for (var i = 0; i < numberOfCellsToFill; i++) {
firstOpenRange.getCell(1, i+1).setValue(existingData.getCell(1, i+1).getValue());
}
In order to run these blocks in-sheet, you will have to create a sidebar add-on which is relatively easy if you know basic HTML and CSS. Some example reference can be found here.
In that sidebar, you'll want to have an input field and button to fetch whatever dataset you are trying to target, and then another button to insert that data at the end of the sheet.
If you are looking to insert completely new data, use a form object in your sidebar to retrieve and send that data to your script. In the script, use the same principles as shown above but with the form data.