A Google Apps Script project to automate email notifications when the 'PENDING QTY' in a Google Sheet reaches zero. Designed for production order management but adaptable to diverse workflows. Currently under active development!
- No External APIs Required: Uses native Google services (
MailApp) for email sending. - Automated Email Triggers: Sends emails when
PENDING QTYis0. - Daily Email Limit: Caps emails at 50/day to avoid quota issues.
- Customizable Templates: Dynamic placeholders for order details (FG Code, Design No, etc.).
- Row Management: Auto-deletes processed rows to prevent duplicates.
- Multi-Sheet Compatibility: Works with any Google Sheet containing similar column structures.
- Scalable Architecture: Built for future integrations (WhatsApp, SMS, Zoho Mail, etc.).
- Google Apps Script: Core automation engine (no external APIs needed for current features).
- Google Sheets: Central data hub.
- Native Email Service: Uses built-in
MailAppfor email delivery (no Gmail API setup required). - Utilities:
SpreadsheetApp, time-based triggers.
- API Integrations:
- WhatsApp/SMS via Twilio or other third-party APIs (will require API keys).
- Zoho Mail/Outlook/Gmail integration using their APIs.
- Advanced Templates: HTML formatting and attachments.
- Error Recovery: Retry failed emails and backup rows.
- Dynamic Column Mapping: Auto-detect column headers for flexibility.
- Current Version: Works entirely within Google ecosystem using
MailApp(no external API setup needed). - Future Versions: Planned integrations (e.g., WhatsApp/SMS) will require API keys/credentials. These will be added as optional modules.
- Column Customization:
- Ensure your sheet has a
PENDING QTY-equivalent column (e.g., "Stock Level", "Task Status"). - Map other columns (e.g.,
Email Recipient→ "Client Email",Party Name→ "Customer Name").
- Ensure your sheet has a
- Template Tweaks:
- Modify
generateEmailBody()to match your data structure.
- Modify
- Triggers:
- Use
createTimeDrivenTrigger()for periodic checks (e.g., hourly inventory updates).
- Use
We welcome contributors!
- 🛠️ Developers: Help build WhatsApp/SMS integrations (API-based) or UI dashboards.
- 📖 Testers: Report bugs or edge cases.
- 💡 Ideas: Suggest new features or optimizations.
Get Started:
- Fork the repository.
- Submit PRs to the
developmentbranch.
Connect with the Author:
👉 Adarsh Kumar | LinkedIn
- Google Sheet with columns:
PENDING QTY,Email Recipient, and related fields. - No API Keys Needed: Current version uses native Google services.
- Open your Google Sheet → Extensions > Apps Script.
- Copy Bulk_Email_Notification_Sender.gs into the editor.
- Replace
YourSenderEmail@gmail.comwith your email. - Save, authorize, and run
sendBulkEmails().
- Run
createTimeDrivenTrigger()for 30-minute checks. - Use
deleteAllTriggers()to stop automation.
- No External Dependencies: Works out-of-the-box with Google Workspace.
- Future API Requirements: Upcoming features (e.g., SMS) will need API setup.
- Test Thoroughly before enabling triggers.
Created By: Adarsh Kumar
Version: V_1.0 (Beta)
Status: 🚧 Under Development 🚧