I am trying to make a report that's generated from google form answers. I found some way to populate the text but the problem is i need to add the images from google form answers on my report in google slides. I am not a developer so can anyone help me with it? Here's the code that i've tried:
function onFormSubmit(e) {
//open the template presentation by ID
var templateDoc = DriveApp.getFileById('1ytA5aje8eTW4tQOf9U_DCKlpLrnLYZna3KIvjz9rx1Q');
//create a copy of the template
var newTempFile = templateDoc.makeCopy();
//open the presentation for editing
var openSlide = SlidesApp.openById(newTempFile.getId());
//get the responses triggered by On Form Submit
var items = e.response.getItemResponses();
//var amountof_item = items[4].getResponse();
//find the text in the presentation and replace it with the Form response
//items[0].getResponse() is the first response in the Form
openSlide.replaceAllText('{PM In Charge :}', items[0].getResponse());
openSlide.replaceAllText('{Homeowner Name :}', items[1].getResponse());
openSlide.replaceAllText('{Location :}', items[2].getResponse());
openSlide.replaceAllText('{Week :}', items[3].getResponse());
openSlide.replaceAllText('{Report Date :}', items[4].getResponse());
openSlide.replaceAllText('{Start Date :}', items[6].getResponse());
openSlide.replaceAllText('{End Date :}', items[7].getResponse());
openSlide.replaceAllText('{Rooms :}', items[8].getResponse());
openSlide.replaceAllText('{Work Item :}', items[9].getResponse());
openSlide.replaceAllText('{Work Item Progress :}', items[10].getResponse());
openSlide.replaceAllText('{Work Item File/Image :}', items[11].getResponse());
//Save and Close the open document
openSlide.saveAndClose();
DriveApp.getFileById(newTempFile.getId()).setName(items[1].getResponse() + "-" + items[3].getResponse() + "-Progress");
}