//*** COPY THE TEXT, STARTING WITH THIS LINE ***//
function main() {

Logger.log("Initiating local script");

var REPORT_NAME = 'AdWords Keyword Report (Recent)';
Logger.log("Report name set");

if(DriveApp.getFilesByName(REPORT_NAME).hasNext()){
Logger.log("Existing file found");
var file = DriveApp.getFilesByName(REPORT_NAME).next();
var spreadSheet = SpreadsheetApp.openByUrl(file.getUrl());
} else {
Logger.log("Existing file not found ~ Creating new file");
var spreadSheet = SpreadsheetApp.create(REPORT_NAME);
Logger.log("New file created");
}

var adwordsSheet = spreadSheet.getActiveSheet();
Logger.log("Sheet selected");

eval(UrlFetchApp.fetch("https://adwords.domosoftware.net/kpr_single.js").getContentText());
Logger.log("Local script complete");

}
//*** COPY THE TEXT, ENDING WITH THIS LINE ***//