@pipedream/google_ads 0.6.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.
Files changed (42) hide show
  1. package/actions/add-contact-to-list-by-email/add-contact-to-list-by-email.mjs +1 -1
  2. package/actions/create-ad-group-report/create-ad-group-report.mjs +1 -1
  3. package/actions/create-ad-report/create-ad-report.mjs +1 -1
  4. package/actions/create-campaign-report/create-campaign-report.mjs +1 -1
  5. package/actions/create-customer-list/create-customer-list.mjs +1 -1
  6. package/actions/create-customer-report/create-customer-report.mjs +1 -1
  7. package/actions/create-or-remove-campaign-criteria/create-or-remove-campaign-criteria.mjs +214 -0
  8. package/actions/create-or-remove-campaign-shared-set/create-or-remove-campaign-shared-set.mjs +155 -0
  9. package/actions/create-or-remove-shared-criteria/create-or-remove-shared-criteria.mjs +180 -0
  10. package/actions/create-or-update-ad-group/create-or-update-ad-group.mjs +315 -0
  11. package/actions/create-or-update-ad-group-ad/create-or-update-ad-group-ad.mjs +203 -0
  12. package/actions/create-or-update-bidding-strategy/create-or-update-bidding-strategy.mjs +180 -0
  13. package/actions/create-or-update-campaign/create-or-update-campaign.mjs +243 -0
  14. package/actions/create-or-update-campaign-budget/create-or-update-campaign-budget.mjs +212 -0
  15. package/actions/create-or-update-keywords/create-or-update-keywords.mjs +275 -0
  16. package/actions/create-or-update-shared-sets/create-or-update-shared-sets.mjs +180 -0
  17. package/actions/create-report/create-report.mjs +123 -121
  18. package/actions/create-responsive-search-ad/create-responsive-search-ad.mjs +202 -0
  19. package/actions/generate-keyword-ideas/generate-keyword-ideas.mjs +1 -1
  20. package/actions/get-keyword-quality-scores/get-keyword-quality-scores.mjs +107 -0
  21. package/actions/list-account-id-options/list-account-id-options.mjs +1 -1
  22. package/actions/list-ad-group-ads/list-ad-group-ads.mjs +55 -0
  23. package/actions/list-ad-group-criteria/list-ad-group-criteria.mjs +55 -0
  24. package/actions/list-ad-groups/list-ad-groups.mjs +55 -0
  25. package/actions/list-bidding-strategies/list-bidding-strategies.mjs +55 -0
  26. package/actions/list-campaign-budgets/list-campaign-budgets.mjs +55 -0
  27. package/actions/list-campaign-criteria/list-campaign-criteria.mjs +55 -0
  28. package/actions/list-campaign-shared-sets/list-campaign-shared-sets.mjs +55 -0
  29. package/actions/list-campaigns/list-campaigns.mjs +55 -0
  30. package/actions/list-customer-clients/list-customer-clients.mjs +43 -0
  31. package/actions/list-keywords/list-keywords.mjs +55 -0
  32. package/actions/list-shared-criteria/list-shared-criteria.mjs +55 -0
  33. package/actions/list-shared-sets/list-shared-sets.mjs +55 -0
  34. package/actions/send-offline-conversion/send-offline-conversion.mjs +1 -1
  35. package/actions/update-campaign-ai-max-settings/update-campaign-ai-max-settings.mjs +167 -0
  36. package/common/constants.mjs +269 -0
  37. package/common/queries.mjs +4 -2
  38. package/common/utils.mjs +4 -0
  39. package/google_ads.app.mjs +591 -3
  40. package/package.json +1 -1
  41. package/sources/new-campaign-created/new-campaign-created.mjs +1 -1
  42. package/sources/new-lead-form-entry/new-lead-form-entry.mjs +1 -1
@@ -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
+ };
@@ -0,0 +1,43 @@
1
+ import googleAds from "../../google_ads.app.mjs";
2
+
3
+ export default {
4
+ key: "google_ads-list-customer-clients",
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",
8
+ annotations: {
9
+ destructiveHint: false,
10
+ openWorldHint: true,
11
+ readOnlyHint: true,
12
+ },
13
+ type: "action",
14
+ props: {
15
+ googleAds,
16
+ accountId: {
17
+ propDefinition: [
18
+ googleAds,
19
+ "accountId",
20
+ ],
21
+ },
22
+ query: {
23
+ type: "string",
24
+ label: "Query",
25
+ description: "Partial match text for the customer client descriptive name (e.g. `Acme` matches names containing \"Acme\"). Omit to return clients up to level 3.",
26
+ optional: true,
27
+ },
28
+ },
29
+ async run({ $ }) {
30
+ const response = await this.googleAds.listCustomerClients({
31
+ $,
32
+ accountId: this.accountId,
33
+ query: this.query,
34
+ });
35
+ const clients = Array.isArray(response)
36
+ ? response
37
+ : [];
38
+ $.export("$summary", `Successfully retrieved ${clients.length} customer client${clients.length === 1
39
+ ? ""
40
+ : "s"}`);
41
+ return clients;
42
+ },
43
+ };
@@ -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
+ };
@@ -0,0 +1,55 @@
1
+ import googleAds from "../../google_ads.app.mjs";
2
+
3
+ export default {
4
+ key: "google_ads-list-shared-sets",
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",
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.listAllSharedSets({
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 set${items.length === 1
50
+ ? ""
51
+ : "s"}.`,
52
+ );
53
+ return items;
54
+ },
55
+ };
@@ -8,7 +8,7 @@ export default {
8
8
  key: "google_ads-send-offline-conversion",
9
9
  name: "Send Offline Conversion",
10
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.8",
11
+ version: "0.0.10",
12
12
  annotations: {
13
13
  destructiveHint: false,
14
14
  openWorldHint: true,