View as Markdown
Pipedrive icon

Pipedrive ACTION

Add Deal

Adds a new deal. See the Pipedrive API docs for Deals here
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Pipedrive account once, then configure and run Add Deal from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "pipedrive-add-deal",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pipedrive: { authProvisionId: "apn_xxxxxxx" },
    title: "Title",
    ownerId: 10,
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Add Deal inputs
Property Type Description
title Title string
Deal title
Required
ownerId User ID integer
ID of the user who will be marked as the owner of this deal. If omitted, the authorized user ID will be used.
Optional Dynamic
personId Person ID integer
ID of the person this deal will be associated with
Optional Dynamic
orgId Organization ID integer
ID of the organization this deal will be associated with
Optional Dynamic
pipelineId Pipeline ID integer
ID of the pipeline this activity will be associated with
Optional Dynamic
stageId Stage ID integer
ID of the stage this deal will be placed in a pipeline (note that you can't supply the ID of the pipeline as this will be assigned automatically based on stage_id). If omitted, the deal will be placed in the first stage of the default pipeline. Get the stage_id from here.
Optional Dynamic
value Value string
Value of the deal. If omitted, value will be set to 0.
Optional
currency Currency string
Currency of the deal. Accepts a 3-character currency code. If omitted, currency will be set to the default currency of the authorized user.
Optional
status Status string
open = Open, won = Won, lost = Lost, deleted = Deleted. If omitted, status will be set to open.
Optional
probability Probability integer
Deal success probability percentage. Used/shown only when deal_probability for the pipeline of the deal is enabled.
Optional
lostReason Lost Reason string
Optional message about why the deal was lost (to be used when status=lost)
Optional
visibleTo Visible To integer
Visibility of the deal. If omitted, visibility will be set to the default visibility setting of this item type for the authorized user.
Optional
isDeleted Is Deleted boolean
Whether the deal is deleted or not
Optional
isArchived Is Archived boolean
Whether the deal is archived or not
Optional
archiveTime Archive Time string
The optional date and time of archiving the deal in UTC. Format: YYYY-MM-DD HH:MM:SS. If omitted and Is Archived is true, it will be set to the current date and time.
Optional
closeTime Close Time string
The date and time of closing the deal. Can only be set if deal status is won or lost. Format: YYYY-MM-DD HH:MM:SS
Optional
wonTime Won Time string
The date and time of changing the deal status as won. Can only be set if deal status is won. Format: YYYY-MM-DD HH:MM:SS
Optional
lostTime Lost Time string
The date and time of changing the deal status as lost. Can only be set if deal status is lost. Format: YYYY-MM-DD HH:MM:SS
Optional
expectedCloseDate Expected Close Date string
The expected close date of the deal. Format: YYYY-MM-DD
Optional
labelIds Label IDs integer[]
The IDs of labels assigned to the deal
Optional Dynamic
customFields Custom Fields object
An object where each key represents a custom field. All custom fields are referenced as randomly generated 40-character hashes
Optional
note Note string
The content of a note to be attached to the deal. The note will be created after the deal is successfully added.
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
pipedrive-add-deal
Version
0.1.26
App
Pipedrive
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes