-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.gs
76 lines (70 loc) · 2.78 KB
/
main.gs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Created by Sreeju Sreevatsan <sreeju.sreevatsan@kohls.com> 01/28/2017
function main() {
var startTime = new Date(), exception;
try{
var inputQuery = "from:(servicenow@kohls.com) subject:(Scheduled Execution of Daily Resolved SLA Report)";
var inputFoldername = "Daily Resolved SLA Report";
var reportSheets = delnsaveAttachmentToGDrive(inputQuery, inputFoldername);
var dumpSheet = prepDumpSheet(reportSheets);
validateData(dumpSheet);
openSheetOfEachMonth(dumpSheet);
//notificationEmail();
}
catch(e){
exception = // Created by Sreeju Sreevatsan <sreeju.sreevatsan@kohls.com> 01/28/2017
function main() {
var startTime = new Date(), exception;
try{
var inputQuery = "from:(servicenow@kohls.com) subject:(Scheduled Execution of Daily Resolved SLA Report)";
var inputFoldername = "Daily Resolved SLA Report";
var reportSheets = delnsaveAttachmentToGDrive(inputQuery, inputFoldername);
var dumpSheet = prepDumpSheet(reportSheets);
validateData(dumpSheet);
openSheetOfEachMonth(dumpSheet);
//notificationEmail();
}
catch(e){
exception = e+e.stack;
}
var endTime = new Date();
updateTriggerStats("main()", startTime, endTime, exception);
};
/**
* Adds a custom menu to the active spreadsheet, containing a single menu item
* for invoking the readRows() function specified above.
* The onOpen() function, when defined, is automatically invoked whenever the
* spreadsheet is opened.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
/*function onOpen() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [
{ name : "validateData()", functionName : "validateData" },
{ name : "Email Summary", functionName : "summaryEmail" },
{ name : "Reset Sheet", functionName : "resetSpreadSheet" }
];
spreadsheet.addMenu("Script Center Menu", entries);
};*/
;
}
var endTime = new Date();
updateTriggerStats("main()", startTime, endTime, exception);
};
/**
* Adds a custom menu to the active spreadsheet, containing a single menu item
* for invoking the readRows() function specified above.
* The onOpen() function, when defined, is automatically invoked whenever the
* spreadsheet is opened.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
/*function onOpen() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [
{ name : "validateData()", functionName : "validateData" },
{ name : "Email Summary", functionName : "summaryEmail" },
{ name : "Reset Sheet", functionName : "resetSpreadSheet" }
];
spreadsheet.addMenu("Script Center Menu", entries);
};*/