Skip to content

Commit 70ca4d6

Browse files
authored
Merge branch 'master' into issue-14085
2 parents 079bc48 + 70c3710 commit 70ca4d6

File tree

126 files changed

+4478
-113
lines changed

Some content is hidden

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

126 files changed

+4478
-113
lines changed

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: 1 addition & 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.4",
99
props: {
1010
app,
1111
firstName: {

components/apollo_io/actions/search-accounts/search-accounts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Search For Accounts",
77
description: "Search for accounts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-accounts)",
88
type: "action",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
props: {
1111
app,
1212
search: {

components/apollo_io/actions/search-contacts/search-contacts.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Search For Contacts",
77
description: "Search for contacts in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-contacts)",
88
type: "action",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
props: {
1111
app,
1212
search: {

components/apollo_io/actions/search-sequences/search-sequences.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
name: "Search For Sequences",
77
description: "Search for sequences in Apollo.io. [See the documentation](https://apolloio.github.io/apollo-api-docs/?shell#search-for-sequences)",
88
type: "action",
9-
version: "0.0.1",
9+
version: "0.0.2",
1010
props: {
1111
app,
1212
search: {

0 commit comments

Comments
 (0)