Skip to content
  • Login / Register
  • Cart / $0.00
Buy Google Ads AccountsBuy Google Ads Accounts
  • Home
  • Google Ads Accounts
  • Google Ads Services
  • Blog
  • Contact Us
  • Helpdesk
PPC

A Google Ads script that uses GPT to write RSAs

Posted on April 13, 2023April 13, 2023 by Luke Smith

Managing campaigns efficiently requires using the right mix of tools.

Google Ads scripts have long been one of my favorites because they are completely customizable, scale reasonably well, and are included for free with any Google Ads account.

But there’s a new kid on the block – GPT. Could we combine generative AI with Google Ads scripts? 

That was the question I set out to answer, and the result is my first Google Ads script that uses GPT. 

It identifies opportunities for responsive search ads (RSAs) and uses GPT to help generate additional creative assets to capitalize on the opportunity.

You can grab the script code at the end of this article and try it on your own account. 

Why you should use the maximum number of assets for RSAs

Responsive search ads (RSAs) are a type of ad format on Google Ads that allow advertisers to create multiple headlines and descriptions for a single ad. 

Google then uses machine learning to test different combinations of headlines and descriptions to determine which ones perform best for different search queries and user contexts. 

This helps improve ad relevance and performance and allows advertisers to reach a wider audience. 

We found that RSAs of expanded text ads, and ads with more headline variants got more impressions per ad than those with fewer variants.

RSA impressions

Google allows advertisers to submit 15 versions of their headline and four versions of their description for every RSA. 

While that doesn’t mean that 43,000 variations of your assets will gather equal impressions, it’s always a good idea to feed the machine the maximum allowed number of assets so that its algorithms can show your ads to every interested user. 

But let’s face it, writing 15 great headlines and four long descriptions for every ad group in your account can get tedious. So it’s no surprise that many advertisers have gaps in their RSAs.

PPC management tools make it easy to find and fix this issue. But there are also ways to do this at scale without paying for additional software. 

Google Ads scripts are among the best free tools for bulk operations on ad accounts.

Last year, I wrote a with Matt Umbro, a long-time PPC thought leader and founder of #ppcchat on Twitter, to create a list of RSA ads with missing assets. 

But that was before ChatGPT raised public awareness of generative AI. So I decided to see if I could combine scripts and to improve an ad account.

Using the script

The script creates a spreadsheet with one RSA on every row and column for every headline and description asset. 

Optmyzr Google Ads - RSA script - spreadsheet screenshot

When an RSA is not using the maximum number of variations allowed by Google, it calls the GPT API to suggest additional ad text variations. 

These AI-generated suggestions are then placed in the spreadsheet to be bulk-uploaded back to Google to easily create the missing assets. 

To make it easy to see what was generated by GPT, those cells are automatically colored green.

Optmyzr Google Ads - GPT-generated RSA assets

In order to run this script, you will need to get an API key from and add the key to the script around line 39 where it says: 

var OPEN_AI_API_KEY = ''; // get your own API key at https://platform.openai.com/account/api-keys 

You can run the script in preview mode and look at the logs to get the URL of the new spreadsheet.

Script preview

Every time the script runs, it will use the OpenAI API. This costs money, so do not put this script on an automatic schedule. 

Download the script

Grab a copy of the code :

If you’re new to Google Ads Scripts, you can follow the to set it up for the first time.

Limitations of GPT for Google Ads

While GPT is great at writing, it’s notoriously bad at counting. I asked it why, and here’s what it explained:

“As an AI language model, GPT (Generative Pre-trained Transformer) is not inherently bad at math. However, it may not perform as well as specialized math models because it was not specifically trained on mathematical tasks. GPT is primarily designed for natural language processing, which involves understanding and generating human language. While it can perform basic mathematical operations, it may struggle with more complex calculations.”

For our PPC use case, you’ll have to double-check the length of assets it suggests to ensure they fit in Google’s character limits. 

When I asked GPT to add character counts next to each suggested headline, you can see it usually comes close but gets it wrong:

GPT character counts

Experience has taught me that GPT tends to follow patterns found in the prompt when completing a task. 

This means it’s more likely to write headlines of an appropriate length when working with a list of existing headlines like the ones you currently have in your account. 

Hence, the script will work best for completing RSAs that are missing just a few elements rather than most or all elements.

As you can see in the earlier screenshot, it also sometimes tends to give numbered lists of suggestions, and that doesn’t make for great ads when each of your headlines starts with ‘1),’ ‘2),’ etc.

I would not let GPT auto-generate ads because I’m hesitant to let some of Google’s suggestions go on automation. 

When I accidentally turned on for redundant keywords, it removed my brand keyword, Optmyzr, from my account.

Take GPT’s work as a suggestion to help speed up generating new ad variants.

Combining Google Ads with generative AI

GPT is one of the most exciting new technologies since the invention of the internet.

It’s mind-blowing how well it understands questions and how confident (though not always accurate) it is in its responses.

I am excited to have another fantastic tool in my PPC toolkit to help my ads outperform the competition.

I hope this script gives you a taste of what is possible when you combine Google Ads with generative AI like GPT.

Opinions expressed in this article are those of the guest author and not necessarily Search Engine Land. Staff authors are listed .

Related stories

New on Search Engine Land

@media screen and (min-width: 800px) {
#div-gpt-ad-3191538-7 {
display: flex !important;
justify-content: center !important;
align-items: center !important;
min-width:770px;
min-height:260px;
}
}
@media screen and (min-width: 1279px) {
#div-gpt-ad-3191538-7 {
display: flex !important;
justify-content: center !important;
align-items: center !important;
min-width:800px!important;
min-height:440px!important;
}
}

About the author

Frederick Vallaeys

Frederick (“Fred”) Vallaeys was one of the first 500 employees at Google where he spent 10 years building AdWords and teaching advertisers how to get the most out of it as the Google AdWords Evangelist.
Today he is the Cofounder of , an AdWords tool company focused on unique data insights, One-Click Optimizations™, advanced reporting to make account management more efficient, and Enhanced Scripts™ for AdWords. He stays up-to-speed with best practices through his work with , a search marketing agency focused on turning clicks into revenue. He is a frequent guest speaker at events where he inspires organizations to be more innovative and become better online marketers. His latest book, Digital Marketing in an AI World, was published in May 2019.

  • Author
  • Recent Posts
Luke Smith
Luke Smith
Luke Smith is a paid media consultant specializing in performance marketing such as SEM, paid social, video, and display. He has worked at a media agency in Sydney, Australia for over three years, running Facebook, AdWords, YouTube, Snapchat, and Twitter activity for large multi-national companies. With his expertise in lead generation, he has helped online coaches and entrepreneurs build their business online using targeted Facebook Ad strategies alongside a solid marketing funnel and provided services to large corporations including Estée Lauder, Clinique, McDonald's, Bobbi Brown, and Bacardi.
Luke Smith
Latest posts by Luke Smith (see all)
  • Google Search of today won’t exist in 10 years, says DeepMind co-founder - May 26, 2023
  • How to do B2B content marketing the right way (with 5 examples) - May 26, 2023
  • TikTok tests AI chatbot for search and discovery - May 25, 2023
Share this:
This entry was posted in PPC and tagged account suspended google ads, advertise on youtube, boost conversions google ads, buy google ads account, buy google ads accounts, Circumventing Systems, circumventing systems google ads, fix google ads account suspension, fix suspended account google ads, google ads accounts suspended, google ads extensions, google ads fix malicious software, google ads Unpaid Balance, google search ads, how to use google ads, Undesirable business practices, Unpaid Balance, video ads google ads, why google ads suspended account, youtube ads.
Luke Smith

Luke Smith is a paid media consultant specializing in performance marketing such as SEM, paid social, video, and display. He has worked at a media agency in Sydney, Australia for over three years, running Facebook, AdWords, YouTube, Snapchat, and Twitter activity for large multi-national companies. With his expertise in lead generation, he has helped online coaches and entrepreneurs build their business online using targeted Facebook Ad strategies alongside a solid marketing funnel and provided services to large corporations including Estée Lauder, Clinique, McDonald's, Bobbi Brown, and Bacardi.

7 proven methods to explain the value of SEO
Google: Video must be main content to appear as thumbnail
About

We provide Agency created Google Ads Accounts for all your advertising needs.

Advertise on Google Search, YouTube, Google Shopping, Google Play and more…

Latest Posts
  • 19
    May
    Nearly 30% of Instacart’s revenue is from advertising Comments Off on Nearly 30% of Instacart’s revenue is from advertising
  • 19
    May
    Google Search Generative Experience (SGE): What AI on the SERP Means for You Comments Off on Google Search Generative Experience (SGE): What AI on the SERP Means for You
  • 19
    May
    Keyword difficulty in SEO guide: Everything you need to know Comments Off on Keyword difficulty in SEO guide: Everything you need to know
  • 18
    May
    New Google AI tools will let advertisers generate media assets Comments Off on New Google AI tools will let advertisers generate media assets
  • 18
    May
    U.S. paid search spend forecast to hit $110 billion in 2023 Comments Off on U.S. paid search spend forecast to hit $110 billion in 2023
Categories
  • Google Ads Suspended (3)
  • Google Ads Tips (379)
  • Learn Google Ads (244)
  • PPC (881)
Archives
  • May 2023 (123)
  • April 2023 (131)
  • March 2023 (199)
  • February 2023 (183)
  • January 2023 (145)
  • December 2022 (132)
  • November 2022 (73)
  • October 2022 (9)
  • September 2022 (4)
  • August 2022 (2)
  • July 2022 (2)
  • June 2022 (1)
  • May 2022 (1)
  • April 2022 (7)
  • March 2022 (1)
  • February 2022 (1)
  • January 2022 (1)
  • December 2021 (2)
  • November 2021 (1)
Tag Cloud
account suspended google ads advertise on youtube boost conversions google ads buy google ads account buy google ads accounts Circumventing Systems circumventing systems fix google circumventing systems google ads Content Creation Content Strategy fix google ads account suspension fix suspended account google ads google ads accounts google ads accounts suspended google ads account suspended google ads Circumventing Systems google ads extensions google ads fix malicious software google ads suspended google ads suspended account google ads Suspicious Payment Activity google ads Suspicious Payment Methods google ads tips google ads tutorials google ads Unpaid Balance google ads youtube ads google search ads google shopping ads google suspended account how to use google ads Link Building Malicious or Unwanted Software Policy Marketing Basics maximize google shopping ads On-page SEO SEO Split Testing Suspicious Payment Methods Technical SEO Undesirable business practices Unpaid Balance video ads google ads What is SEO why google ads suspended account youtube ads youtube ads tutorials
About us

We provide Agency created Google Ads Accounts for all your advertising needs.

Advertise on Google Search, YouTube, Google Shopping, Google Play and more…

Hire our experts to manage your Google Ads campaigns for you!

We use our experience to apply proven ad management strategies, increasing conversions and decreasing the cost per conversion. Make the most of your Google Ad spend today!

Useful Links
  • Home
  • Buy Google Ads Accounts
  • Buy Google Ads Services
  • Blog
  • Helpdesk
  • Contact Us
Latest Posts
  • 19
    May
    Nearly 30% of Instacart’s revenue is from advertising Comments Off on Nearly 30% of Instacart’s revenue is from advertising
  • 19
    May
    Google Search Generative Experience (SGE): What AI on the SERP Means for You Comments Off on Google Search Generative Experience (SGE): What AI on the SERP Means for You
  • 19
    May
    Keyword difficulty in SEO guide: Everything you need to know Comments Off on Keyword difficulty in SEO guide: Everything you need to know
  • 18
    May
    New Google AI tools will let advertisers generate media assets Comments Off on New Google AI tools will let advertisers generate media assets
  • 18
    May
    U.S. paid search spend forecast to hit $110 billion in 2023 Comments Off on U.S. paid search spend forecast to hit $110 billion in 2023
Tags
buy google ads accounts (772) buy google ads account (772) Circumventing Systems (759) circumventing systems google ads (759) google ads fix malicious software (750) account suspended google ads (724) google search ads (715) boost conversions google ads (705) google ads extensions (651) Undesirable business practices (642) google ads accounts suspended (642) how to use google ads (642) google ads Unpaid Balance (642) youtube ads (642) Unpaid Balance (633) advertise on youtube (633) fix suspended account google ads (633) why google ads suspended account (633) video ads google ads (633) fix google ads account suspension (633)
  • Home
  • Buy Google Ads Accounts
  • Buy Google Ads Services
  • Blog
  • Helpdesk
  • Contact Us
Copyright 2023 © Buy google Ads Accounts
  • Home
  • Google Ads Accounts
  • Google Ads Services
  • Blog
  • Contact Us
  • Login
  • Helpdesk

Register

Don't have an account? Register one!

Register an Account

Login

Lost your password?