View as Markdown
Pipedrive icon

Pipedrive ACTION

Get All Leads

Get all leads from Pipedrive. See the documentation
  • Action
  • Read only
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Pipedrive account once, then configure and run Get All Leads 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-get-all-leads",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pipedrive: { authProvisionId: "apn_xxxxxxx" },
    maxResults: 10,
    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.

Get All Leads inputs
Property Type Description
maxResults Max Results integer
The maximum number of results to return. If not provided, all leads will be returned.
Optional
ownerId Owner ID integer
If supplied, only leads matching the given user will be returned. However, Filter ID takes precedence over Owner ID when supplied.
Optional Dynamic
personId Person ID integer
If supplied, only leads matching the given person will be returned. However, Filter ID takes precedence over Person ID when supplied.
Optional Dynamic
organizationId Organization ID integer
If supplied, only leads matching the given organization will be returned. However, Filter ID takes precedence over Organization ID when supplied.
Optional Dynamic
filterId Lead Filter ID integer
The ID of the filter to use. Takes precedence over Owner ID, Person ID, and Organization ID when supplied.
Optional Dynamic
sort Sort string
The field names and sorting mode separated by a comma (field_name_1 ASC, field_name_2 DESC). Only first-level field keys are supported (no nested keys). Valid fields: id, title, owner_id, creator_id, was_seen, expected_close_date, next_activity_id, add_time, update_time
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-get-all-leads
Version
0.0.6
App
Pipedrive
Authentication
OAuth
Read-only
Yes
Destructive
No
Open world
Yes