Selzy ACTION
Create Email Message
- Action
- Writes data
- API key
- SDK
- MCP
IMPLEMENTATION
Call this tool
Connect a user's Selzy account once, then configure and run Create Email Message 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-email-message",
externalUserId: "{external_user_id}", // any stable ID for this user in your system
configuredProps: {
selzy: { authProvisionId: "apn_xxxxxxx" },
senderName: "Sender's name",
senderEmail: "Sender's 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": "selzy-create-email-message",
"configured_props": {
"selzy": { "authProvisionId": "apn_xxxxxxx" },
"senderName": "Sender'\''s name",
"senderEmail": "Sender'\''s 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": "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-email-message",
arguments: {
senderName: "Sender's name",
senderEmail: "Sender's 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 |
|---|---|---|
senderName Sender's name | string | It is a string that does not match the email address (the sender_email argument). Required |
senderEmail Sender's email address | string | This email must be checked (to do this, you need to manually create at least one email with this return address via the web interface, then click on the "send the confirmation request" link and follow the link from the email). Required |
subject Subject | string | String with the letter subject. It may include substitution fields. If you wish to use substitution fields, specify a string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ "Welcome to Our Newsletter, \{\{Name\}\}!" }}. The parameter is optional if Template Id is indicated. Required |
body Body | string | HTML body of the letter. It may include substitution fields. If you wish to use substitution fields, specify an HTML string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ "<p>Hello \{\{Name\}\},</p><p>Here is your update.</p>" }}. Required |
listId List ID | string | Code of the list on which the mailing will be sent. Required Dynamic |
textBody Text Body | string | Text body of the letter. It may include substitution fields. If you wish to use substitution fields, specify a text string within a Pipedream Custom Expression and escape the curly brackets with a backslash. For example: {{ "Hello \{\{Name\}\},\nHere is your update." }}. Optional |
generateText Generate Text | boolean | True means that the text part of the letter will be generated automatically based on the HTML part. If you do not provide the text version along with the HTML version, you are recommended to set the Generate Text parameter to true for automatic generation of the text part of the letter. If the text variant of the letter is provided using the Text Body parameter, the Generate Text parameter is ignored. Thus, if the Generate Text value has been set to true, the server's response will contain a warning. Required |
rawBody Raw Body | string | It is intended to save the json structure of the block editor data structure (if the value is Message Format = block) The parameter obtains only the JSON structure, otherwise it will not be transferred. Optional |
messageFormat Message Format | string | It defines the manner of creating a letter. 1 - If you transfer the 2 - If you transfer the 3 - If you transfer the Optional |
lang Lang | string | Two-letter language code for the string with the unsubscribe link that is added to each letter automatically.
If it is not specified, the language code from the API URL is used.
In addition to the string with the unsubscribe link, this language also affects the interface of the unsubscribe page. Languages en, it, ua and ru are fully supported, and in case of some other languages (da, de, es, fr, nl, pl, pt, tr), the string with a link will be translated, and the control interface will be in English. Optional |
templateId Template Id | string | ID of the user letter template created before, on the basis of which a letter can be created. If you have transferred this parameter, you may skip the mandatory Subject, Body, as well as Text Body and Lang parameters. These values will be taken from the corresponding parameters of the template the id of which was specified. If any of the above parameters is still transferred, the system will ignore the parameter that is taken from the template parameters, and the parameter explicitly transferred in this method will be used. Optional Dynamic |
systemTemplateId System Template Id | string | ID of the system letter template created before, on the basis of which a letter can be created. If you have transferred this parameter, you may skip the mandatory Subject, Body, as well as Text Body and Lang parameters. These values will be taken from the corresponding parameters of the template the id of which was specified. If any of the above parameters is still transferred, the system will ignore the parameter that is taken from the template parameters, and the parameter explicitly transferred in this method will be used. If none of the Template Id or System Template Id parameters is specified, templates will not be used to create the letter. Optional Dynamic |
wrapType Wrap Type | string | Alignment of the message text on the specified side. If the argument is missing, the text will not be aligned. Optional |
categories Categories | string[] | A list of letter categories. 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-email-message
- Version
- 0.0.3
- App
- Selzy
- Authentication
- API key
- Read-only
- No
- Destructive
- No
- Open world
- Yes
- Source
- View on GitHub ↗