This repository contains two powerful Google Apps Script tools for automating common business tasks:
- Weekly Meeting Summary Generator - Automatically creates structured meeting summaries from your Google Calendar
- Other Contacts Exporter - Exports "Other Contacts" from Google Contacts to Google Sheets with pagination support
Automatically generates a weekly meeting summary from your Google Calendar events for the next 7 days, filters out irrelevant meetings, and pushes a structured markdown summary to a GitHub repository.
- Fetches calendar events for the upcoming 7 days
- Smart filtering to exclude:
- Personal events (home, personal appointments)
- Internal meetings (stand-ups, all hands)
- Specific keywords and patterns
- Single-attendee meetings created by you
- Groups events by date with clean formatting
- Pushes to GitHub with automatic file creation/updating
- SAML-aware GitHub integration
- Go to Google Apps Script
- Click "New Project"
- Copy the entire content from
Weekly Meeting Summary - Livefile - Paste it into the editor (replacing default code)
- Save with a descriptive name (e.g., "Weekly Meeting Summary")
-
Create GitHub Personal Access Token:
- Go to GitHub Settings β Developer settings β Personal access tokens
- Click "Generate new token (classic)"
- Select scopes:
repo(full control of private repositories) - Copy the generated token
-
Add Token to Apps Script:
- In Apps Script editor, click Project Settings (gear icon)
- Go to "Script properties" tab
- Click "Add script property"
- Name:
GITHUB_TOKEN - Value:
your-github-personal-access-token - Click "Save"
-
Handle SAML Organizations (if applicable):
- If targeting a SAML-enforced organization (like github/SLGEast):
- Go back to your GitHub token settings
- Find your token and click on it
- Scroll to "Organization access"
- Click "Authorize" for the target organization
- Complete SAML authentication if prompted
Update these variables in the script if needed:
const owner = 'github'; // GitHub username/organization
const repo = 'SLGEast'; // Repository name
const path = 'WeeklyMeetingSummary.md'; // Target file path-
Grant Calendar Permissions:
- Run the
createNextSevenDaysSummaryfunction once manually - Authorize calendar access when prompted
- Run the
-
Create Weekly Trigger:
- Click "Triggers" (clock icon) in the left sidebar
- Click "+ Add Trigger"
- Choose function:
createNextSevenDaysSummary - Event source:
Time-driven - Type:
Week timer - Day:
Every Monday(or preferred day) - Time:
9am to 10am(or preferred time) - Click "Save"
- Manual Run: Select
createNextSevenDaysSummaryand click "Run" - Automatic: Set up weekly trigger for hands-off operation
- Monitor: Check "Executions" tab for run history and logs
Modify the excludedTitles array to add/remove filtered keywords:
const excludedTitles = [
'home', 'personal', 'stand-up', 'internal',
// Add your own keywords here
];Exports your Google "Other Contacts" (people you've interacted with via email but haven't explicitly saved) to a Google Sheet. Now includes pagination support to handle large contact lists (3000+ contacts).
- Complete Contact Export: Names, emails, phones, companies, notes
- Pagination Support: Handles thousands of contacts across multiple API pages
- Smart Filtering: Excludes specified domains (like github.com)
- Multiple Export Methods: Tries different APIs for maximum compatibility
- Auto-formatting: Creates organized spreadsheet with headers and metadata
- Weekly Automation: Set up automatic exports
- Detailed Logging: Progress tracking and error handling
- Go to Google Apps Script
- Click "New Project"
- Copy the entire content from
ContactScrapingfile - Paste into editor and save with name like "Contact Exporter"
Optional - Use Existing Spreadsheet:
const SPREADSHEET_ID = '1W-0n5y43H4qR6-TGJZ3sErNrFiTs8YDFmEmwai6lVzc'; // Your sheet IDLeave empty ('') to auto-create a new spreadsheet.
Domain Filtering:
const EXCLUDED_DOMAINS = [
'github.com',
'company.com', // Add domains to exclude
'internal.org'
];- Run
testExportfunction first - Click "Review permissions" β "Go to [Project Name]" β "Allow"
- Grant access to:
- Google Contacts (read contacts)
- Google Sheets (create/update spreadsheets)
Run setupWeeklyTrigger to create automatic weekly exports every Monday at 9 AM.
testExport- Test run with detailed logging (recommended first)exportOtherContactsToSheet- Full export to spreadsheetsaveAndExportContacts- Save other contacts as regular contacts, then exportsetupWeeklyTrigger- Enable weekly automationremoveAllTriggers- Disable automation
- First Time: Run
testExportto verify everything works - Regular Use: Run
exportOtherContactsToSheetfor full export - Large Lists: The script automatically handles pagination
Starting Other Contacts export...
Attempting to access Other Contacts using otherContacts.list...
Fetching page 1...
Page 1: Found 1000 contacts (Total so far: 1000)
Fetching page 2...
Page 2: Found 1000 contacts (Total so far: 2000)
Fetching page 3...
Page 3: Found 725 contacts (Total so far: 2725)
β
otherContacts.list pagination complete!
π§ Total other contacts found across all pages: 2725
After domain filtering: 2650 other contacts
| Column | Description |
|---|---|
| Full Name | Complete contact name |
| First Name | Given name |
| Last Name | Family name |
| Primary Email | Main email address |
| All Emails | All emails (comma-separated) |
| Primary Phone | Main phone number |
| All Phones | All phones with labels |
| Company | Organization name |
| Job Title | Position title |
| Notes | Contact notes/biography |
| Last Updated | Last modification date |
Google Contacts categories:
- Contacts: People you've explicitly added
- Other Contacts: People from email interactions you haven't explicitly saved
The script targets "Other Contacts" including:
- Contacts in the "Other Contacts" group
- Contacts without any group assignment
- Auto-added contacts from email interactions
"No contacts found":
- Verify you have "Other Contacts" in Google Contacts
- Check authorization permissions
- Try running
testExportfirst
"Pagination stopped early":
- Normal behavior when all contacts are retrieved
- Check final contact count in logs
"Permission denied":
- Re-authorize the script
- Verify you're using the correct Google account
"Spreadsheet errors":
- Check
SPREADSHEET_IDis correct - Leave empty to auto-create new sheet
- Go to Apps Script β "Executions"
- Click on any execution to see full logs
- Look for pagination progress and final counts
Modify shouldExcludeContact function to add custom filtering logic:
function shouldExcludeContact(contact) {
// Add your custom filtering logic here
// Return true to exclude, false to include
}Modify trigger timing:
// Daily at 8 AM
ScriptApp.newTrigger('exportOtherContactsToSheet')
.timeBased()
.everyDays(1)
.atHour(8)
.create();- Data Privacy: All processing happens within Google's secure environment
- No External Servers: Data never leaves Google/GitHub ecosystem
- Token Security: GitHub tokens should have minimal required permissions
- Revocable Access: Permissions can be revoked anytime via Google Account settings
- Check Execution Logs: Apps Script β Executions β Click on run
- Verify Permissions: Re-authorize if needed
- Test Functions: Use
testExportor manual runs first - Check Quotas: Google Apps Script has daily execution limits
- GitHub 403 Forbidden: Authorize token for SAML organizations
- Calendar/Contacts access denied: Re-run authorization flow
- Trigger failures: Check trigger status and error notifications
- Large dataset timeouts: Script includes automatic pagination and chunking
- Review execution logs for specific error messages
- Check Google Apps Script quota limits
- Verify API permissions and tokens
- Test with smaller datasets first
These scripts are provided as-is for personal and professional use. Please review and understand the permissions you're granting before use.