function autoFillGoogleDocFromForm(e,state) {
// assume it's the first sheet where the data is collected
var sh = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Form responses 1");
const entryRow = e.range.getRow();
var last = sh.getLastRow();
var lastcol = sh.getLastColumn();
const info1 = e.namedValues;
const fname = sh.getRange(entryRow, 3).getValue();
const sname = sh.getRange(entryRow, 4).getValue();
const leavet = sh.getRange(entryRow, 7).getValue();
const leaver = sh.getRange(entryRow, 8).getValue();
const URL = sh.getRange(entryRow, 12).getValue();
const Logo = UrlFetchApp.fetch(URL).getBlob();
const URL1 = sh.getRange(entryRow, 14).getValue();
const Incident = UrlFetchApp.fetch(URL1).getBlob();
var Requesteremail = sh.getRange(entryRow, 2).getValue();
var RequestContent = sh.getRange(entryRow, 3).getValue();
// Generate Unique ID
var Uuid = uuid_(lastcol);
// return the URL : apps needs to be deployed
var scriptUri = DEPLOY_ID;
Logger.log('uri: '+scriptUri);
// Append results in the Google Sheet
var array = [ [Uuid, "NA", "NA",
'=HYPERLINK("'+scriptUri+'?i="&ROW()&"&state=APPROVED&last="&ROW(),"Approve")',
'=HYPERLINK("'+scriptUri+'?i="&ROW()&"&state=DENIED&last="&ROW(),"Deny")' ] ]
Logger.log('array to be inserted in the Sheet last: '+array);
// insert colum 4
var newRange = sh.getRange(last,4,1,5);
Logger.log(newRange.getA1Notation());
newRange.setValues(array);
reviewContent_(
Requesteremail,
RequestContent,
Uuid,
last
); // TemplateEmail + Recipients settings
//const nextstep = thenextstep(sh,entryRow,info1,Logo,Incident,fname,sname,leavet,leaver,state);
}