From 36bd9f689ed2c1c93a5c1ca3b35e2b6d71c8f38b Mon Sep 17 00:00:00 2001 From: Michelle Bergeron Date: Mon, 26 May 2025 13:04:40 -0400 Subject: [PATCH] add note prop --- .../pipedrive/actions/add-lead/add-lead.mjs | 16 +++++++++++++++- components/pipedrive/package.json | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/components/pipedrive/actions/add-lead/add-lead.mjs b/components/pipedrive/actions/add-lead/add-lead.mjs index 0a15c2a577a23..a0fac865ed2dc 100644 --- a/components/pipedrive/actions/add-lead/add-lead.mjs +++ b/components/pipedrive/actions/add-lead/add-lead.mjs @@ -6,7 +6,7 @@ export default { key: "pipedrive-add-lead", name: "Add Lead", description: "Create a new lead in Pipedrive. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Leads#addLead)", - version: "0.0.1", + version: "0.0.2", type: "action", props: { pipedrive, @@ -84,6 +84,12 @@ export default { description: "A flag indicating whether the lead was seen by someone in the Pipedrive UI", optional: true, }, + note: { + type: "string", + label: "Note", + description: "A note to add to the lead", + optional: true, + }, }, async run({ $ }) { if (!this.organizationId && !this.personId) { @@ -101,6 +107,14 @@ export default { visible_to: this.visibleTo, was_seen: this.wasSeen, }); + + if (this.note) { + await this.pipedrive.addNote({ + content: this.note, + lead_id: response.data?.id, + }); + } + $.export("$summary", `Successfully created lead: ${response.data?.title || response.data?.id}`); return response; }, diff --git a/components/pipedrive/package.json b/components/pipedrive/package.json index 6c7da0107bfd0..3437477b7893a 100644 --- a/components/pipedrive/package.json +++ b/components/pipedrive/package.json @@ -1,6 +1,6 @@ { "name": "@pipedream/pipedrive", - "version": "0.4.0", + "version": "0.4.1", "description": "Pipedream Pipedrive Components", "main": "pipedrive.app.mjs", "keywords": [