Sendy ACTION
Create Draft Campaign
Creates a new draft campaign ready to be filled in with details. See the documentation
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Sendy account once, then configure and run Create Draft 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: "sendy-create-draft-campaign",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
sendy: { authProvisionId: "apn_xxxxxxx" },
fromName: "From Name",
fromEmail: "From Email",
},
})
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": "sendy-create-draft-campaign",
"configured_props": {
"sendy": { "authProvisionId": "apn_xxxxxxx" },
"fromName": "From Name",
"fromEmail": "From Email"
}
}'// 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": "sendy",
},
},
},
)
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: "sendy-create-draft-campaign",
arguments: {
fromName: "From Name",
fromEmail: "From Email",
},
})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 |
|---|---|---|
fromName From Name | string | The 'From Name' of your campaign. Required |
fromEmail From Email | string | The 'From Email' of your campaign. Required |
replyTo Reply To | string | The 'Reply To' of your campaign. Required |
title Title | string | The 'Title' of your campaign. Required |
subject Subject | string | The 'Subject' of your campaign. Required |
plainText Plain Text | string | The 'Plain text version' of your campaign. Optional |
htmlText HTML Text | string | The 'HTML version' of your campaign. Required |
brandId Brand ID | string | The ID of the brand. Required Dynamic |
listIds List IDs | string[] | A list of List IDs. Optional Dynamic |
segmentIds Segment IDs | string[] | A list of segment IDs. Segment ids can be found in the segments setup page. Optional |
excludeListIds Exclude List IDs | string[] | Lists to exclude from your campaign. Optional Dynamic |
excludeSegmentIds Exclude Segment IDs | string[] | Segments to exclude from your campaign. Segment ids can be found in the segments setup page. Optional |
queryString Query String | string | e.g., Google Analytics tags. Optional |
trackOpens Track Opens | string | Open tracking behaviour. Required |
trackClicks Track Clicks | string | Click tracking behaviour. Required |
scheduleDateTime Schedule Date Time | string | Format: June 15, 2021 6:05pm. Minutes in increments of '5', eg. 6pm, 6:05pm, 6:10pm, 6:15pm.. Optional |
scheduleTimezone Schedule Timezone | string | e.g., 'America/New_York'. See the list of PHP's supported timezones. This parameter only applies if you're scheduling your campaign with 'Schedule Date Time' parameter. Sendy will use your default timezone if this parameter is empty. 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
- sendy-create-draft-campaign
- Version
- 0.0.2
- App
- Sendy
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗