Apply Image Asset to Campaign/Ad Group

200 views
Skip to first unread message

AJ Arshem

unread,
Apr 17, 2023, 1:48:58 PM4/17/23
to Google Ads Scripts Forum
There is documentation here on creating a new image asset using the imageassetbuilder, however I can find no documentation on how to actually apply said asset to a campaign or ad group.  There does not seem to be any functionality available to actually use my image assets within a campaign programmatically, just the ability to select them from the ui and add them manually.  We have a high-turn inventory of vehicles so I want to associate images of our in-stock units with the proper ad groups dynamically.  Is there any way to do this with Ads scripts?

Google Ads Scripts Forum

unread,
Apr 18, 2023, 3:34:48 AM4/18/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/_3c8p0S-LQo) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
Apr 18, 2023, 4:00:52 AM4/18/23
to Google Ads Scripts Forum

Hi,


Thank you for reaching out to the Google Ads Scripts Team. Please excuse us for only getting back now as your message failed to be routed to our support queue.


I can recommend for you to select the campaign(s) you'd like to apply an image asset to, and then making use of the builder you've referenced once you've iterated through your campaign(s). Kindly check the below relevant links in order to do this:

Can you please try it on your end and let us know how it goes?

Best regards, Google Ads Scripts Team

AJ Arshem

unread,
Apr 19, 2023, 9:41:40 AM4/19/23
to Google Ads Scripts Forum
Thank you. Unfortunately, with a campaign selected, there is no method available to apply an image asset to that campaign.  I just tested with selecting the campaign with the campaign selector and then running the image asset builder.  The image asset was created, but there is no association with the campaign.  

Here is some simple example code to attempt to apply an image to all campaigns.  

  var campaigns = AdsApp.campaigns().get()
  while(campaigns.hasNext()){
    var campaign = campaigns.next()
    var imageUrl = "http://dealerslink.s3.amazonaws.com/vehicles/5349/M230047-63fea4d0f1df4.jpg";
    var imageBlob = UrlFetchApp.fetch(imageUrl).getBlob();
    var assetOperation = AdsApp.adAssets().newImageAssetBuilder()
      .withName("name")
      .withData(imageBlob)
      .build();
    var imageAsset = assetOperation.getResult();
  }

This gets the campaign and then builds the image asset.  However, the campaign variable has no method for applying the image asset (the imageAsset variable created as a result of the asset operation).  

Google Ads Scripts Forum

unread,
Apr 20, 2023, 4:33:58 AM4/20/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/_3c8p0S-LQo) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum

unread,
Apr 20, 2023, 6:08:04 AM4/20/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/_3c8p0S-LQo) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
Apr 20, 2023, 8:55:34 AM4/20/23
to adwords...@googlegroups.com

Hi,

 

Thanks for confirming. Before we may raise this to our team for further investigation, would you be so kind as to provide your Google Ads account ID or CID as well as the name of the affected script?

 

Looking forward to hearing from you.

 

Best regards,

 

Google Logo Google Ads Scripts Team


ref:_00D1U1174p._5004Q2koUCc:ref

Visie Tubban

unread,
Apr 20, 2023, 3:02:31 PM4/20/23
to Google Ads Scripts Forum
I will get that item asap thanks

--
-- You received this message because you are subscribed to the Google Groups AdWords Scripts Forum group. Please do not reply to this email. To post to this group or unsubscribe please visit https://developers.google.com/adwords/scripts/community.
---
You received this message because you are subscribed to the Google Groups "Google Ads Scripts Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-scrip...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/d53cde29-706e-4379-864d-3b49ceaa436fn%40googlegroups.com.

Google Ads Scripts Forum

unread,
Apr 21, 2023, 6:06:35 AM4/21/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/_3c8p0S-LQo) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
Apr 21, 2023, 6:45:11 AM4/21/23
to adwords...@googlegroups.com

Hi Visie,

 

Could you please confirm if you are encountering an issue with your script as well as if it is related to the issue that was observed in this thread? If yes, kindly elaborate and provide your Google Ads account ID or CID as well as the name of the script in the account so our team is able to further investigate.

 

If it is a different issue, kindly create a new thread, elaborate on the issue you've encountered and provide the requested details above for better tracking of the issues on our end.

AJ Arshem

unread,
Apr 21, 2023, 9:36:37 AM4/21/23
to Google Ads Scripts Forum
Account: 550-610-6045
Script name: Image Assets

AJ Arshem

unread,
Apr 21, 2023, 9:37:40 AM4/21/23
to Google Ads Scripts Forum
FYI: Script is a bit messy as I am using it for experimentation.

Google Ads Scripts Forum

unread,
Apr 24, 2023, 5:28:57 AM4/24/23
to Google Ads Scripts Forum
Reposting the last inquiry (https://groups.google.com/g/adwords-scripts/c/_3c8p0S-LQo) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads Scripts Team

Google Ads Scripts Forum Advisor

unread,
Apr 24, 2023, 5:40:54 AM4/24/23
to adwords...@googlegroups.com

Hi,

 

Thank you for providing the information our team requested.

 

Allow me to raise this to our internal team for further investigation. Rest assured that we'll get back once we receive relevant information. In the meantime, your patience is greatly appreciated.

Wesley

unread,
Mar 8, 2024, 8:05:05 AM3/8/24
to Google Ads Scripts Forum
Any news in this issue?

Op maandag 24 april 2023 om 11:40:54 UTC+2 schreef Google Ads Scripts Forum Advisor:

Google Ads Scripts Forum Advisor

unread,
Mar 8, 2024, 12:50:41 PM3/8/24
to adwords...@googlegroups.com
Hi,

Thank you for getting back to us.

Your concern is still under investigation and we have no updates at the moment. However, allow me to follow up on this with the rest of the team. Thank you for your patience.

 This message is in relation to case "ref:!00D1U01174p.!5004Q02koUCc:ref"

Thanks,

 
Google Logo Google Ads Scripts Team


VJ

unread,
Apr 24, 2024, 12:15:24 PM4/24/24
to Google Ads Scripts Forum
Hi Team,

Any updates on this? I am also facing same issue.

Reply all
Reply to author
Forward
0 new messages