Documentation>Your First Script
Perfect for Beginners

Your First Google Ads Script

Learn the fundamentals by creating your very first automation script. This simple example will introduce you to the basics of Google Ads automation.

5 minutes
Absolute Beginner
What You'll Learn
  • How to use the AdScriptly Script Builder
  • Basic Google Ads script structure
  • How to implement scripts in Google Ads
  • Safety best practices for automation
🎯 The Perfect First Script: Campaign Reporting
We'll start with a simple reporting script that doesn't make any changes to your campaigns - perfect for learning!

This script will generate a daily report showing your campaign performance. It's completely safe because it only reads data and sends you a summary.

Why This Script is Perfect for Beginners

  • Read-only: No risk of changing your campaigns
  • Simple: Easy to understand logic
  • Useful: Get daily performance insights via email
  • Foundation: Learn concepts for more advanced scripts
1
Open the Script Builder

Start by opening AdScriptly's Script Builder tool.

Open Script Builder

🔍 Look for: The "Campaign Performance Report" script template in the sidebar. This will be your first script!

2
Configure Your Report

Fill in the configuration form with these recommended settings for your first script:

📋 Recommended Settings:
Report Period: Last 7 days
Email Recipients: your-email@example.com
Report Name: Daily Campaign Summary
Include Metrics: Impressions, Clicks, Cost, CTR, CPC

💡 Pro Tip: Use your real email address so you can see the report in action!

3
Generate Your Script

Click the "Generate Script" button and watch the magic happen!

Your Generated Script Preview
// AdScriptly - Campaign Performance Report
// Generated: Wed Sep 17 2025

function main() {
  // Get all active campaigns
  const campaigns = AdsApp.campaigns()
    .withCondition('Status = ENABLED')
    .forDateRange('LAST_7_DAYS')
    .get();
    
  let report = 'Campaign Performance Report\n\n';
  
  while (campaigns.hasNext()) {
    const campaign = campaigns.next();
    const stats = campaign.getStatsFor('LAST_7_DAYS');
    
    report += campaign.getName() + ':\n';
    report += '  Impressions: ' + stats.getImpressions() + '\n';
    report += '  Clicks: ' + stats.getClicks() + '\n';
    report += '  Cost: €' + stats.getCost() + '\n\n';
  }
  
  // Send email report
  MailApp.sendEmail({
    to: 'your-email@example.com',
    subject: 'Daily Campaign Report',
    body: report
  });
  
  Logger.log('Report sent successfully!');
}

Understanding Your First Script

This script reads your campaign data and emails you a summary. It's completely safe and perfect for learning the basics!

🎉 Ready to Install?
Now that you understand your first script, let's install it in Google Ads!

Next: Install Your Script

Follow our detailed installation guide to add your script to Google Ads.

Installation Guide

Or: Learn More Advanced Scripts

Ready for automation scripts that make changes to your campaigns?

See Examples