Pidj ACTION
Create Contact
Initiates a process to add a new contact to your Pidj account. See the documentation.
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Pidj account once, then configure and run Create Contact 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: "pidj-create-contact",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
pidj: { authProvisionId: "apn_xxxxxxx" },
phoneNumber: "Phone Number",
emailAddress: "Email Address",
},
})
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": "pidj-create-contact",
"configured_props": {
"pidj": { "authProvisionId": "apn_xxxxxxx" },
"phoneNumber": "Phone Number",
"emailAddress": "Email Address"
}
}'// 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": "pidj",
},
},
},
)
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: "pidj-create-contact",
arguments: {
phoneNumber: "Phone Number",
emailAddress: "Email Address",
},
})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 |
|---|---|---|
phoneNumber Phone Number | string | Phone number for the contact. This must be in E.164 format. e.g., +18885552222 Required |
emailAddress Email Address | string | The contact's email address. Optional |
firstName First Name | string | The contact's first name. Optional |
lastName Last Name | string | The contact's last name. Optional |
businessName Business Name | string | The contact's business name. Optional |
displayName Display Name | string | The contact's display name, if present, and different from first and last name. Optional |
groupId Group Id | string | The Id of the group. Optional Dynamic |
timezone Timezone | string | Timezone identifier for the contact. If omitted, this will default to the account value. Optional |
externalId External Id | string | The external ID of the contact from your own system. This may be used in any enabled integrations to cross-identify the contact record. Optional |
homeAddressStreet1 Home Street 1 | string | The home street address 1. Optional |
homeAddressStreet2 Home Street 2 | string | The home street address 2. Optional |
homeAddressCity Home City | string | The home city address. Optional |
homeAddressState Home State | string | The home state address. Must be the standard 2 character abbreviation (ANSI2-letter or USPS). Any other values will be discarded. See further information. Optional |
homeAddressPostal Home Postal | string | Valid 5 or 10 digit zipcode (US addresses). British, Canadian, and Australian postal codes also supported. Optional |
homeAddressCountry Home Country | string | Must be either ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3. Any other values will be discarded. See further information. Optional |
businessAddressStreet1 Business Street 1 | string | The business street address 1. Optional |
businessAddressStreet2 Business Street 2 | string | The business street address 2. Optional |
businessAddressCity Business City | string | The business city address. Optional |
businessAddressState Business State | string | The business state address. Must be the standard 2 character abbreviation (ANSI2-letter or USPS). Any other values will be discarded. See further information. Optional |
businessAddressPostal Business Postal | string | Valid 5 or 10 digit zipcode (US addresses). British, Canadian, and Australian postal codes also supported. Optional |
businessAddressCountry Business Country | string | Must be either ISO 3166-1 alpha-2 or ISO 3166-1 alpha-3. Any other values will be discarded. See further information. 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
- pidj-create-contact
- Version
- 0.0.2
- App
- Pidj
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗