diff --git a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts index 3f4d4da5fe..8ae9c42630 100644 --- a/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts +++ b/packages/nodes-base/nodes/Pipedrive/Pipedrive.node.ts @@ -171,6 +171,11 @@ export class Pipedrive implements INodeType { value: 'delete', description: 'Delete a deal', }, + { + name: 'Duplicate', + value: 'duplicate', + description: 'Duplicate a deal', + }, { name: 'Get', value: 'get', @@ -947,6 +952,28 @@ export class Pipedrive implements INodeType { description: 'ID of the deal to delete.', }, + // ---------------------------------- + // deal:duplicate + // ---------------------------------- + { + displayName: 'Deal ID', + name: 'dealId', + type: 'number', + displayOptions: { + show: { + operation: [ + 'duplicate', + ], + resource: [ + 'deal', + ], + }, + }, + default: 0, + required: true, + description: 'ID of the deal to duplicate.', + }, + // ---------------------------------- // deal:get // ---------------------------------- @@ -2157,6 +2184,16 @@ export class Pipedrive implements INodeType { const dealId = this.getNodeParameter('dealId', i) as number; endpoint = `/deals/${dealId}`; + } else if (operation === 'duplicate') { + // ---------------------------------- + // deal:duplicate + // ---------------------------------- + + requestMethod = 'POST'; + + const dealId = this.getNodeParameter('dealId', i) as number; + endpoint = `/deals/${dealId}/duplicate`; + } else if (operation === 'get') { // ---------------------------------- // deal:get