Small businesses bleed hundreds of dollars a month on connector subscriptions just to move an email attachment into a folder or copy five spreadsheet cells into a document. If your company runs on Google Workspace, you already own a built-in scripting tool that handles those exact jobs for $0 extra: Google Apps Script.
Open any Google Sheet, click Extensions → Apps Script, and you have a private server hosted inside your own Google account that speaks natively to Gmail, Drive, Docs, Sheets, and Calendar.
Three high-value scripts any small office can run this week
You do not need a giant software project to feel the time savings. Start with one small, repetitive chore that happens every single week:
- Auto-save Gmail PDF attachments to Drive: every 15 minutes, a timed trigger checks Gmail for a label like 'Vendor Bills' or 'New Intake', saves every PDF into the matching monthly Drive folder with a clean date prefix, and marks the thread filed.
- Sheet-to-Doc quote and contract templates: fill out one row in Google Sheets (client name, job address, scope, price), click a custom menu button, and the script copies your master Google Doc template, swaps placeholders cleanly, exports a crisp PDF, and drops a draft reply into Gmail.
- 7:00 AM morning digest trigger: a time-driven trigger scans overdue invoices in Sheets, today's Calendar appointments, and starred client threads in Gmail, then sends you one tight six-bullet morning summary email.
Connecting Gemini safely with PropertiesService
Once a basic script works reliably, you can add a targeted Gemini API call—for example, summarizing a messy client email thread into three action bullets or flagging missing fields on a vendor quote.
Never paste your Gemini API key straight into the JavaScript editor where anyone with sheet access can read it. Instead, open Project Settings → Script Properties inside Apps Script, save the key under a name like GEMINI_API_KEY, and pull it in code via PropertiesService.getScriptProperties().getProperty('GEMINI_API_KEY').
Why owning tiny scripts beats brittle subscription chains
Apps Script code lives inside your own Google Workspace account—not locked inside a third-party vendor that doubles pricing next year. You grant exact Google scopes, view clear execution logs every time a trigger runs, and keep sensitive client files inside your own Drive boundary.
Apps Script starter checklist
Build your first office automation safely in under an hour:
- Pick one tedious weekly chore inside Gmail, Drive, or Sheets (saving PDFs or filling quote templates is ideal).
- Test the script on a dedicated test folder and sample rows first—never on live client billing.
- Store any external API key strictly in Apps Script
PropertiesService, never in plain code. - Set up email failure notifications on timed triggers so you know immediately if a run hits an error.
- Keep human review on outbound client emails by creating Gmail drafts instead of auto-sending.