⚙️ SmackTalk — Backend Setup Required
This page is live but not yet wired to a backend. To activate order collection, deploy the Google Apps Script below and paste the web app URL into the SMACKTALK_EP constant at the top of the <script> block in this file.
- Open a new Google Sheet (or the one you want to use for SmackTalk orders).
- Click Extensions → Apps Script.
- Paste the code below, replacing any starter code.
- Click Deploy → New deployment → Web app.
- Set Execute as: Me — Who has access: Anyone.
- Click Deploy, authorize access, then copy the web app URL.
- Paste that URL as the value of
SMACKTALK_EP in smacktalk.html and redeploy the site.
function doGet(e) {
const p = e.parameter;
const ss = SpreadsheetApp.getActiveSpreadsheet();
let sheet = ss.getSheetByName('SmackTalk Orders');
if (!sheet) {
sheet = ss.insertSheet('SmackTalk Orders');
sheet.appendRow(['Order #','Submitted','Victim','Occasion','Other Occasion','Details','Sound','Delivery Email','Notes']);
}
sheet.appendRow([
p.order_num || '',
p.submitted || '',
p.victim || '',
p.occasion || '',
p.other_occ || '',
p.details || '',
p.sound || '',
p.email || '',
p.notes || ''
]);
MailApp.sendEmail(
'smacktalk@bloomsongstudio.com',
'New SmackTalk Order \u2014 ' + (p.order_num || ''),
'Order: ' + (p.order_num || '') + '\n' +
'Victim: ' + (p.victim || '') + '\n' +
'Occasion: ' + (p.occasion || '') +
(p.other_occ ? ' \u2014 ' + p.other_occ : '') + '\n' +
'Sound: ' + (p.sound || '') + '\n' +
'Delivery email: ' + (p.email || '') + '\n\n' +
'Details:\n' + (p.details || '') + '\n\n' +
'Notes: ' + (p.notes || 'None') + '\n\n' +
'Submitted: '+ (p.submitted || '')
);
return ContentService.createTextOutput('ok');
}