# List Persons — Pipedrive

> List persons in your Pipedrive account. See the documentation

- Key: `pipedrive-list-persons`
- Type: Action (Read-only)
- Version: 0.0.2
- App: Pipedrive (`pipedrive`) — https://pipedream.com/apps/pipedrive.md
- This page (HTML): https://pipedream.com/apps/pipedrive/actions/list-persons
- Hints: read-only · open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/pipedrive/actions/list-persons/list-persons.mjs

## Description

List persons in your Pipedrive account. [See the documentation](https://developers.pipedrive.com/docs/api/v1/Persons#getPersons)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `filterId` | `integer` | No | The ID of the filter to apply to persons Options are loaded from the connected account. |
| `personIds` | `string[]` | No | The IDs of the persons to list (up to 100). Filter ID takes precedence over Person IDs when supplied. Options are loaded from the connected account. |
| `ownerId` | `integer` | No | ID of the user who owns the person. If omitted, persons owned by any user are returned. Filter ID takes precedence over Owner ID when supplied. Options are loaded from the connected account. |
| `organizationId` | `integer` | No | If supplied, only persons linked to the given organization will be returned. Filter ID takes precedence over Organization ID when supplied. Options are loaded from the connected account. |
| `dealId` | `string` | No | If supplied, only persons linked to the given deal will be returned. Filter ID takes precedence over Deal ID when supplied. Options are loaded from the connected account. |
| `updatedSince` | `string` | No | If set, only persons with an update_time later than or equal to this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. |
| `updatedUntil` | `string` | No | If set, only persons with an update_time earlier than this time are returned. In RFC3339 format, e.g. 2025-01-01T10:20:00Z. |
| `sortBy` | `string` | No | The field to sort by |
| `sortDirection` | `string` | No | The direction to sort by |
| `includeFields` | `string[]` | No | Additional fields to include in the response. marketing_status and doi_status can only be included when the user's country is set in Pipedrive. |
| `customFields` | `string[]` | No | Optional string array of custom field keys to include in the response. |
| `includeOptionLabels` | `boolean` | No | When true, single-option and multi-option custom field values include the option labels alongside their IDs. Defaults to false. |
| `includeLabels` | `boolean` | No | When true, the response includes an array of label objects ({ id, label, color }) for each person. Defaults to false. |
| `limit` | `integer` | No | For pagination, the limit of entries to be returned. If not provided, 100 items will be returned. Maximum allowed value is 500. |
| `cursor` | `string` | No | For pagination, the cursor to the next page of results. If not provided, the first page will be returned. |

## Run it

**MCP**

```ts
import { Client } from "@modelcontextprotocol/sdk/client/index.js"
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js"
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 accessToken = await pd.rawAccessToken

const transport = new StreamableHTTPClientTransport(
  new URL("https://remote.mcp.pipedream.net/v3"),
  {
    requestInit: {
      headers: {
        Authorization: `Bearer ${accessToken}`,
        "x-pd-project-id": process.env.PIPEDREAM_PROJECT_ID!,
        "x-pd-environment": "production",
        "x-pd-external-user-id": "{external_user_id}", // any stable ID for this user in your system
        "x-pd-app-slug": "pipedrive",
      },
    },
  },
)

const mcp = new Client({ name: "my-agent", version: "1.0.0" })
await mcp.connect(transport)

const { tools } = await mcp.listTools()

// listTools() hands your model this tool's input schema, so it can
// fill the arguments itself:
const result = await mcp.callTool({
  name: "pipedrive-list-persons",
  arguments: {
    filterId: 10,
    personIds: ["Person IDs"],
  },
})
```

**TypeScript**

```ts
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-list-persons",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    pipedrive: { authProvisionId: "apn_xxxxxxx" },
    filterId: 10,
    personIds: ["Person IDs"],
  },
})

console.log(result)
```

**cURL**

```bash
curl -X POST https://api.pipedream.com/v1/connect/{project_id}/actions/run \
  -H "Content-Type: application/json" \
  -H "X-PD-Environment: production" \
  -H "Authorization: Bearer {access_token}" \
  -d '{
    "external_user_id": "{external_user_id}",
    "id": "pipedrive-list-persons",
    "configured_props": {
      "pipedrive": { "authProvisionId": "apn_xxxxxxx" },
      "filterId": 10,
      "personIds": ["Person IDs"]
    }
  }'
```

---

- App: https://pipedream.com/apps/pipedrive.md · All apps: https://pipedream.com/apps
