Small CS Ops script to understand how many hours we have been spending on implementation.
This commit is contained in:
1
Scripts/GAS_GS/Imp_email_numbers/.clasp.json
Normal file
1
Scripts/GAS_GS/Imp_email_numbers/.clasp.json
Normal file
@ -0,0 +1 @@
|
||||
{"scriptId":"10QXSGrp0KFNbW8SrcasrhcW9U4v2SZVWe1fTMqUUxlnz3-FHyrqaK4tQ","rootDir":"/Users/normrasmussen/Documents/Work/Scripts/GAS_GS/Imp_email_numbers"}
|
||||
19
Scripts/GAS_GS/Imp_email_numbers/FindImpEmails.js
Normal file
19
Scripts/GAS_GS/Imp_email_numbers/FindImpEmails.js
Normal file
@ -0,0 +1,19 @@
|
||||
function getMail(){
|
||||
|
||||
var imp_customers = ['cin7', 'datasnipper', 'sandata', 'wsgc', 'anthology', 'chubb', 'achievece']
|
||||
for (company of imp_customers) {
|
||||
var counter = 0
|
||||
var threads = GmailApp.search("to:"+company+" from:me");
|
||||
for (var i = 0; i < threads.length; i++) {
|
||||
var message = threads[i].getMessages();
|
||||
for (var x = 0; x < message.length; x++) {
|
||||
var item = message[x].getFrom();
|
||||
var date = String(message[x].getDate());
|
||||
if ( item.includes("nrasmussen@gainsight.com") && date.includes("Nov")) {
|
||||
counter++
|
||||
}
|
||||
}
|
||||
}
|
||||
Logger.log(company+": "+counter)
|
||||
}
|
||||
}
|
||||
7
Scripts/GAS_GS/Imp_email_numbers/appsscript.json
Normal file
7
Scripts/GAS_GS/Imp_email_numbers/appsscript.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"timeZone": "America/New_York",
|
||||
"dependencies": {
|
||||
},
|
||||
"exceptionLogging": "STACKDRIVER",
|
||||
"runtimeVersion": "V8"
|
||||
}
|
||||
Reference in New Issue
Block a user