# Create Candidate — Recruiterflow

> Creates a new candidate in Recruiterflow. See the documentation

- Key: `recruiterflow-create-candidate`
- Type: Action (Write)
- Version: 0.0.1
- App: Recruiterflow (`recruiterflow`) — https://pipedream.com/apps/recruiterflow.md
- This page (HTML): https://pipedream.com/apps/recruiterflow/actions/create-candidate
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/recruiterflow/actions/create-candidate/create-candidate.mjs

## Description

Creates a new candidate in Recruiterflow. [See the documentation](https://recruiterflow.com/swagger.yml)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | Yes | Full name of the candidate |
| `email` | `string` | No | Primary email address of the candidate |
| `phoneNumber` | `string` | No | Primary phone number of the candidate |
| `title` | `string` | No | Current job title of the candidate |
| `organization` | `string` | No | Current organization/company of the candidate |
| `location` | `string` | No | Location of the candidate (e.g., 'New York Metropolitan Area') |
| `linkedinProfile` | `string` | No | LinkedIn profile URL |
| `twitterProfile` | `string` | No | Twitter profile URL |
| `facebookProfile` | `string` | No | Facebook profile URL |
| `githubProfile` | `string` | No | GitHub profile URL |
| `angellistProfile` | `string` | No | AngelList profile URL |
| `source` | `string` | No | Source of the candidate (e.g., 'linkedin', 'referral', 'website') |
| `tags` | `string[]` | No | Tags to categorize the candidate |
| `skills` | `string[]` | No | Array of candidate skills |
| `leadOwnerId` | `string` | No | ID of the user who will own this candidate Options are loaded from the connected account. |
| `experience` | `string[]` | No | Array of experience objects. Format: [{"organization": "Facebook", "designation": "SDE", "from": ["2", "2021"], "to": ["2", "2021"]}] |
| `education` | `string[]` | No | Array of education objects. Format: [{"school": "HPCA", "degree": "10th", "specialization": "MATHS", "from": ["5", "2021"], "to": ["5", "2022"]}] |
| `customFields` | `string[]` | No | Array of custom field objects. Example: [ { "id": 16, "value": {"currency": "USD", "number": 600000} }, { "id": 17, "value": {"currency": "USD", "number1": 600000, "number2": 800000} }, { "id": 19, "value": {"number1": 600000, "number2": 800000} }, { "id": 20, "value": ["choice1", "choice2"] }, { "id" : 33, "value" : "Random" } ] See the API documentation for more details. |
| `addedTime` | `string` | No | Timestamp for backdating candidate creation (ISO 8601 format, e.g., 2021-01-12T10:16:16+0000) |

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

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: "recruiterflow-create-candidate",
  arguments: {
    name: "Name",
    email: "Email",
  },
})
```

**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: "recruiterflow-create-candidate",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    recruiterflow: { authProvisionId: "apn_xxxxxxx" },
    name: "Name",
    email: "Email",
  },
})

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": "recruiterflow-create-candidate",
    "configured_props": {
      "recruiterflow": { "authProvisionId": "apn_xxxxxxx" },
      "name": "Name",
      "email": "Email"
    }
  }'
```

---

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