logzly. SEM Success Hub

Easily Automate Weekly PPC Reports Using Google Ads Scripts

Read this article in clean Markdown format for LLMs and AI context.

Tired of spending hours pulling Google Ads data into spreadsheets every Monday? Learn how to automate weekly PPC performance reports with Google Ads scripts—so you get a ready‑to‑read PDF in your inbox while you sip coffee.

How Google Ads Scripts Automate Your Weekly PPC Report

The manual grind of downloading CSVs, formatting columns, and double‑checking dates wastes valuable time. A single script can pull enabled campaigns, grab last‑week stats, build a spreadsheet, email it as a PDF, and then clean up the file—all without you lifting a finger.

Getting Started: Enable Google Ads Scripts

  1. Open your Google Ads account and navigate to Tools & SettingsScripts.
  2. Click the big blue + button to create a new script.
  3. Delete the placeholder code and paste the script provided below.
function main() {
  var spreadsheet = SpreadsheetApp.create("PPC Weekly Report");
  var sheet = spreadsheet.getActiveSheet();
  sheet.appendRow(["Date", "Campaign", "Impressions", "Clicks", "Cost", "Conversions", "Cost per Conv"]);
  
  var rows = AdsApp
    .campaigns()
    .withCondition("Status = ENABLED")
    .get();
  
  while (rows.hasNext()) {
    var campaign = rows.next();
    var stats = campaign.getStatsFor("LAST_WEEK");
    sheet.appendRow([
      stats.getDate(),
      campaign.getName(),
      stats.getImpressions(),
      stats.getClicks(),
      stats.getCost(),
      stats.getConversions(),
      stats.getCost() / stats.getConversions()
    ]);
  }
  
  MailApp.sendEmail({
    to: "[email protected]",
    subject: "Your Weekly PPC Report",
    body: "See the attached spreadsheet for last week’s performance.",
    attachments: [spreadsheet.getAs(MimeType.PDF)]
  });
  
  DriveApp.getFileById(spreadsheet.getId()).setTrashed(true);
}

Note: The script uses SpreadsheetApp, AdsApp, MailApp, and DriveApp—all native Google services, so no extra cost is incurred.

Running and Authorizing the Script

  • Click Save, then press Run to trigger the authorization flow.
  • Grant permission for the script to access your Ads account, email, and Drive.
  • Once authorized, set up a time‑driven trigger: click the clock icon → Add Trigger → choose main → event source Time‑drivenWeek timer, Monday at 8 am.

Your report will now generate and land in your inbox every Monday morning.

Customizing the Report: Add Metrics & Tweak Subject

  • To include cost‑per‑click, edit the appendRow line: add stats.getAverageCpc() after the conversions column.

  • For a more informative subject line, replace the static text with:

    subject: "Weekly PPC Report for " + Utilities.formatDate(new Date(), Session.getScriptTimeZone(), "MMM dd")
    
  • Feel free to add extra columns such as stats.getConversionValue() or stats.getCTR()—just append them to the array and update the header row accordingly.

Scheduling the Weekly Trigger (Recap)

A weekly timer ensures the script runs without manual intervention. Verify the trigger fires by checking Executions under the Scripts dashboard; you should see a successful run shortly after the scheduled time.

Reactions
Do you have any feedback or ideas on how we can improve this page?