TARIQ's Tasks
0
To-Do
in progress
done
Synchronizes automatically every 5 minutes and formats updated cells in purple (#7C3AED).
Open the original cloud sheet or export/copy the full synchronized CSV data.
Download or copy the complete standalone HTML file with all current updates and users baked in.
Add a new task owner to the users dropdown and task assignment lists.
function doGet(e) {
const ss = SpreadsheetApp.openById("1JVsb5K22F2G4EcVlhico6vHu6vj7eMcUetaUZ9FnLks");
return ContentService.createTextOutput(JSON.stringify({
onBoarding: ss.getSheetByName("On Boarding").getDataRange().getDisplayValues(),
currentClients: ss.getSheetByName("Current Clients").getDataRange().getDisplayValues()
})).setMimeType(ContentService.MimeType.JSON);
}
function doPost(e) {
const payload = JSON.parse(e.postData.contents);
const ss = SpreadsheetApp.openById("1JVsb5K22F2G4EcVlhico6vHu6vj7eMcUetaUZ9FnLks");
const sheet = ss.getSheetByName(payload.sheetTab);
const PURPLE = "#7c3aed";
if (payload.action === "add") {
sheet.appendRow(payload.rowValues);
const lastRow = sheet.getLastRow();
sheet.getRange(lastRow, 1, 1, payload.rowValues.length).setFontColor(PURPLE).setFontWeight("bold");
return ContentService.createTextOutput(JSON.stringify({ status: "added", row: lastRow })).setMimeType(ContentService.MimeType.JSON);
}
Object.keys(payload.updates).forEach(function(c) {
sheet.getRange(payload.rowIndex, parseInt(c, 10)).setValue(payload.updates[c]).setFontColor(PURPLE);
});
return ContentService.createTextOutput(JSON.stringify({ status: "updated" })).setMimeType(ContentService.MimeType.JSON);
}
Updated cells appear in purple (#7C3AED).