function main() {
var campName="TestCamp";
var campaignIterator = AdsApp.campaigns()
// .withCondition('Status = "ENABLED"')
.withCondition('Name = "'+campName+'"')
.get();
Logger.log('Total campaigns found : ' +
campaignIterator.totalNumEntities());
while (campaignIterator.hasNext()) {
var campaign = campaignIterator.next();
var campaignName=campaign.getName();
var budget=campaign.getBudget().getAmount();
var bidType=campaign.getBiddingStrategyType();
var campaignType='Search only'
createCampaigns(campaignName,budget,bidType,campaignType);
}
}
function createCampaigns(campaignName,budget,bidType,campaignType) {
// See https://developers.google.com/adwords/scripts/docs/features/bulk-upload
// for the list of supported bulk upload templates and their column names.
var columns = [
'Campaign', 'Budget', 'Bid Strategy type', 'Campaign type'
];
var upload = AdWordsApp.bulkUploads().newCsvUpload(
columns, {moneyInMicros: false});
// AdWords identify existing campaigns using its name. To create a new
// campaign, use a campaign name that doesn't exist in your account.
upload.append({
'Campaign': campaignName+' Clone',
'Budget': budget,
'Bid Strategy type': 'cpc',
'Campaign type': campaignType
});
// Use upload.apply() to make changes without previewing.
upload.apply();
}
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/10e3a379-a7cc-4fcd-9a46-655dc531e5d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hello,There isn't an issue with the script you have posted above -- is there a particular question you have regarding bulk uploads?Regards,MattGoogle Ads Scripts Team=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
https://ads-developers.googleblog.com/search/label/google_ads_scripts
https://developers.google.com/google-ads/scripts/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
var bidType=campaign.getBiddingStrategyType();
var campaignType='Search only'
upload.append({
'Campaign': campaignName+' Clone',
'Budget': budget,
'Bid Strategy type': 'cpc',
'Campaign type': campaignType
});
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/bc92d39e-4833-487e-9da9-704c8a10a56a%40googlegroups.com.
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/d3a2804e-9a48-4edb-bda7-b9fe75dc0716%40googlegroups.com.
Ok.
Can you tell me how do I get following values with the script.
HeadlinePart1
HeadlinePart2
Description
Path1
Path2
FinalUrl
Closes things I could find are:
SourceAd.getHeadline()
SourceAd.getDescription1()
SourceAd.getDisplayUrl()
I will try following example to copy ExpendedTextAd.
DestAdGroup.newAd().expandedTextAdBuilder()
.withHeadlinePart1('First headline of ad')
.withHeadlinePart2('Second headline of ad')
.withDescription('Ad description')
.withPath1('path1')
.withPath2('path2')
.withFinalUrl('http://www.example.com')
.build();
Can you tell me how do I get following values with the script.
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/0389d6c4-6e1a-43cd-9146-2691b29ce8bf%40googlegroups.com.
--
-- 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-scripts+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-scripts/6f5dd0db-f062-466b-a455-bea088e39608%40googlegroups.com.