Move output folder ID into a constant

This commit is contained in:
Adam Goldsmith 2020-06-20 18:09:07 -04:00
parent 023ffc6811
commit e158e31bf1

View File

@ -1,3 +1,5 @@
const OUTPUT_FOLDER_ID = '1ROyJXk-QANTHM6Jiw0ne3EQiR1f2UsLr';
function onOpen() { function onOpen() {
const ui = SpreadsheetApp.getUi(); const ui = SpreadsheetApp.getUi();
ui.createMenu('CMS Document Generation') ui.createMenu('CMS Document Generation')
@ -81,9 +83,7 @@ function generateForRow(
const template_doc = DocumentApp.openById(row['Template ID']); const template_doc = DocumentApp.openById(row['Template ID']);
const source_file = DriveApp.getFileById(row['Document ID']); const source_file = DriveApp.getFileById(row['Document ID']);
const out_folder = DriveApp.getFolderById( const out_folder = DriveApp.getFolderById(OUTPUT_FOLDER_ID);
'1ROyJXk-QANTHM6Jiw0ne3EQiR1f2UsLr'
);
const out_name = row['Document Name'] + '_' + row['Version']; const out_name = row['Document Name'] + '_' + row['Version'];