# Full Finished `index.html` ```html
Order Form + Invoice Generator
Order ID: ${orderId}
Date: ${currentDate}
Name: ${customerName}
Email: ${customerEmail}
Phone: ${customerPhone}
Package: ${packageName}
Price: £${packagePrice}
Notes:
${notes}
`, attachments: [pdfBlob] }); // ===================================== // EMAIL TO CUSTOMER // ===================================== MailApp.sendEmail({ to: customerEmail, subject: 'Your Invoice - ' + orderId, htmlBody: `Hello ${customerName},
Your order has been received successfully.
Order ID: ${orderId}
Package: ${packageName}
Total: £${packagePrice}
Your invoice PDF is attached.
SN System
`, attachments: [pdfBlob] }); return ContentService .createTextOutput( JSON.stringify({ success: true }) ) .setMimeType(ContentService.MimeType.JSON); } catch(error) { return ContentService .createTextOutput( JSON.stringify({ success: false, error: error.toString() }) ) .setMimeType(ContentService.MimeType.JSON); } } ``` --- # IMPORTANT DEPLOY SETTINGS Apps Script → Deploy → Manage Deployments Use: * Execute as: * Me * Access: * Anyone Then redeploy. --- # FINAL RESULT You now have: ✅ Working order form ✅ Google Apps Script integration ✅ Real POST requests ✅ Invoice PDF generation ✅ Customer invoice email ✅ Owner notification email ✅ Unique order IDs ✅ Automatic PDF download ✅ Error handling ✅ Modern responsive UI