Read all and delete data in google sheet using script

wow,

how do you do it ?

it is wire I use the tips that I found in the youtube Chanel for the sript but it is not working yet

function doGet(e) {

var ss = SpreadsheetApp.openById(e.parameter.ID);
var sh = ss.getSheetByName(e.parameter.SH);
var Funcion = e.parameter.FUNCION;
var rg = sh.getDataRange().getValues();
var outString = '';

if ( Funcion == 'ENVIAR' ) {
var registro = e.parameter.REGISTRO.split(',');
sh.appendRow(registro);
return ContentService.createTextOutput("New record created");
}

else if (Funcion == 'READ') {
for (var row= 0;row<rg.length; ++row){
outString += rg [row] .join (',') + '\ n';

}
return ContentService.creatTextOutput(outString).setMimeType(ContentService.MimeType.TEXT);
}
}

Even I try to do it in another way like another tutorial

with the code

else if ( Funcion == 'READ' ) {
return ContentService.createTextOutput(JSON.stringify(rg));

}

but it is not working either

If you continue to try other methods that do not work, you will not get anywhere.

Use the example I have provided above and follow the guide.

Ok ,

I Just rey to use the blokcs that you show me as far I as undertand

Let me show you the Bloks

But Is not still working

I see a little bit deeper in the guide that you show me, here Is very late but tomorrow al the very bigging I will follow the guide

Thants for the attention

image