From df9ecb46f0f6bc091f3b8f8ce11f447b7dab8251 Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Mon, 3 Mar 2025 17:04:34 -0300 Subject: [PATCH 1/4] Added actions --- .../actions/update-contact/update-contact.mjs | 6 ++++-- components/apollo_io/apollo_io.app.mjs | 13 ++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/components/apollo_io/actions/update-contact/update-contact.mjs b/components/apollo_io/actions/update-contact/update-contact.mjs index 248c6b35d79e7..480d93a6644af 100644 --- a/components/apollo_io/actions/update-contact/update-contact.mjs +++ b/components/apollo_io/actions/update-contact/update-contact.mjs @@ -6,7 +6,7 @@ export default { name: "Update Contact", description: "Updates an existing contact in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-a-contact)", type: "action", - version: "0.0.4", + version: "0.0.{{ts}}", props: { app, contactId: { @@ -83,7 +83,9 @@ export default { title: this.title, account_id: this.accountId, website_url: this.websiteUrl, - label_names: this.labelNames, + label_names: typeof this.labelNames === "string" + ? JSON.parse(this.labelNames) + : this.labelNames, present_raw_address: this.address, direct_phone: this.phone, }), diff --git a/components/apollo_io/apollo_io.app.mjs b/components/apollo_io/apollo_io.app.mjs index d604819a9043a..a1add4a2264aa 100644 --- a/components/apollo_io/apollo_io.app.mjs +++ b/components/apollo_io/apollo_io.app.mjs @@ -173,8 +173,13 @@ export default { labelNames: { type: "string[]", label: "Label Names", - description: "A list of names to tag this newly created contact. If the name does not exist, Apollo will automatically create it", + description: "A list of names to tag this contact. You can select the labels from the list or create new ones using a custom expression, i.e., `[\"label1\", \"label2\"]`", optional: true, + async options() { + const response = await this.listLabels(); + console.log(response); + return response.map(({ name }) => name) || []; + }, }, address: { type: "string", @@ -384,6 +389,12 @@ export default { ...args, }); }, + listLabels(args = {}) { + return this.makeRequest({ + path: "/labels", + ...args, + }); + }, async *getResourcesStream({ resourceFn, resourceFnArgs, From 04d46f624bdd863150e702fe35129730afaad84b Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Mon, 10 Mar 2025 18:12:42 -0300 Subject: [PATCH 2/4] Added actions --- components/apollo_io/actions/update-contact/update-contact.mjs | 2 +- components/apollo_io/apollo_io.app.mjs | 1 - pnpm-lock.yaml | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/apollo_io/actions/update-contact/update-contact.mjs b/components/apollo_io/actions/update-contact/update-contact.mjs index 480d93a6644af..11afb44ea690c 100644 --- a/components/apollo_io/actions/update-contact/update-contact.mjs +++ b/components/apollo_io/actions/update-contact/update-contact.mjs @@ -6,7 +6,7 @@ export default { name: "Update Contact", description: "Updates an existing contact in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-a-contact)", type: "action", - version: "0.0.{{ts}}", + version: "0.0.5", props: { app, contactId: { diff --git a/components/apollo_io/apollo_io.app.mjs b/components/apollo_io/apollo_io.app.mjs index a1add4a2264aa..11c28ed6f88d1 100644 --- a/components/apollo_io/apollo_io.app.mjs +++ b/components/apollo_io/apollo_io.app.mjs @@ -177,7 +177,6 @@ export default { optional: true, async options() { const response = await this.listLabels(); - console.log(response); return response.map(({ name }) => name) || []; }, }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 11be3e5e04962..076d01be71ee8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2532,8 +2532,7 @@ importers: specifier: ^0.12.4 version: 0.12.5 - components/cloudflare_browser_rendering: - specifiers: {} + components/cloudflare_browser_rendering: {} components/cloudflare_r2: {} From b30b58dd4793f5b7729d9695b325892d2c8fa633 Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Mon, 10 Mar 2025 18:18:04 -0300 Subject: [PATCH 3/4] Added actions --- .../add-contacts-to-sequence/add-contacts-to-sequence.mjs | 2 +- components/apollo_io/actions/create-account/create-account.mjs | 2 +- components/apollo_io/actions/create-contact/create-contact.mjs | 2 +- .../apollo_io/actions/create-opportunity/create-opportunity.mjs | 2 +- .../actions/create-update-contact/create-update-contact.mjs | 2 +- .../apollo_io/actions/get-opportunity/get-opportunity.mjs | 2 +- .../apollo_io/actions/people-enrichment/people-enrichment.mjs | 2 +- .../apollo_io/actions/search-accounts/search-accounts.mjs | 2 +- .../apollo_io/actions/search-contacts/search-contacts.mjs | 2 +- .../apollo_io/actions/search-sequences/search-sequences.mjs | 2 +- .../actions/update-account-stage/update-account-stage.mjs | 2 +- components/apollo_io/actions/update-account/update-account.mjs | 2 +- .../actions/update-contact-stage/update-contact-stage.mjs | 2 +- .../apollo_io/actions/update-opportunity/update-opportunity.mjs | 2 +- .../apollo_io/sources/account-created/account-created.mjs | 2 +- .../apollo_io/sources/account-updated/account-updated.mjs | 2 +- .../apollo_io/sources/contact-created/contact-created.mjs | 2 +- .../apollo_io/sources/contact-updated/contact-updated.mjs | 2 +- 18 files changed, 18 insertions(+), 18 deletions(-) diff --git a/components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs b/components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs index 84b7a910efe7d..7f5613c6ef3e4 100644 --- a/components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs +++ b/components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs @@ -5,7 +5,7 @@ export default { name: "Add Contacts to Sequence", description: "Adds one or more contacts to a sequence in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#add-contacts-to-sequence)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, sequenceId: { diff --git a/components/apollo_io/actions/create-account/create-account.mjs b/components/apollo_io/actions/create-account/create-account.mjs index 144709ebe3600..0c9eba9bfa2ae 100644 --- a/components/apollo_io/actions/create-account/create-account.mjs +++ b/components/apollo_io/actions/create-account/create-account.mjs @@ -5,7 +5,7 @@ export default { name: "Create Account", description: "Creates a new account in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-an-account)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, name: { diff --git a/components/apollo_io/actions/create-contact/create-contact.mjs b/components/apollo_io/actions/create-contact/create-contact.mjs index a5467c95557f8..356410c48bc7b 100644 --- a/components/apollo_io/actions/create-contact/create-contact.mjs +++ b/components/apollo_io/actions/create-contact/create-contact.mjs @@ -5,7 +5,7 @@ export default { name: "Create Contact", description: "Creates a new contact in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-a-contact)", type: "action", - version: "0.0.4", + version: "0.0.5", props: { app, email: { diff --git a/components/apollo_io/actions/create-opportunity/create-opportunity.mjs b/components/apollo_io/actions/create-opportunity/create-opportunity.mjs index 25c414cdb8df3..5ff109e987959 100644 --- a/components/apollo_io/actions/create-opportunity/create-opportunity.mjs +++ b/components/apollo_io/actions/create-opportunity/create-opportunity.mjs @@ -5,7 +5,7 @@ export default { name: "Create Opportunity", description: "Creates a new opportunity in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-opportunity)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, ownerId: { diff --git a/components/apollo_io/actions/create-update-contact/create-update-contact.mjs b/components/apollo_io/actions/create-update-contact/create-update-contact.mjs index 3c23feed64a0e..a5d9bf85d5c4c 100644 --- a/components/apollo_io/actions/create-update-contact/create-update-contact.mjs +++ b/components/apollo_io/actions/create-update-contact/create-update-contact.mjs @@ -6,7 +6,7 @@ export default { name: "Create Or Update Contact", description: "Creates or updates a specific contact. If the contact email already exists, it's updated. Otherwise, a new contact is created. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-a-contact)", type: "action", - version: "0.0.1", + version: "0.0.2", props: { app, email: { diff --git a/components/apollo_io/actions/get-opportunity/get-opportunity.mjs b/components/apollo_io/actions/get-opportunity/get-opportunity.mjs index 3ecb429ed1480..b6d3bf775c730 100644 --- a/components/apollo_io/actions/get-opportunity/get-opportunity.mjs +++ b/components/apollo_io/actions/get-opportunity/get-opportunity.mjs @@ -5,7 +5,7 @@ export default { name: "Get Opportunity", description: "Gets a specific opportunity in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#view-opportunity)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, opportunityId: { diff --git a/components/apollo_io/actions/people-enrichment/people-enrichment.mjs b/components/apollo_io/actions/people-enrichment/people-enrichment.mjs index 9b2d671bcd12b..ea84e180d8c18 100644 --- a/components/apollo_io/actions/people-enrichment/people-enrichment.mjs +++ b/components/apollo_io/actions/people-enrichment/people-enrichment.mjs @@ -5,7 +5,7 @@ export default { name: "People Enrichment", description: "Enriches a person's information, the more information you pass in, the more likely we can find a match. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#people-enrichment)", type: "action", - version: "0.0.5", + version: "0.0.6", props: { app, firstName: { diff --git a/components/apollo_io/actions/search-accounts/search-accounts.mjs b/components/apollo_io/actions/search-accounts/search-accounts.mjs index 3ab3e7ec188cd..e72b5d0d40a91 100644 --- a/components/apollo_io/actions/search-accounts/search-accounts.mjs +++ b/components/apollo_io/actions/search-accounts/search-accounts.mjs @@ -6,7 +6,7 @@ export default { name: "Search For Accounts", description: "Search for accounts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-accounts)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, search: { diff --git a/components/apollo_io/actions/search-contacts/search-contacts.mjs b/components/apollo_io/actions/search-contacts/search-contacts.mjs index 64cdf64094156..cbdd2b66ee148 100644 --- a/components/apollo_io/actions/search-contacts/search-contacts.mjs +++ b/components/apollo_io/actions/search-contacts/search-contacts.mjs @@ -6,7 +6,7 @@ export default { name: "Search For Contacts", description: "Search for contacts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, search: { diff --git a/components/apollo_io/actions/search-sequences/search-sequences.mjs b/components/apollo_io/actions/search-sequences/search-sequences.mjs index efe150e808fa6..a7b48517efc55 100644 --- a/components/apollo_io/actions/search-sequences/search-sequences.mjs +++ b/components/apollo_io/actions/search-sequences/search-sequences.mjs @@ -6,7 +6,7 @@ export default { name: "Search For Sequences", description: "Search for sequences in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-sequences)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, search: { diff --git a/components/apollo_io/actions/update-account-stage/update-account-stage.mjs b/components/apollo_io/actions/update-account-stage/update-account-stage.mjs index 41ddcb560a606..09cdc892e373f 100644 --- a/components/apollo_io/actions/update-account-stage/update-account-stage.mjs +++ b/components/apollo_io/actions/update-account-stage/update-account-stage.mjs @@ -5,7 +5,7 @@ export default { name: "Update Account Stage", description: "Updates the stage of one or more accounts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-account-stage)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, accountIds: { diff --git a/components/apollo_io/actions/update-account/update-account.mjs b/components/apollo_io/actions/update-account/update-account.mjs index cc4e7f46de2f2..ab1aedb714780 100644 --- a/components/apollo_io/actions/update-account/update-account.mjs +++ b/components/apollo_io/actions/update-account/update-account.mjs @@ -6,7 +6,7 @@ export default { name: "Update Account", description: "Updates an existing account in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-an-account)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, accountId: { diff --git a/components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs b/components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs index 3ece01c6e686d..6a44bcd1af1cc 100644 --- a/components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs +++ b/components/apollo_io/actions/update-contact-stage/update-contact-stage.mjs @@ -5,7 +5,7 @@ export default { name: "Update Contact Stage", description: "Updates the stage of one or more contacts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-contact-stage)", type: "action", - version: "0.0.3", + version: "0.0.4", props: { app, contactIds: { diff --git a/components/apollo_io/actions/update-opportunity/update-opportunity.mjs b/components/apollo_io/actions/update-opportunity/update-opportunity.mjs index 28ef5aabc6fa2..aa3d293866fba 100644 --- a/components/apollo_io/actions/update-opportunity/update-opportunity.mjs +++ b/components/apollo_io/actions/update-opportunity/update-opportunity.mjs @@ -5,7 +5,7 @@ export default { name: "Update Opportunity", description: "Updates a new opportunity in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#update-opportunity)", type: "action", - version: "0.0.2", + version: "0.0.3", props: { app, opportunityId: { diff --git a/components/apollo_io/sources/account-created/account-created.mjs b/components/apollo_io/sources/account-created/account-created.mjs index ad39bc2776f78..03dd3f2d348e4 100644 --- a/components/apollo_io/sources/account-created/account-created.mjs +++ b/components/apollo_io/sources/account-created/account-created.mjs @@ -6,7 +6,7 @@ export default { name: "Account Created", description: "Triggers when an account is created. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-accounts)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/apollo_io/sources/account-updated/account-updated.mjs b/components/apollo_io/sources/account-updated/account-updated.mjs index f2b1afe8d22a5..94b6dc2358260 100644 --- a/components/apollo_io/sources/account-updated/account-updated.mjs +++ b/components/apollo_io/sources/account-updated/account-updated.mjs @@ -7,7 +7,7 @@ export default { name: "Account Updated", description: "Triggers when an account is updated. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)", type: "source", - version: "0.0.3", + version: "0.0.4", dedupe: "unique", props: { ...common.props, diff --git a/components/apollo_io/sources/contact-created/contact-created.mjs b/components/apollo_io/sources/contact-created/contact-created.mjs index a8978e5c9a349..98a37fe7c2321 100644 --- a/components/apollo_io/sources/contact-created/contact-created.mjs +++ b/components/apollo_io/sources/contact-created/contact-created.mjs @@ -6,7 +6,7 @@ export default { name: "Contact Created", description: "Triggers when a contact is created. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)", type: "source", - version: "0.0.5", + version: "0.0.6", dedupe: "unique", methods: { ...common.methods, diff --git a/components/apollo_io/sources/contact-updated/contact-updated.mjs b/components/apollo_io/sources/contact-updated/contact-updated.mjs index 7b4b7619dee54..a41c2a6a29ed6 100644 --- a/components/apollo_io/sources/contact-updated/contact-updated.mjs +++ b/components/apollo_io/sources/contact-updated/contact-updated.mjs @@ -6,7 +6,7 @@ export default { name: "Contact Updated", description: "Triggers when a contact is updated. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)", type: "source", - version: "0.0.5", + version: "0.0.6", dedupe: "unique", methods: { ...common.methods, From 3d540ea84e9798f3b626a8ceaf19cbd9ba2eac54 Mon Sep 17 00:00:00 2001 From: Lucas Caresia Date: Mon, 10 Mar 2025 19:27:52 -0300 Subject: [PATCH 4/4] Added actions --- components/apollo_io/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/apollo_io/package.json b/components/apollo_io/package.json index ccd044bfd04f2..d4791dce31af3 100644 --- a/components/apollo_io/package.json +++ b/components/apollo_io/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/apollo_io", - "version": "0.4.1", + "version": "0.5.0", "description": "Pipedream Apollo.io Components", "main": "apollo_io.app.mjs", "keywords": [