IMPLEMENTATION
Call this tool
Connect a user's Teamgate account once, then configure and run Create Lead 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: "teamgate-create-lead",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
teamgate: { authProvisionId: "apn_xxxxxxx" },
name: "Name",
companyName: "Company Name",
},
})
console.log(result)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": "teamgate-create-lead",
"configured_props": {
"teamgate": { "authProvisionId": "apn_xxxxxxx" },
"name": "Name",
"companyName": "Company Name"
}
}'// accessToken: mint a short-lived token with the Connect SDK — see the MCP guide
const transport = new StreamableHTTPClientTransport(
new URL("https://remote.mcp.pipedream.net/v3"),
{
requestInit: {
headers: {
Authorization: `Bearer ${accessToken}`,
"x-pd-project-id": "{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": "teamgate",
},
},
},
)
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: "teamgate-create-lead",
arguments: {
name: "Name",
companyName: "Company Name",
},
})SCHEMA
Inputs
Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.
| Property | Type | Description |
|---|---|---|
name Name | string | Required only if a lead is an person and companyName and companyId is empty. Optional |
companyName Company Name | string | Required only if a lead is an company and name is empty. The field will be set only if companyId is empty. Optional |
companies Companies | integer[] | Required only if a lead is an company and name is empty. The field will be set only if companyName is empty. Optional Dynamic |
jobTitle Job Title | string | The field will be set only if is set companyName or companyId. Optional |
statusId Lead Status Id | integer | The lead Status Id Optional Dynamic |
status Status | string | If the stauts does not exist it will be created. Optional |
statusDescription Status Description | string | Will be set only if will be created new status. Optional |
starred Starred | boolean | Indicator the lead is starred or not. Optional |
ownerId Owner Id | integer | The User`s id Optional Dynamic |
ownerUsername Owner Username | string | The username to which the lead belongs. Optional |
ownerRandom Owner Random | string | A list of users/user groups to select the random owner. Example 1: "ownerRandom": ["5", "6"], Example 2: "ownerRandom": {"groups":["1"]}, Example 3: "ownerRandom": {"0":"5","1":"6","groups":["1"]} Optional |
sourceId Source Id | integer | The source`s id Optional Dynamic |
source Source | string | If the source does not exist it will be created. Optional |
sourceDescription Source Description | string | Will be set only if will be created new source. Optional |
industryId Industry Id | integer | The industry`s id Optional Dynamic |
industry Industry | string | If the industry does not exist it will be created. Optional |
industryDescription Industry Description | string | Will be set only if will be created new industry. Optional |
tags Tags | string[] | A list of tags Optional |
emails Emails | string[] | A list of the company's emails. Example for string value: {"value":"john@example.net","type":"work"} Object format Optional |
phones Phones | string[] | A list of the company's phones. Example for string value: {"value":"+44 123 456 7890","type":"mobile"} Object format Optional |
urls URLS | string[] | A list of the company's urls. Example for string value: {"value":"https://facebook.com/example","type":"facebook"} Object format Optional |
address Address | string[] | A list of address objects. Example for string value: {"value":{"city":"Chicago","countryIso":"USA"}} Object format Optional |
customFields Custom Fields | string[] | A list of custom fields. Each row must be an object which the key is the custom field id. Example for string value: {"1":"Test value for field with Id 1"} 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
- teamgate-create-lead
- Version
- 0.0.3
- App
- Teamgate
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗