googleads / google-ads-dotnet

This project hosts the .NET client library for the Google Ads API.

Home Page:https://developers.google.com/google-ads/api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Troubles to create PMAX campaign using .Net library

merisahakyan opened this issue · comments

I'm trying to create PMAX campaign using .Net library based on documentation provided here.
So campaign creation and assets creations passed successfully, but on asset group creation I'm getting bunch of errors about "headline,marketing image, square image...(and a lot more) assets are not enough". I tried to use both types of Asset Group creation : with MutateOperation and AssetGroupOperation, and both were failed.
So, how can I create asset group, having already created corresponding required assets using .Net library?
I followed up all the steps in documentation, but it seems non-working solution. Can you help with this? It's not possible to create empty asset group, and also not possible to create asset group with manually given resourceName, and also not possible to link already created asset to assetGroup because in first stage of creation it's not possible to have asset group resource name. So, nothing is possible.

Here is code example which I'm using to create asset group (already having created assets)

`var googleAdService = googleAdsClient.GetService(Services.V13.GoogleAdsService);

                var operations = new List<MutateOperation>();
 operations.Add(new MutateOperation()
                {
                    AssetGroupOperation = new AssetGroupOperation()
                    {
                        Create = new AssetGroup()
                        {
                            Name = $"CF-AdPro-{Guid.NewGuid()}",
                            Campaign = "customers/8951792349/campaigns/20213486313",
                            FinalUrls = { listingUrl },
                            FinalMobileUrls = { listingUrl },
                            Status = AssetGroupStatus.Enabled
                        }
                    }
                });


                var response = await googleAdService.MutateAsync(customerId, operations);`

wrong type of issue