Google Scripts for Talkspace & Doximity. SOme walmart notes
This commit is contained in:
BIN
Custom_Templates/customer_templates/.DS_Store
vendored
BIN
Custom_Templates/customer_templates/.DS_Store
vendored
Binary file not shown.
@ -17,6 +17,7 @@
|
||||
<div class="np-card-content-subtitle">
|
||||
{{ course.instructor_names }}
|
||||
</div>
|
||||
{% include "course_details"%}
|
||||
<div class="np-card-content-footer">
|
||||
<div class="np-card-content-progress np-button-color">
|
||||
{% t shared.progress, count: course.progress %}
|
||||
|
||||
@ -38,4 +38,5 @@
|
||||
<option class="second-login-group-option" value="2a0100e6-2cd3-4f14-9706-ddadb95e9cb3">Tim Lavin Accounts</option>
|
||||
<option class="second-login-group-option" value="58309856-2659-465b-83bc-9462be60c125">Tyler Schaaf Accounts</option>
|
||||
<option class="second-login-group-option" value="da7a064a-da24-4011-b7ba-ffa33586d36c">Mizuno Canada</option>
|
||||
<option class="second-login-group-option" value"1ee46f9a-8a38-4c18-ac27-4578e8cc5dbf">Chris Nugent Accounts</option>
|
||||
</select>
|
||||
|
||||
@ -38,4 +38,5 @@
|
||||
<option class="second-login-group-option" value="2a0100e6-2cd3-4f14-9706-ddadb95e9cb3">Tim Lavin Accounts</option>
|
||||
<option class="second-login-group-option" value="58309856-2659-465b-83bc-9462be60c125">Tyler Schaaf Accounts</option>
|
||||
<option class="second-login-group-option" value="da7a064a-da24-4011-b7ba-ffa33586d36c">Mizuno Canada</option>
|
||||
<option class="second-login-group-option" value"1ee46f9a-8a38-4c18-ac27-4578e8cc5dbf">Chris Nugent Accounts</option>
|
||||
</select>
|
||||
|
||||
@ -494,3 +494,10 @@ Charlie couldn't replicate. Franklin didn't notice it happening on all videos.
|
||||
|
||||
TODO: Ask Cam for an update on all the cover images and gifs in a single zip file. Whatever he has named the file is
|
||||
okay.
|
||||
|
||||
## 06/07/2023
|
||||
|
||||
### Reviewing Aditi's Resource Bundle & SCORM items
|
||||
|
||||
* Next month's will go out on the 30th.
|
||||
TODO: Work with Cassie before the 30th to get SCORM versions decoupled.
|
||||
|
||||
1
Scripts/GoogleScripts/Doximity/.clasp.json
Normal file
1
Scripts/GoogleScripts/Doximity/.clasp.json
Normal file
@ -0,0 +1 @@
|
||||
{"scriptId":"13jMb_qCijEsEwZMcsx28oYQrKEKm-HlE0yKkz7xLOWmcykwK9YZz_nDG","rootDir":"/Users/normrasmussen/Documents/Work/Scripts/GoogleScripts/Doximity"}
|
||||
7
Scripts/GoogleScripts/Doximity/appsscript.json
Normal file
7
Scripts/GoogleScripts/Doximity/appsscript.json
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"timeZone": "America/New_York",
|
||||
"dependencies": {
|
||||
},
|
||||
"exceptionLogging": "STACKDRIVER",
|
||||
"runtimeVersion": "V8"
|
||||
}
|
||||
15
Scripts/GoogleScripts/Doximity/ppl_mgr_lookup.js
Normal file
15
Scripts/GoogleScripts/Doximity/ppl_mgr_lookup.js
Normal file
@ -0,0 +1,15 @@
|
||||
function addVlookFormula() {
|
||||
var ss = SpreadsheetApp.getActiveSpreadsheet();
|
||||
var sheet = ss.getSheets()[0];
|
||||
Utilities.sleep(10000)
|
||||
var value = sheet.getRange(2,2).getValue();
|
||||
|
||||
if (value != "Is People Manager?") {
|
||||
sheet.insertColumnAfter(1);
|
||||
sheet.getRange(2,2).setValue("Is People Manager?");
|
||||
lastRow = sheet.getLastRow();
|
||||
for(var i=3; i<lastRow;i++){
|
||||
sheet.getRange(i,2).setFormula('=VLOOKUP(A'+i+', Assignments!$B:$C, 2, false)');
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -15,8 +15,9 @@ function checkBamboo() {
|
||||
var parseProps = JSON.parse(txtResponse);
|
||||
var switched_on = parseProps["data"]["attributes"]["switched_on"];
|
||||
var configured = parseProps["data"]["attributes"]["configured"];
|
||||
console.log(switched_on)
|
||||
console.log(configured)
|
||||
|
||||
var now = new Date();
|
||||
var datetime = Utilities.formatDate(now, 'America/New_York', 'MM/dd/yyyy - HH:mm'); // Today
|
||||
|
||||
// var emailQuotaRemaining = MailApp.getRemainingDailyQuota();
|
||||
// console.log(emailQuotaRemaining)
|
||||
@ -28,19 +29,26 @@ function checkBamboo() {
|
||||
// "Your Bamboo HR Integration is currently turned off."
|
||||
// );
|
||||
|
||||
if (switched_on == "true" && configured == "true") {
|
||||
if (switched_on == "false" && configured == "false") {
|
||||
MailApp.sendEmail("nrasmussen@northpass.com",
|
||||
"BambooHR Is Down",
|
||||
"Your Bamboo HR Integration is currently turned off."
|
||||
);
|
||||
}
|
||||
|
||||
if (switched_on == "false" && configured == "false") {
|
||||
MailApp.sendEmail("jenna.cherry@talkspace.com",
|
||||
"BambooHR Is Down",
|
||||
"Your Bamboo HR Integration is currently turned off."
|
||||
);
|
||||
}
|
||||
|
||||
// var sheet = SpreadsheetApp.openById('1dJJ4no9j4sJ8fKvhxh6mGiailv4YyI0EsqvjJPYVtIM');
|
||||
var ss = SpreadsheetApp.openByUrl('https://docs.google.com/spreadsheets/d/1dJJ4no9j4sJ8fKvhxh6mGiailv4YyI0EsqvjJPYVtIM/');
|
||||
var sheet = ss.getActiveSheet();
|
||||
var lastRow = sheet.getLastRow()+1;
|
||||
console.log(lastRow)
|
||||
//sheet.getRange(lastRow, 1).setValue(datetime);
|
||||
sheet.getRange(lastRow, 1).setValue(datetime);
|
||||
sheet.getRange(lastRow, 2).setValue(switched_on);
|
||||
sheet.getRange(lastRow, 3).setValue(configured);
|
||||
}
|
||||
|
||||
@ -26,6 +26,7 @@ function getAssignment() {
|
||||
var sheet = SpreadsheetApp.getActiveSheet();
|
||||
var api_url =
|
||||
'https://api.northpass.com/v2/assignments/'+assign_uid+'/submissions?page='+page;
|
||||
Logger.log(api_url)
|
||||
const settings = {
|
||||
async: true,
|
||||
crossDomain: true,
|
||||
@ -62,9 +63,22 @@ function getAssignment() {
|
||||
var full_name = info["attributes"]["full_name"];
|
||||
var email = info["attributes"]["email"];
|
||||
let rowArray = [submit_date, download_link, person, full_name, email];
|
||||
Logger.log(rowArray);
|
||||
addToSheet(rowArray);
|
||||
};
|
||||
} else {
|
||||
|
||||
}
|
||||
page++;
|
||||
getAssignment(page);
|
||||
};
|
||||
|
||||
function addToSheet(rowArray){
|
||||
var sheet = SpreadsheetApp.getActiveSheet();
|
||||
var lastRow = Math.max(sheet.getLastRow(),1);
|
||||
|
||||
sheet.insertRowAfter(lastRow);
|
||||
sheet.getRange(lastRow + 1, 1).setValue(rowArray[0]);
|
||||
sheet.getRange(lastRow + 1, 2).setValue(rowArray[3]);
|
||||
sheet.getRange(lastRow + 1, 3).setValue(rowArray[4]);
|
||||
sheet.getRange(lastRow + 1, 4).setValue(rowArray[1]);
|
||||
}
|
||||
Reference in New Issue
Block a user