Skip to content

Commit 9f30f8b

Browse files
authored
Pipedrive - New Actions (#17387)
* new actions * pnpm-lock.yaml * pnpm-lock.yaml * versions * fix descriptions
1 parent 5886ddd commit 9f30f8b

File tree

22 files changed

+128
-18
lines changed

22 files changed

+128
-18
lines changed

components/pipedrive/actions/add-activity/add-activity.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
key: "pipedrive-add-activity",
88
name: "Add Activity",
99
description: "Adds a new activity. Includes `more_activities_scheduled_in_context` property in response's `additional_data` which indicates whether there are more undone activities scheduled with the same deal, person or organization (depending on the supplied data). See the Pipedrive API docs for Activities [here](https://developers.pipedrive.com/docs/api/v1/#!/Activities). For info on [adding an activity in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Activities#addActivity)",
10-
version: "0.1.12",
10+
version: "0.1.13",
1111
type: "action",
1212
props: {
1313
pipedriveApp,

components/pipedrive/actions/add-deal/add-deal.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-add-deal",
66
name: "Add Deal",
77
description: "Adds a new deal. See the Pipedrive API docs for Deals [here](https://developers.pipedrive.com/docs/api/v1/Deals#addDeal)",
8-
version: "0.1.12",
8+
version: "0.1.13",
99
type: "action",
1010
props: {
1111
pipedriveApp,

components/pipedrive/actions/add-lead/add-lead.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "pipedrive-add-lead",
77
name: "Add Lead",
88
description: "Create a new lead in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#addLead)",
9-
version: "0.0.6",
9+
version: "0.0.7",
1010
type: "action",
1111
props: {
1212
pipedrive,

components/pipedrive/actions/add-note/add-note.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-add-note",
66
name: "Add Note",
77
description: "Adds a new note. For info on [adding an note in Pipedrive](https://developers.pipedrive.com/docs/api/v1/Notes#addNote)",
8-
version: "0.0.10",
8+
version: "0.0.11",
99
type: "action",
1010
props: {
1111
pipedriveApp,

components/pipedrive/actions/add-organization/add-organization.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-add-organization",
66
name: "Add Organization",
77
description: "Adds a new organization. See the Pipedrive API docs for Organizations [here](https://developers.pipedrive.com/docs/api/v1/Organizations#addOrganization)",
8-
version: "0.1.12",
8+
version: "0.1.13",
99
type: "action",
1010
props: {
1111
pipedriveApp,

components/pipedrive/actions/add-person/add-person.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export default {
66
key: "pipedrive-add-person",
77
name: "Add Person",
88
description: "Adds a new person. See the Pipedrive API docs for People [here](https://developers.pipedrive.com/docs/api/v1/Persons#addPerson)",
9-
version: "0.1.12",
9+
version: "0.1.13",
1010
type: "action",
1111
props: {
1212
pipedriveApp,
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import pipedriveApp from "../../pipedrive.app.mjs";
2+
3+
export default {
4+
key: "pipedrive-get-lead-by-id",
5+
name: "Get Lead by ID",
6+
description: "Get a lead by its ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#getLead)",
7+
version: "0.0.1",
8+
type: "action",
9+
props: {
10+
pipedriveApp,
11+
leadId: {
12+
propDefinition: [
13+
pipedriveApp,
14+
"leadId",
15+
],
16+
description: "The ID of the lead to get",
17+
optional: false,
18+
},
19+
},
20+
async run({ $ }) {
21+
const { data } = await this.pipedriveApp.getLead(this.leadId);
22+
$.export("$summary", `Successfully retrieved lead with ID: ${this.leadId}`);
23+
return data;
24+
},
25+
};

components/pipedrive/actions/get-person-details/get-person-details.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-get-person-details",
66
name: "Get person details",
77
description: "Get details of a person by their ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Persons#getPerson)",
8-
version: "0.0.1",
8+
version: "0.0.2",
99
type: "action",
1010
props: {
1111
pipedriveApp,

components/pipedrive/actions/remove-duplicate-notes/remove-duplicate-notes.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
key: "pipedrive-remove-duplicate-notes",
66
name: "Remove Duplicate Notes",
77
description: "Remove duplicate notes from an object in Pipedrive. See the documentation for [getting notes](https://developers.pipedrive.com/docs/api/v1/Notes#getNotes) and [deleting notes](https://developers.pipedrive.com/docs/api/v1/Notes#deleteNote)",
8-
version: "0.0.3",
8+
version: "0.0.4",
99
type: "action",
1010
props: {
1111
pipedriveApp,
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
import pipedriveApp from "../../pipedrive.app.mjs";
2+
import constants from "../../common/constants.mjs";
3+
4+
export default {
5+
key: "pipedrive-search-leads",
6+
name: "Search Leads",
7+
description: "Search for leads by name or email. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#searchLeads)",
8+
version: "0.0.1",
9+
type: "action",
10+
props: {
11+
pipedriveApp,
12+
term: {
13+
type: "string",
14+
label: "Search Term",
15+
description: "The search term to look for. Minimum 2 characters (or 1 if using exact_match).",
16+
},
17+
exactMatch: {
18+
type: "boolean",
19+
label: "Exact Match",
20+
description: "When enabled, only full exact matches against the given term are returned. It is not case sensitive.",
21+
optional: true,
22+
},
23+
fields: {
24+
type: "string[]",
25+
label: "Search Fields",
26+
description: "An array containing fields to perform the search from. Defaults to all of them.",
27+
optional: true,
28+
options: constants.LEAD_FIELD_OPTIONS,
29+
},
30+
personId: {
31+
propDefinition: [
32+
pipedriveApp,
33+
"personId",
34+
],
35+
description: "Will filter leads by the provided Person ID",
36+
},
37+
organizationId: {
38+
propDefinition: [
39+
pipedriveApp,
40+
"organizationId",
41+
],
42+
description: "Will filter leads by the provided Organization ID",
43+
},
44+
includeFields: {
45+
type: "string",
46+
label: "Include fields",
47+
description: "Supports including optional fields in the results which are not provided by default.",
48+
optional: true,
49+
options: [
50+
"lead.was_seen",
51+
],
52+
},
53+
},
54+
async run({ $ }) {
55+
const { data: { items = [] } } = await this.pipedriveApp.searchLeads({
56+
term: this.term,
57+
exact_match: this.exactMatch,
58+
fields: this.fields,
59+
person_id: this.personId,
60+
organization_id: this.organizationId,
61+
include_fields: this.includeFields,
62+
});
63+
$.export("$summary", `Successfully found ${items.length} lead${items.length === 1
64+
? ""
65+
: "s"}`);
66+
return items;
67+
},
68+
};

0 commit comments

Comments
 (0)