plugin resend broadcasts logo

plugin resend broadcasts

by mpresecan
payload-solutions

Newsletters from the Payload admin: any collection becomes subscribers, then compose, test and send via Resend.

Email
v3
^3.88.0
MIT

Overview

Summary generated from the README

Turns any Payload collection with an email field into a subscriber source kept in sync with Resend contacts. Lists created in the admin become Resend segments, and campaigns are written in Lexical, previewed per subscriber, tested, then sent or scheduled as Resend broadcasts. Unsubscribes return through a signed webhook. Requires a Resend API key, a verified domain and Payload 3.88 or newer.

Features

  • Any collection becomes a subscriber source synced with Resend contacts
  • Admin-defined lists map to Resend segments, optionally filtered by a Payload query
  • Campaigns composed in Lexical with an optional Image block
  • Per-subscriber preview with personalization variables resolved by Resend at send time
  • Send a test, send now or schedule from a Preview and send tab
  • Signed webhook handles unsubscribes and contact updates

Use cases

  • Run a newsletter from the Payload admin using Resend for delivery
  • Email segments of existing users who opted in, filtered by plan or other fields
  • Preview and test a campaign as a specific subscriber before scheduling it

From the author

Newsletters for Payload CMS on Resend Broadcasts: any collection becomes a subscriber source, admin-defined lists sync to Resend segments, and campaigns are composed, previewed per subscriber, tested, scheduled and sent from the admin.

Installation

npm i @payload-solutions/plugin-resend-broadcasts

2

Stars

0

Forks

0

Open Issues

Today

Last Updated

0

Weekly Downloads

v0.1.0

npm Version

599.0 KB

Unpacked Size

3

Dependencies

Repository stars

Trends appear after 7 days of data. Daily snapshots have not started yet.

Shared by 5 plugins in mpresecan/payload-solutions.

npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

63/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/1356812914-plugin-resend-broadcasts.svg)](https://payloaddirectory.dev/plugins/1356812914-plugin-resend-broadcasts)
HTML
<a href="https://payloaddirectory.dev/plugins/1356812914-plugin-resend-broadcasts"><img src="https://payloaddirectory.dev/badge/1356812914-plugin-resend-broadcasts.svg" alt="Payload Directory"></a>
Updated Oct 26, 2026Created Sep 4, 2026Published Oct 24, 2026

README

@payload-solutions/plugin-resend-broadcasts

Resend Broadcasts — admin screenshot

Newsletters for Payload CMS on Resend Broadcasts. Any collection with an email becomes a subscriber source kept in step with Resend contacts; lists created in the admin become Resend segments; campaigns are written in Lexical, previewed as any person in the list, tested, and sent or scheduled as a Resend broadcast. Unsubscribes come back by signed webhook.

Full documentation: https://payload.solutions/docs/plugins/resend-broadcasts

Install

pnpm add @payload-solutions/plugin-resend-broadcasts

Peer dependencies: payload ^3.88, @payloadcms/richtext-lexical, @payloadcms/ui, react, react-dom. The resend SDK and React Email ship with the plugin.

// payload.config.ts
import { resendBroadcastsPlugin } from '@payload-solutions/plugin-resend-broadcasts'

export default buildConfig({
  collections: [Users, Subscribers],
  plugins: [
    resendBroadcastsPlugin({
      from: 'Acme <[email protected]>', // a domain verified in Resend
      sources: [
        { collection: 'users' }, // opt-in checkbox added, off by default
        {
          collection: 'subscribers', // email, name and subscribed added if missing
          defaultSubscribed: true,
          properties: { plan: { type: 'string', value: ({ doc }) => doc.plan } },
        },
      ],
    }),
  ],
})
RESEND_API_KEY=re_...            # full access: contacts, segments, broadcasts
RESEND_WEBHOOK_SECRET=whsec_...  # webhook → /api/resend-broadcasts/webhook, events contact.updated + contact.created
pnpm payload generate:importmap && pnpm payload generate:types

Add media: { collection: 'media' } for an Image block in campaigns; the media collection must be readable without a login, because mail clients fetch images anonymously.

In the admin: Newsletter → Lists (Resend segments, optionally filtered with a Payload query), Campaigns (with the Preview & send tab), Sync runs and Newsletter Settings.

Write {{firstName|there}} in a campaign and the preview shows each subscriber's own value; at send time it becomes Resend's {{{contact.first_name|there}}}, so the campaign is rendered once and Resend personalises it per contact.

Screenshots

Writing a campaign

Campaigns are written in Lexical, with an Image block.

Send a test, send now or schedule

Send a test, then send now or schedule — with every variable explained.

Lists as Resend segments

Lists become Resend segments and stay in sync.

The campaigns list

Drafts, scheduled and sent campaigns.

More in the documentation: https://payload.solutions/docs/plugins/resend-broadcasts

Develop

pnpm dev          # admin on http://localhost:3500/admin, [email protected] / test
pnpm test:unit    # tokens, resolver, options
pnpm test:int     # real Payload + SQLite against the in-memory Resend mock
pnpm test:e2e     # Playwright against `pnpm dev`

Without RESEND_API_KEY the dev app talks to an in-memory Resend served at /resend-mock (see dev/resend-mock). /resend-mock/__mock/state shows what it received; POST /resend-mock/__mock/contacts/<email>/unsubscribe plays a reader unsubscribing and delivers a signed webhook back to the app.

License

MIT. Resend is a trademark of Resend, Inc.; this plugin is not affiliated with or endorsed by Resend. Payload, the Payload design, and related marks, designs, and logos are trademarks or registered trademarks of Payload CMS, Inc. in the U.S. and other countries.

Similar plugins