← Portfolio  /  Case Study
Case Study · Apps Script Automation

ReportRunner - Spreadsheet ranges, mailed as PDFs, on demand

A small Google Sheets add-on that turns selected ranges into clean PDF reports and sends them to a list of recipients with one click - with smart duplicate prevention, retry logic for rate limits, and a full log of every send.

Role · Sole Automation Engineer: architecture, build, testing Tools · Google Apps Script · Sheets · Drive · Gmail
The Problem

Sending the same reports every week, by hand

Recurring report distribution - the kind every ops team does - eats hours and is one of the easiest things to mess up.

Before

Export, name, attach, send. Times five.

Open each tab, export to PDF, save to Drive with the right name, draft an email, attach all the PDFs, type the same body, send to each recipient one at a time. Hope nothing was missed.

After

One click sends everything to everyone.

The configuration sheet defines what gets exported, in which orientation, to whom, with what subject and body. Click "Send Email." The script does the rest and logs every send.

How It Works

Five simple steps

No technical knowledge needed to follow this, every box is a thing happening in the background, automatically.

1 · Configure

List the sheets, ranges, recipients, subject, and body in one place.

2 · Click "Send"

One menu click triggers the script. No code, no setup window.

3 · Generate PDFs

Each range is exported to PDF and saved to a dedicated Drive folder.

4 · Send to all

Each recipient gets the same email with all the PDFs attached.

5 · Log everything

Timestamp, PDF name, link, recipient, status - all recorded automatically.

Live Demo

Watch it run

A 90-second clip showing the full cycle - configure, click, send, log.

ReportRunner sending two PDFs to three recipients and logging every send.
Inside The Build

Two scripts, one custom menu

For the technically curious: here's what's actually wired up behind the scenes.

SendEmail.gs - The Engine

runs when "Send Email" is clicked
SendEmail.gs file open in the Apps Script editor
1
Reads the Configuration

Pulls every row's sheet name, range, orientation, recipient, subject, body, and sender.

2
Exports each range as PDF

Builds the Google Sheets export URL with the right page settings - portrait or landscape, fitted to the range.

3
Skips duplicate PDFs

Compares a hash of the new file against any existing PDF with the same name. Identical files don't get re-saved.

4
Saves to a dedicated folder

Creates (or finds) a Drive folder named "Sent PDF Files" so reports never get lost in the root.

5
Sends with custom sender name

Uses GmailApp with the sender name from the config - so the recipient sees "MARIA," not the script owner.

6
Retries on rate limits

If Gmail returns a 429, the script waits and retries up to 10 times with exponential backoff.

Menu.gs - Custom Menu

runs when the spreadsheet opens
Custom Menu dropdown open in Google Sheets
1
Builds a menu on open

An onOpen trigger adds a custom "Menu" to the Sheets toolbar every time the file is opened.

2
Lists all sheet names

One click auto-populates the Configuration sheet with every tab in the file - no manual typing.

3
One-click navigation

Each menu item activates a specific tab - no scrolling through twenty tabs to find one.

4
Triggers Send Email

The same menu has the "Send Email" button that kicks off the engine.

The Configuration Sheet

Everything lives in one row per report

No code to edit when something changes. Add a row, change a recipient, swap a range - that's it.

Sheet
Range
Orient.
Recipient
Subject
Body
Sender
Sales Data
A1:J39
Portrait
ema@…
Monday Report
Hello, this is…
MARIA
Inventory
A1:L25
Landscape
chlomo@…
Monday Report
Hello, this is…
MARIA
Project Tracker
A1:K20
Landscape
hooman@…
Monday Report
Hello, this is…
MARIA
A simplified view of the Configuration sheet - one row per report.

What each column does

Sheet & Range
  • Sheet - which tab to export
  • Range - exact cells (e.g. A1:J39)
Layout
  • Orientation - Portrait or Landscape (dropdown)
Email
  • Recipient - who receives the email
  • Subject - email subject line
  • Body - email message text
  • Sender - display name on the email ("MARIA")
Trigger
Menu → Send Email
Storage
Drive folder
Retries
Up to 10× on 429
Logging
Logs sheet
The Results

What changed for the workflow

1
Click to run

Replaces a multi-tab, multi-export, multi-attach process.

Reports + recipients

Add as many rows to the config as you need - the script scales with it.

0
Duplicate PDFs

Hash comparison stops identical files from being re-saved.

100%
Audit trail

Every send is logged with timestamp, link, recipient, and status.

Built With

Tools used

No external services. No subscriptions. Native Google stack only.

Google Apps Script Google Sheets Google Drive Gmail

Need something like this for your business?

I build small, reliable automations that quietly take a workload off your team's plate. Open to client work and full-time roles.

Get in touch →