Rich Postmark Email Bubble Mobile

Demo to preview the plugin:

Introduction

Rich Postmark emails Bubble Mobile is a plugin built for the mobile version of the Bubble editor that lets you send transactional emails through the Postmark API directly from your mobile app — single emails, template-based emails, and batch emails to multiple recipients.
The plugin ships in two parts that work together:
  • A renderless Postmark element that runs on the client to assemble a Postmark‑ready JSON payload (including file attachments converted to base64, unsubscribe headers, and per‑recipient variable substitution for batch sends).
  • Four ready‑to‑use API Connector‑style actions (Send email, Send email extended, Send Template Email, Send Batch Email) that call the Postmark API using your Server Token.
Typical usage is to run one of the Postmark element’s actions to build the payload, then feed the resulting JSON into the matching API action to actually send the email.

Prerequisites

You must have an account with Postmark to interact with the API. Create your account at: https://postmarkapp.com/
You will also need:
  • A verified Sender Signature (or verified sending domain) in Postmark for every “From” address you plan to use.
  • Your Server API Token, found in Postmark under your Server → API Tokens.
Image without caption

How to setup

  1. Create a Postmark account and a Server, then open Server → API Tokens and copy the Server API Token.
  1. In the Bubble editor, open the plugin’s Plugin API / Connector tab and paste the token into the shared private key field (sent as the X-Postmark-Server-Token header on every API call).
    1. In Postmark, verify the Sender Signature (or domain) for each “From” address you intend to use — Postmark rejects sends from unverified senders.
      1. Drag the invisible Postmark element onto your mobile page — it has no visual output, it only needs to exist so its actions and states are available in your workflows.
      1. In a workflow, run one of the Postmark element’s actions (Build Send Payload, Build Template Payload, or Build Batch Payload) to assemble the JSON body.
      1. Listen for the Payload Ready event, then trigger the matching plugin API action (Send email, Send Template Email, or Send Batch Email) using the element’s Payload state as the request body.

      Plugin Element - Postmark

      The plugin contains one renderless visual element, Postmark, used to build the JSON payloads that are later sent through the plugin’s API actions.

      Element Actions

      Build Send Payload
      Build Template Payload
      Build Batch Payload

      Exposed States

      Name
      Description
      Type
      Payload
      Ready-to-send Postmark JSON body produced by the last Build action.
      Text
      Error
      Empty if the last build succeeded, otherwise the failure reason.
      Text
      Is Building
      True while the payload is being assembled (e.g. while attachments are downloading).
      Boolean

      Element Events

      Name
      Description
      Payload Ready
      Triggered when a payload has been built successfully.
      Payload Error
      Triggered when building the payload failed — check the Error state for details.

      Plugin Action Calls

      These actions call the Postmark API directly using your Server API Token (sent as the X-Postmark-Server-Token header).

      Workflow example

      Sending a single email

      1. Add the Postmark element to your page.
        1. On a button click, run Postmark’s Build Send Payload action with From, To, Subject, and Text/HTML Body filled in.
          1. When the element’s Payload Ready event fires, run the plugin’s Send email (or Send email extended, for more control) API action, passing Postmark's Payload as the request body.
            1. Use the returned MessageID / ErrorCode to confirm delivery, and show Postmark's Error state if Payload Error fires instead.

            FAQ

            How to use “Unsubscribe workflow endpoint” in the workflow

            💡
            Unsubscribe headers do not assure you of getting the “Unsubscribe” button on top of your emails. That is button is displayed depending on every email provider conditions that have to be met for that purpose. So we suggest you even with Unsubscribe headers in the email to keep the “Unsubscribe” link in your emails if you want to be sure the users will have that option.
            💡
            Usually unsubscribe is managed by Postmark, and if you want to implement your own Unsubscribe process as shown above, keep in mind that you have to get Postmark team approval for that.
            💡
            Unsubscribe managed by Postmark is shown here.
            Image without caption

            Changelogs