Google Ads Automation
Ullekh Tandon 0 Comments

Script to Download Your Google Ads Report in Google Sheets with a Script

Managing and analyzing data from Google Ads can be a time-consuming task. However, with the right tools and scripts, you can automate this process and save valuable time. In this article, we will explore how to use a script to download your Google Ads report directly into a Google Sheet, providing you with an efficient and convenient solution.

Why Use a Script?

Downloading Google Ads reports manually and importing them into spreadsheets can be tedious and prone to human errors. By using a script, you can automate the process and ensure accurate and timely data retrieval. Additionally, with the report directly available in a Google Sheet, you can easily perform further analysis, create custom charts, or share the data with your team.

How to Set Up the Script

Open Google Sheets and create a new sheet where you want your Google Ads report to appear.

In the toolbar, click on “Extensions” and select “Apps Script.” This will open the Google Apps Script editor.

Delete the default code and paste the following script:

function main() {
var accountID = ‘YOUR_ACCOUNT_ID’;
var reportName = ‘YOUR_REPORT_NAME’;

var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet();

var report =
‘SELECT CampaignName, Impressions, Clicks, Cost FROM CAMPAIGN_PERFORMANCE_REPORT’,
{ apiVersion: ‘v201809’ }

sheet.getRange(1, 1, report.length, report[0].length).setValues(report);
Replace ‘YOUR_ACCOUNT_ID’ with your actual Google Ads account ID.

Replace ‘YOUR_REPORT_NAME’ with the desired name for your report.

Save the script by clicking File > Save.

To run the script and fetch the Google Ads report, click on the play button ▶️ in the toolbar or use the shortcut Ctrl + Enter / Cmd + Enter.

After running the script, you will find your Google Ads report populated in the specified sheet.


Using a script to download your Google Ads report directly in Google Sheets can greatly simplify your data management and analysis. By automating the process, you save time, reduce the risk of errors, and have the data readily available for further manipulation or sharing.

Remember to customize the script with your account ID and desired report name before running it. With this automated solution, you can focus on analyzing the data and making informed decisions for your Google Ads campaigns.


Google Sheets
Google Apps Script
Google Ads Scripting