I'm a newbie with app script and got stuck with the below. I have a google sheet with a list of urls of google docs that have identical formatting. I want to be able to read the docs and write back to the google sheet in a new column, the text from a specific paragraph and row for each url. With the below code, I am able to read what I want to from the a doc but not exactly what I intend to do. I think I need to create a variable for each url on my sheet to start with. Can someone help with this please? Thanks very much in advance.
function doc_details() {
var doc = DocumentApp.openByUrl("this is where I enter the doc url");
var body = doc.getBody();
// select the table
var table= body.getTables()[0];
// select the row
var row = table.getRow(3);
var res = row.getText();
Logger.log(res);
}