-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Pipedrive - New Actions #17387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Pipedrive - New Actions #17387
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
components/pipedrive/actions/get-lead-by-id/get-lead-by-id.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-get-lead-by-id", | ||
| name: "Get Lead by ID", | ||
| description: "Get a lead by its ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#getLead)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| pipedriveApp, | ||
| leadId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "leadId", | ||
| ], | ||
| description: "The ID of the lead to get", | ||
| optional: false, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data } = await this.pipedriveApp.getLead(this.leadId); | ||
| $.export("$summary", `Successfully retrieved lead with ID: ${this.leadId}`); | ||
| return data; | ||
| }, | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68 changes: 68 additions & 0 deletions
68
components/pipedrive/actions/search-leads/search-leads.mjs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
| import constants from "../../common/constants.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-search-leads", | ||
| name: "Search Leads", | ||
| description: "Search for leads by name or email. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#searchLeads)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| props: { | ||
| pipedriveApp, | ||
| term: { | ||
| type: "string", | ||
| label: "Search Term", | ||
| description: "The search term to look for. Minimum 2 characters (or 1 if using exact_match).", | ||
| }, | ||
| exactMatch: { | ||
| type: "boolean", | ||
| label: "Exact Match", | ||
| description: "When enabled, only full exact matches against the given term are returned. It is not case sensitive.", | ||
| optional: true, | ||
| }, | ||
| fields: { | ||
| type: "string[]", | ||
| label: "Search Fields", | ||
| description: "An array containing fields to perform the search from. Defaults to all of them.", | ||
| optional: true, | ||
| options: constants.LEAD_FIELD_OPTIONS, | ||
| }, | ||
| personId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "personId", | ||
| ], | ||
| description: "Will filter Deals by the provided Person ID", | ||
| }, | ||
| organizationId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "organizationId", | ||
| ], | ||
| description: "Will filter Deals by the provided Organization ID", | ||
michelle0927 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| }, | ||
| includeFields: { | ||
| type: "string", | ||
| label: "Include fields", | ||
| description: "Supports including optional fields in the results which are not provided by default.", | ||
| optional: true, | ||
| options: [ | ||
| "lead.was_seen", | ||
| ], | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const { data: { items = [] } } = await this.pipedriveApp.searchLeads({ | ||
| term: this.term, | ||
| exact_match: this.exactMatch, | ||
| fields: this.fields, | ||
| person_id: this.personId, | ||
| organization_id: this.organizationId, | ||
| include_fields: this.includeFields, | ||
| }); | ||
| $.export("$summary", `Successfully found ${items.length} lead${items.length === 1 | ||
| ? "" | ||
| : "s"}`); | ||
| return items; | ||
| }, | ||
| }; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.