← Postmark

Send Email With Template with Postmark API

Pipedream makes it easy to connect APIs for Postmark and 900+ other apps remarkably fast.

Trigger workflow on
HTTP requests, schedules and app events
Next, do this
Send Email With Template with the Postmark API
No credit card required
Into to Pipedream
Watch us build a workflow
Watch us build a workflow
7 min
Watch now ➜
Trusted by 250,000+ developers from startups to Fortune 500 companies:
Trusted by 250,000+ developers from startups to Fortune 500 companies

Developers Pipedream

Getting Started

Create a workflow to Send Email With Template with the Postmark API. When you configure and deploy the workflow, it will run on Pipedream's servers 24x7 for free.

  1. Configure the Send Email With Template action
    1. Connect your Postmark account
    2. Configure "From" email address
    3. Configure Recipient email address(es)
    4. Optional- Configure CC email address(es)
    5. Optional- Configure BCC email address(es)
    6. Optional- Configure Tag
    7. Optional- Configure "Reply To" email address
    8. Optional- Configure Custom Headers
    9. Optional- Configure Track Opens
    10. Optional- Select a Track Links
    11. Optional- Configure Attachments
    12. Optional- Configure Metadata
    13. Optional- Configure Message stream
    14. Select a Template
    15. Configure Template Model
    16. Optional- Configure Inline CSS
  2. Select a trigger to run your workflow on HTTP requests, schedules or app events
  3. Deploy the workflow
  4. Send a test event to validate your setup
  5. Turn on the trigger

Integrations

Send Email With Template with Postmark API on New Requests (Payload Only) from HTTP / Webhook API
HTTP / Webhook + Postmark
 
Try it
Send Email With Template with Postmark API on New Message from Discord API
Discord + Postmark
 
Try it
Send Email With Template with Postmark API on New Message In Channels from Slack API
Slack + Postmark
 
Try it
Send Email With Template with Postmark API on New Message in Channel from Discord Bot API
Discord Bot + Postmark
 
Try it
Send Email With Template with Postmark API on New Submission from Typeform API
Typeform + Postmark
 
Try it

Details

This is a pre-built, open source component from Pipedream's GitHub repo. The component is developed by Pipedream and the community, and verified and maintained by Pipedream.

To contribute an update to an existing component or create a new component, create a PR on GitHub. If you're new to Pipedream component development, you can start with quickstarts for trigger span and action development, and then review the component API reference.

Send Email With Template on Postmark
Description:Send a single email with Postmark using a template [(See docs here)](https://postmarkapp.com/developer/api/templates-api#email-with-template)
Version:0.0.1
Key:postmark-send-email-with-template

Code

import postmark from "../../postmark.app.mjs";
import common from "../common.mjs";

export default {
  ...common,
  key: "postmark-send-email-with-template",
  name: "Send Email With Template",
  description: "Send a single email with Postmark using a template [(See docs here)](https://postmarkapp.com/developer/api/templates-api#email-with-template)",
  version: "0.0.1",
  type: "action",
  props: {
    ...common.props,
    templateAlias: {
      propDefinition: [
        postmark,
        "templateAlias",
      ],
    },
    templateModel: {
      type: "object",
      label: "Template Model",
      description:
        "The model to be applied to the specified template to generate the email body and subject.",
    },
    inlineCss: {
      type: "boolean",
      label: "Inline CSS",
      description:
        "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: true,
    },
  },
  async run({ $ }) {
    const data = {
      ...this.getActionRequestCommonData(),
      TemplateAlias: this.templateAlias,
      TemplateModel: this.templateModel,
      InlineCSS: this.inlineCss,
    };
    const response = await this.postmark.sendEmailWithTemplate($, data);
    $.export("$summary", "Sent email with template successfully");
    return response;
  },
};

Configuration

This component may be configured based on the props defined in the component code. Pipedream automatically prompts for input values in the UI and CLI.
LabelPropTypeDescription
PostmarkpostmarkappThis component uses the Postmark app.
"From" email addressfromEmailstring

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.

Recipient email address(es)toEmailstring

Recipient email address. Multiple addresses are comma separated. Max 50.

CC email address(es)ccEmailstring

Cc recipient email address. Multiple addresses are comma separated. Max 50.

BCC email address(es)bccEmailstring

Bcc recipient email address. Multiple addresses are comma separated. Max 50.

Tagtagstring

Email tag that allows you to categorize outgoing emails and get detailed statistics.

"Reply To" email addressreplyTostring

Reply To override email address. Defaults to the Reply To set in the sender signature.

Custom HeaderscustomHeadersstring[]

List of custom headers to include.

Track OpenstrackOpensboolean

Activate open tracking for this email.

Note: the email must have HTML Body to enable open tracking.

Track LinkstrackLinksstringSelect a value from the drop down menu:NoneHtmlAndTextHtmlOnlyTextOnly
Attachmentsattachmentsstring[]

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"}

Metadatametadataobject

Custom metadata key/value pairs.

Message streammessageStreamstring

Set message stream ID that's used for sending. If not provided, message will default to the outbound transactional stream.

TemplatetemplateAliasstringSelect a value from the drop down menu.
Template ModeltemplateModelobject

The model to be applied to the specified template to generate the email body and subject.

Inline CSSinlineCssboolean

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.

Authentication

Postmark uses API keys for authentication. When you connect your Postmark account, Pipedream securely stores the keys so you can easily authenticate to Postmark APIs in both code and no-code steps.

About Postmark

Application Email Service with Exceptional Delivery

More Ways to Use Postmark

Triggers

New Email Opened from the Postmark API

Emit new event when an email is opened by a recipient (See docs here)

 
Try it
New Inbound Email Received from the Postmark API

Emit new event when an email is received by the Postmark server (See docs here)

 
Try it

Actions

Send Single Email with the Postmark API

Send a single email with Postmark (See docs here)

 
Try it