Under 100 SLOC!! π Welcome to Reportopia! An automated modular reporting tool for Google Sheets that generates stunning daily reports and saves them as PDFs! and automates mails!! πβ¨
π This Google Apps Script generates daily PDF reports from a Google Sheet, sends them via email, and stores them in Google Drive. ππ§β¨
This script is perfect for anyone who needs to automate daily reports or receipts, like:
- Tracking daily receipts and expenses.
- Automatically sending email reports to a list of recipients. π©
- Generating PDF summaries and saving them to Google Drive. π
Example: Small bussiness that needs a receipt system and or keep track of finances
- Fetches data from your Google Sheets (Daily Receipts & Daily Expenses).
- Formats the data into an HTML report with time zones for different regions. ππ° Uses (California & Dhaka), you can change these to your liking.
- Sends the report via email to a list of recipient emails. βοΈ
- Creates PDF versions of the receipts and expenses, then saves them to Google Drive. π
- Optionally, clears the sheet data (except headers) to prepare for the next day's entries. π§Ή
- Open your Google Sheets.
- Go to Extensions > Apps Script.
- Paste the script code into your Apps Script project.
You'll need to configure a few variables to match your setup. Look for the following section in the script:
var config = {
spreadsheetId: SpreadsheetApp.getActiveSpreadsheet().getId(), // Spreadsheet ID
dailyReceiptsSheetName: "Daily_Receipts", // Replace with your receipts sheet name
dailyExpensesSheetName: "Daily_Expenses", // Replace with your expenses sheet name
receiptsFolderId: "YOUR_FOLDER_ID_HERE", // Google Drive Folder ID for Receipts PDFs
expensesFolderId: "YOUR_FOLDER_ID_HERE", // Google Drive Folder ID for Expenses PDFs
recipientEmails: [
"[email protected]", // Add your email here
"[email protected]", // Add other recipients
"[email protected]",
],
};