# Create Unique Lead — Vryno

> Creates a unique lead in the Vryno system, ensuring no duplication of lead details. See the documentation

- Key: `vryno-create-unique-lead`
- Type: Action (Write)
- Version: 0.0.2
- App: Vryno (`vryno`) — https://pipedream.com/apps/vryno.md
- This page (HTML): https://pipedream.com/apps/vryno/actions/create-unique-lead
- Hints: open-world
- Source: https://github.com/PipedreamHQ/pipedream/blob/master/components/vryno/actions/create-unique-lead/create-unique-lead.mjs

## Description

Creates a unique lead in the Vryno system, ensuring no duplication of lead details. [See the documentation](https://vrynotest.ti2.in/docs/api-documentation/how-to-create-a-record-in-any-module-in-vryno-crm/)

## Props

| Prop | Type | Required | Description |
|---|---|---|---|
| `firstName` | `string` | No | The lead's first name. |
| `name` | `string` | Yes | The lead's last name. |
| `email` | `string` | No | The lead's email. |
| `phoneNumber` | `string` | No | The lead's phone number. |
| `company` | `string` | No | The company the lead works for. |
| `website` | `string` | No | The lead's website. |
| `ownerId` | `string` | Yes | The user Id related to the lead.You can find the user IDs in your account -> settings -> users & controls -> users, click on some user and the ID will be in URL. |
| `score` | `integer` | No | The lead's score. |
| `expectedRevenue` | `integer` | No | Expected revenue for the lead. |
| `numberOfEmployees` | `integer` | No | Number of employees at the lead company. |
| `billingAddress` | `string` | No | The lead's billing address. |
| `billingCity` | `string` | No | The lead's billing city. |
| `billingState` | `string` | No | The lead's billing state. |
| `billingCountry` | `string` | No | The lead's billing country. |
| `billingZipcode` | `string` | No | The lead's billing zipcode |
| `shippingAddress` | `string` | No | The lead's shipping address. |
| `shippingCity` | `string` | No | The lead's shipping city. |
| `shippingState` | `string` | No | The lead's shipping state. |
| `shippingCountry` | `string` | No | The lead's shipping country. |
| `shippingZipcode` | `string` | No | The lead's shipping zipcode |
| `description` | `string` | No | A brief description about the lead. |

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

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: "vryno-create-unique-lead",
  arguments: {
    firstName: "First Name",
    name: "Last Name",
  },
})
```

**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: "vryno-create-unique-lead",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    vryno: { authProvisionId: "apn_xxxxxxx" },
    firstName: "First Name",
    name: "Last Name",
  },
})

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": "vryno-create-unique-lead",
    "configured_props": {
      "vryno": { "authProvisionId": "apn_xxxxxxx" },
      "firstName": "First Name",
      "name": "Last Name"
    }
  }'
```

---

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