Skip to content

Commit c065eb4

Browse files
committed
Merge remote-tracking branch 'origin/master' into docs/invoke-workflows-for-external-user
2 parents 32f098e + efea192 commit c065eb4

File tree

485 files changed

+16476
-789
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

485 files changed

+16476
-789
lines changed

components/activecampaign/actions/create-or-update-contact/create-or-update-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "activecampaign-create-or-update-contact",
66
name: "Create or Update Contact",
77
description: "Creates a new contact or updates an existing contact. [See the documentation](https://developers.activecampaign.com/reference/sync-a-contacts-data).",
8-
version: "0.2.5",
8+
version: "0.2.6",
99
type: "action",
1010
async run({ $ }) {
1111
const response =

components/activecampaign/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@pipedream/activecampaign",
3-
"version": "0.4.4",
3+
"version": "0.4.5",
44
"description": "Pipedream Activecampaing Components",
55
"main": "activecampaign.app.mjs",
66
"keywords": [
@@ -14,7 +14,7 @@
1414
"access": "public"
1515
},
1616
"dependencies": {
17-
"@pipedream/platform": "^1.6.0",
17+
"@pipedream/platform": "^3.0.3",
1818
"inflection": "^3.0.0"
1919
}
2020
}
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import { defineApp } from "@pipedream/types";
2-
3-
export default defineApp({
1+
export default {
42
type: "app",
5-
app: "cloze",
3+
app: "adp",
64
propDefinitions: {},
75
methods: {
86
// this.$auth contains connected account data
97
authKeys() {
108
console.log(Object.keys(this.$auth));
119
},
1210
},
13-
});
11+
};

components/apollo_io/actions/add-contacts-to-sequence/add-contacts-to-sequence.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Add Contacts to Sequence",
66
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)",
77
type: "action",
8-
version: "0.0.2",
8+
version: "0.0.3",
99
props: {
1010
app,
1111
sequenceId: {

components/apollo_io/actions/create-account/create-account.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Create Account",
66
description: "Creates a new account in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-an-account)",
77
type: "action",
8-
version: "0.0.2",
8+
version: "0.0.3",
99
props: {
1010
app,
1111
name: {

components/apollo_io/actions/create-contact/create-contact.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Create Contact",
66
description: "Creates a new contact in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-a-contact)",
77
type: "action",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
props: {
1010
app,
1111
email: {

components/apollo_io/actions/create-opportunity/create-opportunity.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Create Opportunity",
66
description: "Creates a new opportunity in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#create-opportunity)",
77
type: "action",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
props: {
1010
app,
1111
ownerId: {
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
import app from "../../apollo_io.app.mjs";
2+
import utils from "../../common/utils.mjs";
3+
4+
export default {
5+
key: "apollo_io-create-update-contact",
6+
name: "Create Or Update Contact",
7+
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)",
8+
type: "action",
9+
version: "0.0.1",
10+
props: {
11+
app,
12+
email: {
13+
propDefinition: [
14+
app,
15+
"email",
16+
],
17+
},
18+
firstName: {
19+
propDefinition: [
20+
app,
21+
"firstName",
22+
],
23+
},
24+
lastName: {
25+
propDefinition: [
26+
app,
27+
"lastName",
28+
],
29+
},
30+
title: {
31+
propDefinition: [
32+
app,
33+
"title",
34+
],
35+
},
36+
accountId: {
37+
propDefinition: [
38+
app,
39+
"accountId",
40+
],
41+
optional: true,
42+
},
43+
websiteUrl: {
44+
propDefinition: [
45+
app,
46+
"websiteUrl",
47+
],
48+
},
49+
labelNames: {
50+
propDefinition: [
51+
app,
52+
"labelNames",
53+
],
54+
},
55+
contactStageId: {
56+
propDefinition: [
57+
app,
58+
"contactStageId",
59+
],
60+
optional: true,
61+
},
62+
address: {
63+
propDefinition: [
64+
app,
65+
"address",
66+
],
67+
},
68+
phone: {
69+
propDefinition: [
70+
app,
71+
"phone",
72+
],
73+
},
74+
},
75+
async run({ $: step }) {
76+
let contact = {};
77+
let action = "created";
78+
let data = utils.cleanObject({
79+
email: this.email,
80+
first_name: this.firstName,
81+
last_name: this.lastName,
82+
title: this.title,
83+
account_id: this.accountId,
84+
website_url: this.websiteUrl,
85+
label_names: this.labelNames,
86+
contact_stage_id: this.contactStageId,
87+
present_raw_address: this.address,
88+
direct_phone: this.phone,
89+
});
90+
91+
const { contacts } = await this.app.listContacts({
92+
params: {
93+
q_keywords: this.email,
94+
},
95+
});
96+
97+
if (contacts.length) {
98+
action = "updated";
99+
contact = contacts[0];
100+
101+
await this.app.updateContact({
102+
step,
103+
contactId: contact.id,
104+
data: {
105+
...contact,
106+
...data,
107+
},
108+
});
109+
} else {
110+
const response = await this.app.createContact({
111+
step,
112+
data,
113+
});
114+
contact = response.contact;
115+
}
116+
117+
step.export("$summary", `Successfully ${action} contact with ID ${contact.id}`);
118+
119+
return contact;
120+
},
121+
};

components/apollo_io/actions/get-opportunity/get-opportunity.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "Get Opportunity",
66
description: "Gets a specific opportunity in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#view-opportunity)",
77
type: "action",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
props: {
1010
app,
1111
opportunityId: {

components/apollo_io/actions/people-enrichment/people-enrichment.mjs

Lines changed: 90 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
name: "People Enrichment",
66
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)",
77
type: "action",
8-
version: "0.0.3",
8+
version: "0.0.5",
99
props: {
1010
app,
1111
firstName: {
@@ -20,20 +20,93 @@ export default {
2020
description: "The person's last name",
2121
optional: true,
2222
},
23+
name: {
24+
type: "string",
25+
label: "Name",
26+
description: "The full name of the person",
27+
optional: true,
28+
},
2329
email: {
2430
type: "string",
2531
label: "Email",
2632
description: "The person's email",
2733
optional: true,
2834
},
35+
hashedEmail: {
36+
type: "string",
37+
label: "Hashed Email",
38+
description: "The hashed email of the person. The email should adhere to either the MD5 or SHA-256 hash format. Example: `8d935115b9ff4489f2d1f9249503cadf` (MD5) or `97817c0c49994eb500ad0a5e7e2d8aed51977b26424d508f66e4e8887746a152` (SHA-256)",
39+
optional: true,
40+
},
2941
organizationName: {
3042
type: "string",
3143
label: "Organization Name",
3244
description: "The person's company name",
3345
optional: true,
3446
},
47+
domain: {
48+
type: "string",
49+
label: "Domain",
50+
description: "The domain name for the person's employer. This can be the current employer or a previous employer. Do not include `www.`, the `@` symbol, or similar. Example: `apollo.io` or `microsoft.com`",
51+
optional: true,
52+
},
53+
personId: {
54+
type: "string",
55+
label: "Person ID",
56+
description: "The Apollo ID for the person",
57+
optional: true,
58+
async options({ page }) {
59+
const { people } = await this.peopleSearch({
60+
params: {
61+
page: page + 1,
62+
},
63+
});
64+
return people?.map(({
65+
id: value, name: label,
66+
}) => ({
67+
value,
68+
label,
69+
})) || [];
70+
},
71+
},
72+
linkedinUrl: {
73+
type: "string",
74+
label: "LinkedIn URL",
75+
description: "The URL for the person's LinkedIn profile",
76+
optional: true,
77+
},
78+
revealPersonalEmails: {
79+
type: "boolean",
80+
label: "Reveal Personal Emails",
81+
description: "Set to `true` if you want to enrich the person's data with personal emails",
82+
optional: true,
83+
},
84+
revealPhoneNumber: {
85+
type: "boolean",
86+
label: "Reveal Phone Number",
87+
description: "Set to `true` if you want to enrich the person's data with all available phone numbers, including mobile phone numbers",
88+
optional: true,
89+
reloadProps: true,
90+
},
91+
},
92+
async additionalProps() {
93+
const props = {};
94+
if (this.revealPhoneNumber) {
95+
props.webhookUrl = {
96+
type: "string",
97+
label: "Webhook URL",
98+
description: "Enter the webhook URL that specifies where Apollo should send a JSON response that includes the phone number you requested. Required if \"Reveal Phone Number\" is set to `true`",
99+
};
100+
}
101+
return props;
35102
},
36103
methods: {
104+
peopleSearch(args = {}) {
105+
return this.app.post({
106+
path: "/people/search",
107+
...args,
108+
});
109+
},
37110
peopleEnrichment(args = {}) {
38111
return this.app.post({
39112
path: "/people/match",
@@ -46,17 +119,33 @@ export default {
46119
peopleEnrichment,
47120
firstName,
48121
lastName,
122+
name,
49123
email,
124+
hashedEmail,
50125
organizationName,
126+
domain,
127+
personId,
128+
linkedinUrl,
129+
revealPersonalEmails,
130+
revealPhoneNumber,
131+
webhookUrl,
51132
} = this;
52133

53134
const response = await peopleEnrichment({
54135
step,
55136
data: {
56137
first_name: firstName,
57138
last_name: lastName,
139+
name,
58140
email,
141+
hashed_email: hashedEmail,
59142
organization_name: organizationName,
143+
domain,
144+
id: personId,
145+
linkedin_url: linkedinUrl,
146+
reveal_personal_emails: revealPersonalEmails,
147+
reveal_phone_number: revealPhoneNumber,
148+
webhook_url: webhookUrl,
60149
},
61150
});
62151

0 commit comments

Comments
 (0)