# List Employees — Buddee

> Retrieve a complete list of employees. See the documentation

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

## Description

Retrieve a complete list of employees. [See the documentation](https://developers.buddee.nl/#fd057d3c-8b40-4808-a4d2-eeffc5da82d7)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `jobId` | `string` | No | Filter employees by job ID Options are loaded from the connected account. |
| `locationId` | `string` | No | Filter employees by location ID Options are loaded from the connected account. |
| `buddyId` | `string` | No | Filter employees by buddy ID Options are loaded from the connected account. |
| `managerId` | `string` | No | Filter employees by manager ID Options are loaded from the connected account. |
| `indirectManagerId` | `string` | No | Filter employees by indirect manager ID Options are loaded from the connected account. |
| `hrManagerId` | `string` | No | Filter employees by HR manager ID Options are loaded from the connected account. |
| `costCenterId` | `string` | No | Filter employees by cost center ID Options are loaded from the connected account. |
| `costUnitId` | `string` | No | Filter employees by cost unit ID Options are loaded from the connected account. |
| `fullName` | `string` | No | Filter employees by full name |
| `workEmail` | `string` | No | Filter employees by work email address |
| `personalEmail` | `string` | No | Filter employees by personal email address |
| `active` | `boolean` | No | Filter by active or archived employees based on the boolean value |
| `employedOrArchivedInPeriod` | `string` | No | Filter employees employed or archived within a specified date range |
| `activeInPeriod` | `string` | No | Filter employees active within a specific period |
| `archived` | `boolean` | No | Filter employees by archived status |
| `contractDuration` | `string` | No | Filter employees by the duration of their contract |
| `contractType` | `string` | No | Filter employees by the type of contract |
| `employmentType` | `string` | No | Filter employees by the type of employment |
| `manager` | `string` | No | Filter employees by manager ID Options are loaded from the connected account. |
| `workScheduleType` | `string` | No | Filter employees by the type of work schedule |
| `maxResults` | `integer` | No | The maximum number of results to return |

## 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": "buddee",
      },
    },
  },
)

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: "buddee-list-employees",
  arguments: {
    jobId: "Job ID",
    locationId: "Location ID",
  },
})
```

**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: "buddee-list-employees",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    buddee: { authProvisionId: "apn_xxxxxxx" },
    jobId: "Job ID",
    locationId: "Location ID",
  },
})

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": "buddee-list-employees",
    "configured_props": {
      "buddee": { "authProvisionId": "apn_xxxxxxx" },
      "jobId": "Job ID",
      "locationId": "Location ID"
    }
  }'
```

---

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