-
Notifications
You must be signed in to change notification settings - Fork 5.7k
feat(pipedrive): add Projects, Tasks, and related list actions #21338
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
Open
michelle0927
wants to merge
7
commits into
master
Choose a base branch
from
issue-20984-pipedrive
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
550cd63
feat(pipedrive): add Projects, Tasks, and related list actions
25b4cd1
chore(pipedrive): bump versions on existing components
075983a
refactor(pipedrive): review response — share prop defs, tighten specs
22f0f9e
fix(pipedrive): projects/tasks methods must not use the JS SDK — v2 c…
3445f0d
refactor(pipedrive): share boardId + ownerId propDefs between create/…
aa67708
Merge branch 'master' into issue-20984-pipedrive
ashwins01 6568dd8
Merge branch 'master' into issue-20984-pipedrive
ashwins01 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
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
112 changes: 112 additions & 0 deletions
112
components/pipedrive/actions/create-project/create-project.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,112 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-create-project", | ||
| name: "Create Project", | ||
| description: "Creates a new project in Pipedrive. Use **List Project Boards** to obtain a valid Board ID and **List Project Phases** to obtain a valid Phase ID before running this action. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Projects#addProject)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| pipedriveApp, | ||
| title: { | ||
| type: "string", | ||
| label: "Title", | ||
| description: "The title of the project.", | ||
| }, | ||
| description: { | ||
| type: "string", | ||
| label: "Description", | ||
| description: "The description of the project.", | ||
| optional: true, | ||
| }, | ||
| status: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "projectStatus", | ||
| ], | ||
| }, | ||
| boardId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "projectBoardId", | ||
| ], | ||
| description: "The ID of the board this project belongs to. Run **List Project Boards** first to obtain a valid board ID.", | ||
| }, | ||
| phaseId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "projectPhaseId", | ||
| ], | ||
| description: "The ID of the phase this project belongs to. Run **List Project Phases** (with the chosen board ID) first to obtain a valid phase ID.", | ||
| }, | ||
| ownerId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "userId", | ||
| ], | ||
| label: "Owner ID", | ||
| description: "The user ID of the project owner.", | ||
| optional: true, | ||
| }, | ||
| startDate: { | ||
| type: "string", | ||
| label: "Start Date", | ||
| description: "The start date of the project. Format: YYYY-MM-DD (e.g. 2026-07-31).", | ||
| optional: true, | ||
| }, | ||
| endDate: { | ||
| type: "string", | ||
| label: "End Date", | ||
| description: "The end date of the project. Format: YYYY-MM-DD (e.g. 2026-08-31).", | ||
| optional: true, | ||
| }, | ||
| dealIds: { | ||
| type: "string[]", | ||
| label: "Deal IDs", | ||
| description: "Array of deal IDs to associate with the project. Use **List Deals** to obtain a valid deal ID.", | ||
| optional: true, | ||
| }, | ||
| personIds: { | ||
| type: "string[]", | ||
| label: "Person IDs", | ||
| description: "Array of person IDs to associate with the project. Use **List Persons** to obtain a valid person ID.", | ||
| optional: true, | ||
| }, | ||
| orgIds: { | ||
| type: "string[]", | ||
| label: "Organization IDs", | ||
| description: "Array of organization IDs to associate with the project. Use **List Organizations** to obtain a valid organization ID.", | ||
| optional: true, | ||
| }, | ||
| labelIds: { | ||
| type: "string[]", | ||
| label: "Label IDs", | ||
| description: "Array of numeric project-label IDs to associate with the project. Project labels are managed in Pipedrive under **Settings → Labels** — copy the numeric ID for each label you want to apply.", | ||
| optional: true, | ||
| }, | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.pipedriveApp.addProject({ | ||
| $, | ||
| title: this.title, | ||
| description: this.description, | ||
| status: this.status, | ||
| board_id: this.boardId, | ||
| phase_id: this.phaseId, | ||
| owner_id: this.ownerId, | ||
| start_date: this.startDate, | ||
| end_date: this.endDate, | ||
| deal_ids: this.dealIds, | ||
| person_ids: this.personIds, | ||
| org_ids: this.orgIds, | ||
| label_ids: this.labelIds, | ||
| }); | ||
| $.export("$summary", `Successfully created project ${response.data?.id}: ${this.title}`); | ||
| return response; | ||
| }, | ||
| }; | ||
100 changes: 100 additions & 0 deletions
100
components/pipedrive/actions/create-task/create-task.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,100 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-create-task", | ||
| name: "Create Task", | ||
| description: "Creates a new task under a project (BETA). Run **List Projects** first to obtain a valid project ID. Use **List User ID Options** for the assignee ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Tasks#addTask)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: false, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| pipedriveApp, | ||
| title: { | ||
| type: "string", | ||
| label: "Title", | ||
| description: "The title of the task.", | ||
| }, | ||
| projectId: { | ||
| type: "string", | ||
| label: "Project ID", | ||
| description: "The ID of the project this task belongs to. Run **List Projects** first to obtain a valid project ID.", | ||
| }, | ||
| parentTaskId: { | ||
| type: "string", | ||
| label: "Parent Task ID", | ||
| description: "The ID of the parent task, if this is a subtask. Use **List Tasks** to obtain a valid task ID.", | ||
| optional: true, | ||
| }, | ||
| description: { | ||
| type: "string", | ||
| label: "Description", | ||
| description: "The description of the task.", | ||
| optional: true, | ||
| }, | ||
| done: { | ||
| type: "integer", | ||
| label: "Done", | ||
| description: "Whether the task is done. Integer: 0 (not done) or 1 (done).", | ||
| min: 0, | ||
| max: 1, | ||
| optional: true, | ||
| }, | ||
| milestone: { | ||
| type: "integer", | ||
| label: "Milestone", | ||
| description: "Whether the task is a milestone. Integer: 0 (no) or 1 (yes).", | ||
| min: 0, | ||
| max: 1, | ||
| optional: true, | ||
| }, | ||
| dueDate: { | ||
| type: "string", | ||
| label: "Due Date", | ||
| description: "The due date of the task. Format: YYYY-MM-DD (e.g. 2026-07-31).", | ||
| optional: true, | ||
| }, | ||
| startDate: { | ||
| type: "string", | ||
| label: "Start Date", | ||
| description: "The start date of the task. Format: YYYY-MM-DD.", | ||
| optional: true, | ||
| }, | ||
| assigneeId: { | ||
| propDefinition: [ | ||
| pipedriveApp, | ||
| "userId", | ||
| ], | ||
| label: "Assignee ID", | ||
| description: "The user ID of the task assignee.", | ||
| optional: true, | ||
| }, | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| priority: { | ||
| type: "integer", | ||
| label: "Priority", | ||
| description: "The priority of the task (non-negative integer).", | ||
| min: 0, | ||
| optional: true, | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.pipedriveApp.addTask({ | ||
| $, | ||
| title: this.title, | ||
| project_id: this.projectId, | ||
| parent_task_id: this.parentTaskId, | ||
| description: this.description, | ||
| done: this.done, | ||
| milestone: this.milestone, | ||
| due_date: this.dueDate, | ||
| start_date: this.startDate, | ||
| assignee_id: this.assigneeId, | ||
| priority: this.priority, | ||
| }); | ||
| $.export("$summary", `Successfully created task ${response.data?.id}: ${this.title}`); | ||
| return response; | ||
| }, | ||
| }; | ||
30 changes: 30 additions & 0 deletions
30
components/pipedrive/actions/delete-project/delete-project.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,30 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-delete-project", | ||
| name: "Delete Project", | ||
| description: "Permanently deletes a project. This is irreversible. Run **List Projects** first to obtain a valid project ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Projects#deleteProject)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: true, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| pipedriveApp, | ||
| projectId: { | ||
| type: "string", | ||
| label: "Project ID", | ||
| description: "The ID of the project to delete. Run **List Projects** first to obtain a valid project ID.", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.pipedriveApp.deleteProject({ | ||
| $, | ||
| projectId: this.projectId, | ||
| }); | ||
| $.export("$summary", `Successfully deleted project ${this.projectId}`); | ||
| return response; | ||
| }, | ||
| }; |
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,30 @@ | ||
| import pipedriveApp from "../../pipedrive.app.mjs"; | ||
|
|
||
| export default { | ||
| key: "pipedrive-delete-task", | ||
| name: "Delete Task", | ||
| description: "Permanently deletes a task and all of its subtasks (BETA). This is irreversible. Run **List Tasks** first to obtain a valid task ID. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Tasks#deleteTask)", | ||
| version: "0.0.1", | ||
| type: "action", | ||
| annotations: { | ||
| destructiveHint: true, | ||
| openWorldHint: true, | ||
| readOnlyHint: false, | ||
| }, | ||
| props: { | ||
| pipedriveApp, | ||
| taskId: { | ||
| type: "string", | ||
| label: "Task ID", | ||
| description: "The ID of the task to delete. Run **List Tasks** first to obtain a valid task ID.", | ||
| }, | ||
| }, | ||
| async run({ $ }) { | ||
| const response = await this.pipedriveApp.deleteTask({ | ||
| $, | ||
| taskId: this.taskId, | ||
| }); | ||
| $.export("$summary", `Successfully deleted task ${this.taskId}`); | ||
| return response; | ||
| }, | ||
| }; |
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
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.