CleverTap ACTION
Create Campaign
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's CleverTap account once, then configure and run Create Campaign 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: "clevertap-create-campaign",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
clevertap: { authProvisionId: "apn_xxxxxxx" },
name: "Campaign Name",
targetMode: "Target Mode",
},
})
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": "clevertap-create-campaign",
"configured_props": {
"clevertap": { "authProvisionId": "apn_xxxxxxx" },
"name": "Campaign Name",
"targetMode": "Target Mode"
}
}'// 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": "clevertap",
},
},
},
)
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: "clevertap-create-campaign",
arguments: {
name: "Campaign Name",
targetMode: "Target Mode",
},
})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 Campaign Name | string | The name of your campaign shown in the CleverTap dashboard. Required |
targetMode Target Mode | string | The type of campaign to create Required |
where Where | object | Allows you to filter target base on the user events and profile properties. Omit this parameter to target your entire user base. Example: Optional |
content Content | object | Object that defines the content for your message. Web Push Notification Example:
Mobile Push Notification Example:
Email Example: Optional |
respectFrequencyCaps Respect Frequency Caps | boolean | Set to false if you want to override frequency caps and dwell time. Defaults to true. Optional |
estimateOnly Estimate Only | boolean | If this parameter is set to true, the request returns an estimated reach of the campaign, which is the number of users who receive the notification when you send it out. Setting this parameter to true does not create the campaign. Defaults to false. Optional |
conversionGoal Conversion Goal | object | Checks the end goal of the campaign for conversion tracking. Example: Optional |
ttlType Time To Live Type | string | This allows setting of time to live for push notifications for android and iOS. The type of time to live. Can be absolute or relative. Defaults to absolute. Optional |
ttlValue Time To Live Value | integer | This allows setting of time to live for push notifications for android and iOS. The value of the time to live. Can be a number of days, hours, minutes, or seconds.
Optional |
webhookEndpointName Webhook Endpoint Name | string | The name of the webhook endpoint to use for the campaign. Optional |
webhookFields Webhook Fields | string[] | The fields to include in the webhook payload. Can be profile-attributes, tokens, or identities. Optional |
webhookKeyValue Webhook Key Value | object | The key-value pairs to include in the webhook payload. 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
- clevertap-create-campaign
- Version
- 0.0.2
- App
- CleverTap
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗