View as Markdown
Postmark icon

Postmark ACTION

Send Email With Template

Send a single email with Postmark using a template See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Postmark account once, then configure and run Send Email With Template 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: "postmark-send-email-with-template",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    postmark: { authProvisionId: "apn_xxxxxxx" },
    templateAlias: "Template",
    templateModel: "Template Model",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Send Email With Template inputs
Property Type Description
templateAlias Template string
The template to use for this email.
Required Dynamic
templateModel Template Model object
The model to be applied to the specified template to generate the email body and subject.
Required
fromEmail "From" email address string
The sender email address. Must have a registered and confirmed Sender Signature. To include a name, use the format 'Full Name <sender@domain.com>' for the address.
Required
toEmail Recipient email address(es) string
Recipient email address. Multiple addresses are comma separated. Max 50.
Required
ccEmail CC email address(es) string
Cc recipient email address. Multiple addresses are comma separated. Max 50.
Optional
bccEmail BCC email address(es) string
Bcc recipient email address. Multiple addresses are comma separated. Max 50.
Optional
tag Tag string
Email tag that allows you to categorize outgoing emails and get detailed statistics.
Optional
replyTo "Reply To" email address string
Reply To override email address. Defaults to the Reply To set in the sender signature.
Optional
customHeaders Custom Headers string[]
List of custom headers to include.
Optional
trackOpens Track Opens boolean
Activate open tracking for this email.
Note: the email must have HTML Body to enable open tracking.
Optional
trackLinks Track Links string
Activate link tracking for links in the HTML or Text bodies of this email.
Optional
attachments Attachments string[]
Each attachment should be a string with the parameters separated by a pipe character |, in the format: Name|Content|ContentType. Alternatively, you can pass a string representing an object. All three parameters are required:

Name - the filename with extension, i.e. readme.txt
Content - the base64-encoded string with the binary data for the file, i.e. dGVzdCBjb250ZW50
ContentType - the MIME content type, i.e. text/plain

Example with pipe-separated parameters: readme.txt|dGVzdCBjb250ZW50|text/plain
Example with JSON-stringified object: {"Name":"readme.txt","Content":"dGVzdCBjb250ZW50","ContentType":"text/plain"}
Optional
metadata Metadata object
Custom metadata key/value pairs.
Optional
messageStream Message stream string
Set message stream ID that's used for sending. If not provided, message will default to the outbound transactional stream.
Optional
inlineCss Inline CSS boolean
By default, if the specified template contains an HTMLBody, Postmark will apply the style blocks as inline attributes to the rendered HTML content. You may opt-out of this behavior by passing false for this request field.
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
postmark-send-email-with-template
Version
0.0.6
App
Postmark
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes