Selzy ACTION
Create Campaign
Creates a new campaign. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Selzy 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: "selzy-create-campaign",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
selzy: { authProvisionId: "apn_xxxxxxx" },
messageId: "Message ID",
startTime: "Start Time",
},
})
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": "selzy-create-campaign",
"configured_props": {
"selzy": { "authProvisionId": "apn_xxxxxxx" },
"messageId": "Message ID",
"startTime": "Start Time"
}
}'// 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": "selzy",
},
},
},
)
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: "selzy-create-campaign",
arguments: {
messageId: "Message ID",
startTime: "Start Time",
},
})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 |
|---|---|---|
messageId Message ID | string | Code of the message to be sent. The code returned by the Create Email Message method should be transferred. Optional |
startTime Start Time | string | Campaign launch date and time in the "YYYY-MM-DD hh:mm" format, which do not exceed 100 days from the current date. If the argument is not set, the campaign starts immediately. The time zone specified in the settings of the user's personal account is applied. To explicitly specify a time zone, use the Timezone argument. To provide additional error protection, you should not schedule two sendings of the same message within an hour. Optional |
trackRead Track Read | boolean | Whether to track the fact of reading the email message. The default value is false (do not track). If true, a link to a small image tracking the reference will be added to the email. The Track Read argument is ignored for SMS messages. Optional |
trackLinks Track Links | boolean | To track whether there are any click-throughs in email messages, the default value is false (do not track). If true, all external links will be replaced with special ones that allow you to track the fact of a click-through, and then forward the user to the desired page. The Track Links argument is ignored for SMS messages. Optional |
contactsUrl Contacts URL | string | Instead of the contacts parameter containing the actual email addresses or phone numbers, in this parameter you can specify the URL of the file from which the addresses (phone numbers) will be read. The URL must start with "http://", "https://" or "ftp://". The file must contain one contact per string, without commas; strings must be separated by "n" or "rn" (Mac format — only "r" — not supported). The file can be deleted after the campaign has shifted to the 'scheduled' status. Optional |
trackGa Track GA | boolean | Whether to enable Google Analytics integration for this campaign. Only explicitly indicated values are valid, default usage parameters are not applied. The default value is false (disabled). Optional |
gaMedium GA Medium | string | Integration parameters with Google Analytics (valid if track_ga=1). Only explicitly indicated values are valid, default usage parameters are not applied. Optional |
gaSource GA Source | string | Integration parameters with Google Analytics (valid if track_ga=1). Only explicitly indicated values are valid, default usage parameters are not applied. Optional |
gaCampaign GA Campaign | string | Integration parameters with Google Analytics (valid if track_ga=1). Only explicitly indicated values are valid, default usage parameters are not applied. Optional |
gaContent GA Content | string | Integration parameters with Google Analytics (valid if track_ga=1). Only explicitly indicated values are valid, default usage parameters are not applied. Optional |
gaTerm GA Term | string | Integration parameters with Google Analytics (valid if track_ga=1). Only explicitly indicated values are valid, default usage parameters are not applied. 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
- selzy-create-campaign
- Version
- 0.0.2
- App
- Selzy
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗