@pipedream/google_ads 0.8.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +4 -4
  2. package/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs +1 -1
  3. package/actions/common/bidding.mjs +196 -0
  4. package/actions/common/conversion-upload.mjs +131 -0
  5. package/actions/common/props.mjs +1 -1
  6. package/actions/create-ad-group-report/create-ad-group-report.mjs +2 -2
  7. package/actions/create-ad-report/create-ad-report.mjs +2 -2
  8. package/actions/create-campaign-report/create-campaign-report.mjs +2 -2
  9. package/actions/create-customer-list/common-constants.mjs +10 -10
  10. package/actions/create-customer-list/create-customer-list.mjs +3 -3
  11. package/actions/create-customer-report/create-customer-report.mjs +2 -2
  12. package/actions/create-or-remove-campaign-criteria/create-or-remove-campaign-criteria.mjs +2 -2
  13. package/actions/create-or-remove-campaign-shared-set/create-or-remove-campaign-shared-set.mjs +2 -2
  14. package/actions/create-or-remove-shared-criteria/create-or-remove-shared-criteria.mjs +2 -2
  15. package/actions/create-or-update-ad-group/create-or-update-ad-group.mjs +2 -2
  16. package/actions/create-or-update-ad-group-ad/create-or-update-ad-group-ad.mjs +2 -2
  17. package/actions/create-or-update-bidding-strategy/create-or-update-bidding-strategy.mjs +7 -2
  18. package/actions/create-or-update-campaign/create-or-update-campaign.mjs +71 -14
  19. package/actions/create-or-update-campaign-budget/create-or-update-campaign-budget.mjs +2 -2
  20. package/actions/create-or-update-keywords/create-or-update-keywords.mjs +2 -2
  21. package/actions/create-or-update-shared-sets/create-or-update-shared-sets.mjs +2 -2
  22. package/actions/create-report/create-report.mjs +5 -7
  23. package/actions/create-responsive-search-ad/create-responsive-search-ad.mjs +1 -1
  24. package/actions/generate-keyword-ideas/generate-keyword-ideas.mjs +3 -3
  25. package/actions/get-keyword-quality-scores/get-keyword-quality-scores.mjs +2 -2
  26. package/actions/list-account-id-options/list-account-id-options.mjs +1 -1
  27. package/actions/list-ad-group-ads/list-ad-group-ads.mjs +2 -2
  28. package/actions/list-ad-group-criteria/list-ad-group-criteria.mjs +2 -2
  29. package/actions/list-ad-groups/list-ad-groups.mjs +2 -2
  30. package/actions/list-bidding-strategies/list-bidding-strategies.mjs +2 -2
  31. package/actions/list-campaign-budgets/list-campaign-budgets.mjs +2 -2
  32. package/actions/list-campaign-criteria/list-campaign-criteria.mjs +2 -2
  33. package/actions/list-campaign-shared-sets/list-campaign-shared-sets.mjs +2 -2
  34. package/actions/list-campaigns/list-campaigns.mjs +2 -2
  35. package/actions/list-customer-clients/list-customer-clients.mjs +2 -2
  36. package/actions/list-keywords/list-keywords.mjs +2 -2
  37. package/actions/list-shared-criteria/list-shared-criteria.mjs +2 -2
  38. package/actions/list-shared-sets/list-shared-sets.mjs +2 -2
  39. package/actions/send-offline-conversion/send-offline-conversion.mjs +4 -4
  40. package/actions/update-campaign-ai-max-settings/update-campaign-ai-max-settings.mjs +1 -1
  41. package/actions/upload-call-conversion/upload-call-conversion.mjs +65 -0
  42. package/actions/upload-click-conversion/upload-click-conversion.mjs +121 -0
  43. package/common/common-report.mjs +5 -7
  44. package/common/constants.mjs +108 -8
  45. package/common/resources/ad.mjs +25 -70
  46. package/common/resources/adGroup.mjs +2 -3
  47. package/common/resources/campaign.mjs +7 -10
  48. package/common/resources/customer.mjs +3 -4
  49. package/google_ads.app.mjs +79 -29
  50. package/package.json +1 -1
  51. package/sources/new-campaign-created/new-campaign-created.mjs +3 -3
  52. package/sources/new-lead-form-entry/new-lead-form-entry.mjs +3 -3
@@ -2,20 +2,25 @@ import { ConfigurationError } from "@pipedream/platform";
2
2
  import googleAds from "../../google_ads.app.mjs";
3
3
  import {
4
4
  ADVERTISING_CHANNEL_TYPES,
5
+ CAMPAIGN_BIDDING_STRATEGY_TYPES,
5
6
  CAMPAIGN_OPERATION_TYPES,
6
7
  CAMPAIGN_STATUSES,
8
+ EU_POLITICAL_ADVERTISING_STATUSES,
7
9
  } from "../../common/constants.mjs";
8
10
  import { parseObject } from "../../common/utils.mjs";
9
11
  import { getAdditionalFields } from "../common/props.mjs";
12
+ import {
13
+ buildBiddingScheme, CAMPAIGN_BIDDING_SCHEMES, getSchemeProps,
14
+ } from "../common/bidding.mjs";
10
15
 
11
16
  const docLink =
12
- "https://developers.google.com/google-ads/api/reference/rpc/v21/CampaignService/MutateCampaigns?transport=rest";
17
+ "https://developers.google.com/google-ads/api/reference/rpc/v25/CampaignService/MutateCampaigns?transport=rest";
13
18
 
14
19
  export default {
15
20
  key: "google_ads-create-or-update-campaign",
16
21
  name: "Create or Update Campaign",
17
22
  description: `Creates or updates a campaign. [See the documentation](${docLink})`,
18
- version: "0.0.1",
23
+ version: "1.0.0",
19
24
  type: "action",
20
25
  annotations: {
21
26
  destructiveHint: true,
@@ -96,18 +101,18 @@ export default {
96
101
  options: CAMPAIGN_STATUSES,
97
102
  optional: true,
98
103
  },
99
- startDate: {
104
+ startDateTime: {
100
105
  type: "string",
101
- label: "Start Date",
106
+ label: "Start Date Time",
102
107
  description:
103
- "The date when the campaign starts serving ads, formatted as `YYYY-MM-DD`.",
108
+ "When the campaign starts serving ads, in the account's time zone, formatted as `YYYY-MM-DD HH:MM:SS` (use `00:00:00` for daily granularity).",
104
109
  optional: true,
105
110
  },
106
- endDate: {
111
+ endDateTime: {
107
112
  type: "string",
108
- label: "End Date",
113
+ label: "End Date Time",
109
114
  description:
110
- "The last day the campaign serves ads, formatted as `YYYY-MM-DD`. Leave blank for no end date.",
115
+ "The last day and time the campaign serves ads, in the account's time zone, formatted as `YYYY-MM-DD HH:MM:SS` (use `23:59:59` for daily granularity). Leave blank to run indefinitely.",
111
116
  optional: true,
112
117
  },
113
118
  trackingUrlTemplate: {
@@ -116,6 +121,36 @@ export default {
116
121
  description: "The URL template for constructing a tracking URL.",
117
122
  optional: true,
118
123
  },
124
+ containsEuPoliticalAdvertising: {
125
+ type: "string",
126
+ label: "Contains EU Political Advertising",
127
+ description: "Declares whether the campaign contains EU political advertising. Google requires this on **create**.",
128
+ options: EU_POLITICAL_ADVERTISING_STATUSES,
129
+ optional: true,
130
+ },
131
+ biddingStrategy: {
132
+ propDefinition: [
133
+ googleAds,
134
+ "biddingStrategyId",
135
+ ({
136
+ accountId, customerClientId,
137
+ }) => ({
138
+ accountId,
139
+ customerClientId,
140
+ }),
141
+ ],
142
+ label: "Portfolio Bidding Strategy",
143
+ description: "An existing portfolio bidding strategy to attach. Leave blank to use a standard (campaign-level) strategy instead.",
144
+ optional: true,
145
+ },
146
+ biddingStrategyType: {
147
+ type: "string",
148
+ label: "Standard Bidding Strategy",
149
+ description: "The campaign-level bidding strategy. Google requires either this or a **Portfolio Bidding Strategy** on **create**.",
150
+ options: CAMPAIGN_BIDDING_STRATEGY_TYPES,
151
+ optional: true,
152
+ },
153
+ ...getSchemeProps(CAMPAIGN_BIDDING_SCHEMES),
119
154
  additionalFields: getAdditionalFields(docLink),
120
155
  },
121
156
  async run({ $ }) {
@@ -130,9 +165,12 @@ export default {
130
165
  advertisingChannelType,
131
166
  campaignBudget,
132
167
  status,
133
- startDate,
134
- endDate,
168
+ startDateTime,
169
+ endDateTime,
135
170
  trackingUrlTemplate,
171
+ containsEuPoliticalAdvertising,
172
+ biddingStrategy,
173
+ biddingStrategyType,
136
174
  additionalFields,
137
175
  } = this;
138
176
 
@@ -148,7 +186,19 @@ export default {
148
186
  );
149
187
  }
150
188
 
189
+ // `campaign_bidding_strategy` is a union field.
190
+ if (biddingStrategy && biddingStrategyType) {
191
+ throw new ConfigurationError(
192
+ "Set either **Portfolio Bidding Strategy** or **Standard Bidding Strategy**, not both.",
193
+ );
194
+ }
195
+
151
196
  if (operationType === "create") {
197
+ if (!containsEuPoliticalAdvertising) {
198
+ throw new ConfigurationError(
199
+ "**Contains EU Political Advertising** is required for Create operations.",
200
+ );
201
+ }
152
202
  if (!name) {
153
203
  throw new ConfigurationError(
154
204
  "**Name** is required for Create operations.",
@@ -194,15 +244,22 @@ export default {
194
244
  ...(status && {
195
245
  status,
196
246
  }),
197
- ...(startDate && {
198
- startDate,
247
+ ...(startDateTime && {
248
+ startDateTime,
199
249
  }),
200
- ...(endDate && {
201
- endDate,
250
+ ...(endDateTime && {
251
+ endDateTime,
202
252
  }),
203
253
  ...(trackingUrlTemplate && {
204
254
  trackingUrlTemplate,
205
255
  }),
256
+ ...(containsEuPoliticalAdvertising && {
257
+ containsEuPoliticalAdvertising,
258
+ }),
259
+ ...(biddingStrategy && {
260
+ biddingStrategy: `customers/${customerId}/biddingStrategies/${biddingStrategy}`,
261
+ }),
262
+ ...buildBiddingScheme(CAMPAIGN_BIDDING_SCHEMES, biddingStrategyType, this),
206
263
  ...parseObject(additionalFields),
207
264
  };
208
265
 
@@ -9,13 +9,13 @@ import { parseObject } from "../../common/utils.mjs";
9
9
  import { getAdditionalFields } from "../common/props.mjs";
10
10
 
11
11
  const docLink =
12
- "https://developers.google.com/google-ads/api/reference/rpc/v21/CampaignBudgetService/MutateCampaignBudgets?transport=rest";
12
+ "https://developers.google.com/google-ads/api/reference/rpc/v25/CampaignBudgetService/MutateCampaignBudgets?transport=rest";
13
13
 
14
14
  export default {
15
15
  key: "google_ads-create-or-update-campaign-budget",
16
16
  name: "Create or Update Campaign Budget",
17
17
  description: `Creates, updates, or removes a campaign budget. [See the documentation](${docLink})`,
18
- version: "0.0.1",
18
+ version: "0.0.2",
19
19
  type: "action",
20
20
  annotations: {
21
21
  destructiveHint: true,
@@ -9,13 +9,13 @@ import { parseObject } from "../../common/utils.mjs";
9
9
  import { getAdditionalFields } from "../common/props.mjs";
10
10
 
11
11
  const docLink =
12
- "https://developers.google.com/google-ads/api/reference/rpc/v21/AdGroupCriterionService/MutateAdGroupCriteria?transport=rest";
12
+ "https://developers.google.com/google-ads/api/reference/rpc/v25/AdGroupCriterionService/MutateAdGroupCriteria?transport=rest";
13
13
 
14
14
  export default {
15
15
  key: "google_ads-create-or-update-keywords",
16
16
  name: "Create, Update, or Remove Keywords",
17
17
  description: `Creates, updates, or removes keyword criteria for an ad group. [See the documentation](${docLink})`,
18
- version: "0.0.1",
18
+ version: "0.0.2",
19
19
  type: "action",
20
20
  annotations: {
21
21
  destructiveHint: true,
@@ -8,13 +8,13 @@ import { parseObject } from "../../common/utils.mjs";
8
8
  import { getAdditionalFields } from "../common/props.mjs";
9
9
 
10
10
  const docLink =
11
- "https://developers.google.com/google-ads/api/reference/rpc/v21/SharedSetService/MutateSharedSets?transport=rest";
11
+ "https://developers.google.com/google-ads/api/reference/rpc/v25/SharedSetService/MutateSharedSets?transport=rest";
12
12
 
13
13
  export default {
14
14
  key: "google_ads-create-or-update-shared-sets",
15
15
  name: "Create or Update Shared Sets",
16
16
  description: `Creates or updates shared sets (reusable lists of negative keywords or placements). [See the documentation](${docLink})`,
17
- version: "0.0.1",
17
+ version: "0.0.2",
18
18
  type: "action",
19
19
  annotations: {
20
20
  destructiveHint: true,
@@ -19,8 +19,8 @@ export default {
19
19
  ...common,
20
20
  key: "google_ads-create-report",
21
21
  name: "Create Report",
22
- description: "Generates a report from your Google Ads data. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
23
- version: "0.2.1",
22
+ description: "Generates a report from your Google Ads data. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
23
+ version: "0.3.0",
24
24
  annotations: {
25
25
  destructiveHint: false,
26
26
  openWorldHint: true,
@@ -99,7 +99,7 @@ export default {
99
99
  segments: {
100
100
  type: "string[]",
101
101
  label: "Segments",
102
- description: "Segment field names to include (e.g. `[\"date\"]` or `[\"segments.date\"]`). See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v21/Segments).",
102
+ description: "Segment field names to include (e.g. `[\"date\"]` or `[\"segments.date\"]`). See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v25/Segments).",
103
103
  options() {
104
104
  const resource = RESOURCES.find((r) => r.resourceOption.value === this.resource);
105
105
  if (!resource) throw new ConfigurationError("Select one of the available resources.");
@@ -113,7 +113,7 @@ export default {
113
113
  metrics: {
114
114
  type: "string[]",
115
115
  label: "Metrics",
116
- description: "Metric field names to include (e.g. `[\"impressions\", \"clicks\"]` or `[\"metrics.impressions\", \"metrics.clicks\"]`). See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v21/Metrics).",
116
+ description: "Metric field names to include (e.g. `[\"impressions\", \"clicks\"]` or `[\"metrics.impressions\", \"metrics.clicks\"]`). See the documentation [here](https://developers.google.com/google-ads/api/reference/rpc/v25/Metrics).",
117
117
  options() {
118
118
  const resource = RESOURCES.find((r) => r.resourceOption.value === this.resource);
119
119
  if (!resource) throw new ConfigurationError("Select one of the available resources.");
@@ -256,9 +256,7 @@ export default {
256
256
  $,
257
257
  accountId: this.accountId,
258
258
  customerClientId: this.customerClientId,
259
- data: {
260
- query,
261
- },
259
+ query,
262
260
  })) ?? [];
263
261
 
264
262
  const { length } = results;
@@ -29,7 +29,7 @@ export default {
29
29
  key: "google_ads-create-responsive-search-ad",
30
30
  name: "Create Responsive Search Ad",
31
31
  description: `Creates a Responsive Search Ad (RSA) in an ad group. RSA copy (headlines, descriptions) cannot be edited in-place after creation — to change ad copy, remove the existing ad and create a new one. URL fields (\`finalUrls\`, \`trackingUrlTemplate\`, etc.) can be updated in-place via the **Create or Update Ad Group Ad** action. [See the documentation](${docLink})`,
32
- version: "0.0.1",
32
+ version: "0.0.2",
33
33
  type: "action",
34
34
  annotations: {
35
35
  destructiveHint: false,
@@ -3,13 +3,13 @@ import { getAdditionalFields } from "../common/props.mjs";
3
3
  import {
4
4
  parseObject, parseStringObject,
5
5
  } from "../../common/utils.mjs";
6
- const docLink = "https://developers.google.com/google-ads/api/reference/rpc/v22/KeywordPlanIdeaService/GenerateKeywordIdeas?transport=rest";
6
+ const docLink = "https://developers.google.com/google-ads/api/reference/rpc/v25/KeywordPlanIdeaService/GenerateKeywordIdeas?transport=rest";
7
7
 
8
8
  export default {
9
9
  key: "google_ads-generate-keyword-ideas",
10
10
  name: "Generate Keyword Ideas",
11
11
  description: `Generate keyword ideas using the Google Ads API. [See the documentation](${docLink})`,
12
- version: "0.0.4",
12
+ version: "0.1.0",
13
13
  type: "action",
14
14
  annotations: {
15
15
  destructiveHint: false,
@@ -32,7 +32,7 @@ export default {
32
32
  accountId,
33
33
  }),
34
34
  ],
35
- optional: false,
35
+ optional: true,
36
36
  },
37
37
  additionalFields: {
38
38
  ...getAdditionalFields(docLink),
@@ -3,13 +3,13 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  import { DATE_RANGE_OPTIONS } from "../../common/constants.mjs";
4
4
 
5
5
  const docLink =
6
- "https://developers.google.com/google-ads/api/fields/v21/keyword_view";
6
+ "https://developers.google.com/google-ads/api/fields/v25/keyword_view";
7
7
 
8
8
  export default {
9
9
  key: "google_ads-get-keyword-quality-scores",
10
10
  name: "Get Keyword Quality Scores",
11
11
  description: `Retrieves current and historical quality score data (Quality Score, Ad Relevance, Landing Page Experience, Expected CTR) for keywords in a customer account. Current scores reflect the latest evaluation; historical scores are averaged over the selected date range. [See the documentation](${docLink})`,
12
- version: "0.0.1",
12
+ version: "0.0.2",
13
13
  type: "action",
14
14
  annotations: {
15
15
  destructiveHint: false,
@@ -4,7 +4,7 @@ export default {
4
4
  key: "google_ads-list-account-id-options",
5
5
  name: "List Account ID Options",
6
6
  description: "Retrieves available options for the Account ID field.",
7
- version: "0.0.3",
7
+ version: "0.0.4",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-ad-group-ads",
5
5
  name: "List Ad Group Ads",
6
- description: "List ads within ad groups for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List ads within ad groups for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-ad-group-criteria",
5
5
  name: "List Ad Group Criteria",
6
- description: "List criteria (keywords, placements, audiences, etc.) for ad groups in a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List criteria (keywords, placements, audiences, etc.) for ad groups in a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-ad-groups",
5
5
  name: "List Ad Groups",
6
- description: "List ad groups for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List ad groups for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-bidding-strategies",
5
5
  name: "List Bidding Strategies",
6
- description: "List portfolio bidding strategies for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List portfolio bidding strategies for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-campaign-budgets",
5
5
  name: "List Campaign Budgets",
6
- description: "List campaign budgets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List campaign budgets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-campaign-criteria",
5
5
  name: "List Campaign Criteria",
6
- description: "List criteria (keywords, placements, etc.) for campaigns in a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List criteria (keywords, placements, etc.) for campaigns in a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-campaign-shared-sets",
5
5
  name: "List Campaign Shared Sets",
6
- description: "List shared sets attached to campaigns for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List shared sets attached to campaigns for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-campaigns",
5
5
  name: "List Campaigns",
6
- description: "List campaigns for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List campaigns for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "1.0.0",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-customer-clients",
5
5
  name: "List Customer Clients",
6
- description: "List all customer clients for a given account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.2",
6
+ description: "List all customer clients for a given account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.3",
8
8
  annotations: {
9
9
  destructiveHint: false,
10
10
  openWorldHint: true,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-keywords",
5
5
  name: "List Keywords",
6
- description: "List keyword criteria for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List keyword criteria for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-shared-criteria",
5
5
  name: "List Shared Criteria",
6
- description: "List criteria within shared sets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List criteria within shared sets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -3,8 +3,8 @@ import googleAds from "../../google_ads.app.mjs";
3
3
  export default {
4
4
  key: "google_ads-list-shared-sets",
5
5
  name: "List Shared Sets",
6
- description: "List shared sets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/GoogleAdsService/Search?transport=rest)",
7
- version: "0.0.1",
6
+ description: "List shared sets for a customer account. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/GoogleAdsService/Search?transport=rest)",
7
+ version: "0.0.2",
8
8
  type: "action",
9
9
  annotations: {
10
10
  destructiveHint: false,
@@ -7,8 +7,8 @@ export default {
7
7
  ...common,
8
8
  key: "google_ads-send-offline-conversion",
9
9
  name: "Send Offline Conversion",
10
- description: "Send an event to Google Ads to track offline conversions. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionAction)",
11
- version: "0.0.10",
10
+ description: "Create a Google Ads conversion action. To record conversions against an upload-type action, use **Upload Click Conversion** or **Upload Call Conversion**. [See the documentation](https://developers.google.com/google-ads/api/reference/rpc/v25/ConversionAction)",
11
+ version: "0.0.11",
12
12
  annotations: {
13
13
  destructiveHint: false,
14
14
  openWorldHint: true,
@@ -25,10 +25,10 @@ export default {
25
25
  type: {
26
26
  type: "string",
27
27
  label: "Type",
28
- description: "[The type](https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionActionTypeEnum.ConversionActionType) of the conversion action.",
28
+ description: "[The type](https://developers.google.com/google-ads/api/reference/rpc/v25/ConversionActionTypeEnum.ConversionActionType) of the conversion action.",
29
29
  options: CONVERSION_TYPE_OPTIONS,
30
30
  },
31
- additionalFields: getAdditionalFields("https://developers.google.com/google-ads/api/reference/rpc/v21/ConversionAction"),
31
+ additionalFields: getAdditionalFields("https://developers.google.com/google-ads/api/reference/rpc/v25/ConversionAction"),
32
32
  },
33
33
  async run({ $ }) {
34
34
  const {
@@ -11,7 +11,7 @@ export default {
11
11
  key: "google_ads-update-campaign-ai-max-settings",
12
12
  name: "Update Campaign AI Max Settings",
13
13
  description: `Enables or configures AI Max for Search settings on a campaign. Only supported on Search campaigns. Toggling AI Max while simultaneously editing brand or text customization settings on the same campaign may fail — update them separately. Ad group-level search term matching is controlled via the **Create or Update Ad Group** action. [See the documentation](${docLink})`,
14
- version: "0.0.1",
14
+ version: "0.0.2",
15
15
  type: "action",
16
16
  annotations: {
17
17
  destructiveHint: false,
@@ -0,0 +1,65 @@
1
+ import {
2
+ buildBaseConversion, commonProps, DATE_TIME_HINT, DOC_LINK, uploadConversion,
3
+ } from "../common/conversion-upload.mjs";
4
+
5
+ const CALL_DOC_LINK = `${DOC_LINK}/UploadCallConversions?transport=rest`;
6
+
7
+ export default {
8
+ key: "google_ads-upload-call-conversion",
9
+ name: "Upload Call Conversion",
10
+ description: `Uploads an offline conversion attributed to a phone call. [See the documentation](${CALL_DOC_LINK})`,
11
+ version: "0.0.1",
12
+ type: "action",
13
+ annotations: {
14
+ destructiveHint: false,
15
+ openWorldHint: true,
16
+ readOnlyHint: false,
17
+ },
18
+ props: {
19
+ ...commonProps,
20
+ callerId: {
21
+ type: "string",
22
+ label: "Caller ID",
23
+ description: "The phone number the call was placed from, in E.164 format with a leading `+` (e.g. `+16502531234`).",
24
+ },
25
+ callStartDateTime: {
26
+ type: "string",
27
+ label: "Call Start Date Time",
28
+ description: `When the call occurred. Must be before the conversion. ${DATE_TIME_HINT}`,
29
+ },
30
+ },
31
+ async run({ $ }) {
32
+ const {
33
+ googleAds,
34
+ accountId,
35
+ customerClientId,
36
+ callerId,
37
+ callStartDateTime,
38
+ validateOnly,
39
+ } = this;
40
+
41
+ const conversion = {
42
+ ...buildBaseConversion(this),
43
+ callerId,
44
+ callStartDateTime,
45
+ };
46
+
47
+ const response = await uploadConversion({
48
+ $,
49
+ googleAds,
50
+ method: "uploadCallConversions",
51
+ accountId,
52
+ customerClientId,
53
+ conversion,
54
+ validateOnly,
55
+ });
56
+
57
+ $.export(
58
+ "$summary",
59
+ validateOnly
60
+ ? "Call conversion payload validated successfully (not recorded)."
61
+ : "Successfully uploaded call conversion.",
62
+ );
63
+ return response;
64
+ },
65
+ };