Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create backup.js #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions backup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
function emailer() {
Logger.clear()
const sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName("Assignments");
// column:1 for first set, 9 for the second set
const column = 9;
var row = 2;
const range = sheet.getRange(row, column, 90, 7);
const values = range.getValues();
for (index in values) {
const [position, importance, source, name, email, shirt, sent] = values[index];
if (name !== "" && email !== "") {
Logger.log("Emailed %s (%s)", name, email);
var message = [ "" ,
"Hello" + name + "," ,
"Despite the challenges we faced (tongue-in cheek \"We are North Brunswick!\") we have another succesful Brunswick Eruption behind us. It is thanks to the efforts of all our handworking volunteers that Brunswick Eruption continues to be a mainstay in the Mid-Atlantic region.",
"" ,
"Our utmost thanks," ,
"The Brunswick Eruption Planning Committee"];
message = message.join("\n")
// MailApp.sendEmail(email, "[email protected]", "Thank You Volunteers", message);
sheet.getRange(row, column + 6).setValue("Sent");
SpreadsheetApp.flush();
}
row = row + 1;
}
}
*/