@pipedream/google_ads 0.7.0 → 0.8.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.
- package/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs +1 -1
- package/actions/create-ad-group-report/create-ad-group-report.mjs +1 -1
- package/actions/create-ad-report/create-ad-report.mjs +1 -1
- package/actions/create-campaign-report/create-campaign-report.mjs +1 -1
- package/actions/create-customer-list/create-customer-list.mjs +1 -1
- package/actions/create-customer-report/create-customer-report.mjs +1 -1
- package/actions/create-or-remove-campaign-criteria/create-or-remove-campaign-criteria.mjs +214 -0
- package/actions/create-or-remove-campaign-shared-set/create-or-remove-campaign-shared-set.mjs +155 -0
- package/actions/create-or-remove-shared-criteria/create-or-remove-shared-criteria.mjs +180 -0
- package/actions/create-or-update-ad-group/create-or-update-ad-group.mjs +315 -0
- package/actions/create-or-update-ad-group-ad/create-or-update-ad-group-ad.mjs +203 -0
- package/actions/create-or-update-bidding-strategy/create-or-update-bidding-strategy.mjs +180 -0
- package/actions/create-or-update-campaign/create-or-update-campaign.mjs +243 -0
- package/actions/create-or-update-campaign-budget/create-or-update-campaign-budget.mjs +212 -0
- package/actions/create-or-update-keywords/create-or-update-keywords.mjs +275 -0
- package/actions/create-or-update-shared-sets/create-or-update-shared-sets.mjs +180 -0
- package/actions/create-report/create-report.mjs +1 -1
- package/actions/create-responsive-search-ad/create-responsive-search-ad.mjs +202 -0
- package/actions/generate-keyword-ideas/generate-keyword-ideas.mjs +1 -1
- package/actions/get-keyword-quality-scores/get-keyword-quality-scores.mjs +107 -0
- package/actions/list-account-id-options/list-account-id-options.mjs +1 -1
- package/actions/list-ad-group-ads/list-ad-group-ads.mjs +55 -0
- package/actions/list-ad-group-criteria/list-ad-group-criteria.mjs +55 -0
- package/actions/list-ad-groups/list-ad-groups.mjs +55 -0
- package/actions/list-bidding-strategies/list-bidding-strategies.mjs +55 -0
- package/actions/list-campaign-budgets/list-campaign-budgets.mjs +55 -0
- package/actions/list-campaign-criteria/list-campaign-criteria.mjs +55 -0
- package/actions/list-campaign-shared-sets/list-campaign-shared-sets.mjs +55 -0
- package/actions/list-campaigns/list-campaigns.mjs +55 -0
- package/actions/list-customer-clients/list-customer-clients.mjs +1 -1
- package/actions/list-keywords/list-keywords.mjs +55 -0
- package/actions/list-shared-criteria/list-shared-criteria.mjs +55 -0
- package/actions/list-shared-sets/list-shared-sets.mjs +55 -0
- package/actions/send-offline-conversion/send-offline-conversion.mjs +1 -1
- package/actions/update-campaign-ai-max-settings/update-campaign-ai-max-settings.mjs +167 -0
- package/common/constants.mjs +269 -0
- package/common/queries.mjs +4 -2
- package/common/utils.mjs +4 -0
- package/google_ads.app.mjs +589 -1
- package/package.json +1 -1
- package/sources/new-campaign-created/new-campaign-created.mjs +1 -1
- package/sources/new-lead-form-entry/new-lead-form-entry.mjs +1 -1
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { ConfigurationError } from "@pipedream/platform";
|
|
2
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
3
|
+
import { DATE_RANGE_OPTIONS } from "../../common/constants.mjs";
|
|
4
|
+
|
|
5
|
+
const docLink =
|
|
6
|
+
"https://developers.google.com/google-ads/api/fields/v21/keyword_view";
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
key: "google_ads-get-keyword-quality-scores",
|
|
10
|
+
name: "Get Keyword Quality Scores",
|
|
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",
|
|
13
|
+
type: "action",
|
|
14
|
+
annotations: {
|
|
15
|
+
destructiveHint: false,
|
|
16
|
+
openWorldHint: true,
|
|
17
|
+
readOnlyHint: true,
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
googleAds,
|
|
21
|
+
accountId: {
|
|
22
|
+
propDefinition: [
|
|
23
|
+
googleAds,
|
|
24
|
+
"accountId",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
customerClientId: {
|
|
28
|
+
propDefinition: [
|
|
29
|
+
googleAds,
|
|
30
|
+
"customerClientId",
|
|
31
|
+
({ accountId }) => ({
|
|
32
|
+
accountId,
|
|
33
|
+
}),
|
|
34
|
+
],
|
|
35
|
+
optional: true,
|
|
36
|
+
},
|
|
37
|
+
campaignId: {
|
|
38
|
+
propDefinition: [
|
|
39
|
+
googleAds,
|
|
40
|
+
"campaignId",
|
|
41
|
+
({
|
|
42
|
+
accountId, customerClientId,
|
|
43
|
+
}) => ({
|
|
44
|
+
accountId,
|
|
45
|
+
customerClientId,
|
|
46
|
+
}),
|
|
47
|
+
],
|
|
48
|
+
description: "Filter results to a specific campaign. Use the **List Campaigns** action to discover options.",
|
|
49
|
+
optional: true,
|
|
50
|
+
},
|
|
51
|
+
adGroupId: {
|
|
52
|
+
propDefinition: [
|
|
53
|
+
googleAds,
|
|
54
|
+
"adGroupId",
|
|
55
|
+
({
|
|
56
|
+
accountId, customerClientId,
|
|
57
|
+
}) => ({
|
|
58
|
+
accountId,
|
|
59
|
+
customerClientId,
|
|
60
|
+
}),
|
|
61
|
+
],
|
|
62
|
+
description: "Filter results to a specific ad group. Use the **List Ad Groups** action to discover options.",
|
|
63
|
+
optional: true,
|
|
64
|
+
},
|
|
65
|
+
dateRange: {
|
|
66
|
+
type: "string",
|
|
67
|
+
label: "Date Range",
|
|
68
|
+
description: "The date range for historical quality score metrics (`metrics.historical_*`). Current quality scores (`quality_info.*`) are always the latest values regardless of this setting.",
|
|
69
|
+
options: DATE_RANGE_OPTIONS.filter(({ value }) => value !== "CUSTOM"),
|
|
70
|
+
default: "LAST_30_DAYS",
|
|
71
|
+
optional: true,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
async run({ $ }) {
|
|
75
|
+
const {
|
|
76
|
+
accountId,
|
|
77
|
+
customerClientId,
|
|
78
|
+
campaignId,
|
|
79
|
+
adGroupId,
|
|
80
|
+
dateRange,
|
|
81
|
+
} = this;
|
|
82
|
+
|
|
83
|
+
if (campaignId && adGroupId) {
|
|
84
|
+
throw new ConfigurationError(
|
|
85
|
+
"Specify either **Campaign** or **Ad Group** as a filter, not both.",
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const { results } = await this.googleAds.listKeywordQualityScores({
|
|
90
|
+
$,
|
|
91
|
+
accountId,
|
|
92
|
+
customerClientId,
|
|
93
|
+
campaignId,
|
|
94
|
+
adGroupId,
|
|
95
|
+
dateRange,
|
|
96
|
+
});
|
|
97
|
+
|
|
98
|
+
const items = results ?? [];
|
|
99
|
+
$.export(
|
|
100
|
+
"$summary",
|
|
101
|
+
`Successfully retrieved quality scores for ${items.length} keyword${items.length === 1
|
|
102
|
+
? ""
|
|
103
|
+
: "s"}.`,
|
|
104
|
+
);
|
|
105
|
+
return items;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
@@ -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.
|
|
7
|
+
version: "0.0.3",
|
|
8
8
|
type: "action",
|
|
9
9
|
annotations: {
|
|
10
10
|
destructiveHint: false,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-ad-group-ads",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter ads by name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllAdGroupAds({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const ads = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${ads.length} ad group ad${ads.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return ads;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-ad-group-criteria",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by ad group name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllAdGroupCriteria({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} ad group ${items.length === 1
|
|
50
|
+
? "criterion"
|
|
51
|
+
: "criteria"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-ad-groups",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter ad groups by name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllAdGroups({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const adGroups = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${adGroups.length} ad group${adGroups.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return adGroups;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-bidding-strategies",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by bidding strategy name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllBiddingStrategies({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} bidding strateg${items.length === 1
|
|
50
|
+
? "y"
|
|
51
|
+
: "ies"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-campaign-budgets",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by campaign budget name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllCampaignBudgets({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} campaign budget${items.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-campaign-criteria",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by campaign name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllCampaignCriteria({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} campaign ${items.length === 1
|
|
50
|
+
? "criterion"
|
|
51
|
+
: "criteria"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-campaign-shared-sets",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by campaign name or shared set name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listCampaignSharedSets({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} campaign shared set${items.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-campaigns",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter campaigns by name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllCampaigns({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const campaigns = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${campaigns.length} campaign${campaigns.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return campaigns;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -4,7 +4,7 @@ export default {
|
|
|
4
4
|
key: "google_ads-list-customer-clients",
|
|
5
5
|
name: "List Customer Clients",
|
|
6
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.
|
|
7
|
+
version: "0.0.2",
|
|
8
8
|
annotations: {
|
|
9
9
|
destructiveHint: false,
|
|
10
10
|
openWorldHint: true,
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-keywords",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter keywords by text (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllKeywords({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const keywords = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${keywords.length} keyword${keywords.length === 1
|
|
50
|
+
? ""
|
|
51
|
+
: "s"}.`,
|
|
52
|
+
);
|
|
53
|
+
return keywords;
|
|
54
|
+
},
|
|
55
|
+
};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import googleAds from "../../google_ads.app.mjs";
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
key: "google_ads-list-shared-criteria",
|
|
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",
|
|
8
|
+
type: "action",
|
|
9
|
+
annotations: {
|
|
10
|
+
destructiveHint: false,
|
|
11
|
+
openWorldHint: true,
|
|
12
|
+
readOnlyHint: true,
|
|
13
|
+
},
|
|
14
|
+
props: {
|
|
15
|
+
googleAds,
|
|
16
|
+
accountId: {
|
|
17
|
+
propDefinition: [
|
|
18
|
+
googleAds,
|
|
19
|
+
"accountId",
|
|
20
|
+
],
|
|
21
|
+
},
|
|
22
|
+
customerClientId: {
|
|
23
|
+
propDefinition: [
|
|
24
|
+
googleAds,
|
|
25
|
+
"customerClientId",
|
|
26
|
+
({ accountId }) => ({
|
|
27
|
+
accountId,
|
|
28
|
+
}),
|
|
29
|
+
],
|
|
30
|
+
optional: true,
|
|
31
|
+
},
|
|
32
|
+
query: {
|
|
33
|
+
type: "string",
|
|
34
|
+
label: "Query",
|
|
35
|
+
description: "Filter by shared set name (partial match).",
|
|
36
|
+
optional: true,
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
async run({ $ }) {
|
|
40
|
+
const { results } = await this.googleAds.listAllSharedCriteria({
|
|
41
|
+
$,
|
|
42
|
+
accountId: this.accountId,
|
|
43
|
+
customerClientId: this.customerClientId,
|
|
44
|
+
query: this.query,
|
|
45
|
+
});
|
|
46
|
+
const items = results ?? [];
|
|
47
|
+
$.export(
|
|
48
|
+
"$summary",
|
|
49
|
+
`Successfully retrieved ${items.length} shared ${items.length === 1
|
|
50
|
+
? "criterion"
|
|
51
|
+
: "criteria"}.`,
|
|
52
|
+
);
|
|
53
|
+
return items;
|
|
54
|
+
},
|
|
55
|
+
};
|