function doPost(e) { const data = JSON.parse(e.postData.contents); const sheet = SpreadsheetApp.getActive().getSheetByName("INPUT"); sheet.getRange("B3").setValue(data.area); sheet.getRange("B4").setValue(data.type); sheet.getRange("B6").setValue(data.k); SpreadsheetApp.flush(); // заставляет формулы пересчитаться const result = sheet.getRange("B20").getValue(); return ContentService .createTextOutput(JSON.stringify({ result })) .setMimeType(ContentService.MimeType.JSON); }