PayloadSolutions

Resend Broadcasts

Newsletters for Payload CMS on Resend Broadcasts. Any collection becomes a subscriber source, lists become Resend segments, and campaigns are written, previewed as any subscriber, tested and sent from the admin.

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

Alpha — in testing. Resend Broadcasts 0.1 works end to end against a Resend mock and is now being tested against the real Resend API. Expect rough edges and breaking changes before 1.0, and try it on a test Resend team before you send to real subscribers. Tell us what breaks.

Most projects already keep the people they want to write to in Payload — users, customers, a newsletter sign-up collection. Resend Broadcasts turns those collections into Resend contacts and segments, and gives your team a place in the admin to write a campaign, see it exactly as one particular subscriber will, send themselves a test, and send or schedule it through Resend Broadcasts.

payload.config.ts
resendBroadcastsPlugin({
  from: 'Acme <[email protected]>',
  sources: [
    { collection: 'users' },
    { collection: 'subscribers', defaultSubscribed: true },
  ],
})

That is the whole setup. Every save of a users or subscribers document keeps its Resend contact current. An editor creates a List — "Everyone on the Pro plan" — which becomes a Resend segment, writes a Campaign in Lexical with {{firstName|there}} in it, opens Preview & send, clicks through the people in the list to check the copy, and sends.

Preview & send of a campaign: pick a list and a subscriber on the left, the email as that subscriber on the right
Preview & send of a campaign: pick a list and a subscriber on the left, the email as that subscriber on the right
Preview any campaign as any subscriber on the list, exactly as Resend will fill it in.

What each side owns

Payload ownsResend owns
who your subscribers are, their names and propertiesdelivery, at scale, from your verified domain
which documents belong to which listthe per-contact unsubscribe link and preference page
the campaign copy, its preview and its test sendsfilling each contact's variables into the broadcast
the design — a React Email template in your reposkipping everyone who unsubscribed

Payload is the source of truth for who exists and who is in which list. Resend is the source of truth for unsubscribes: when a reader unsubscribes through Resend's link, a webhook switches their document off in Payload, and a resync never subscribes them again.

How it fits together

PieceWhat it is
resendBroadcastsPlugin()adds the fields, hooks, collections, global, endpoints and admin views
a sourcea collection whose documents are subscribers; email, name and subscribed are added if missing
Lists (newsletter-lists)one Resend segment each: a source, optionally narrowed by a Payload query
Campaigns (newsletter-campaigns)subject, preview text and a Lexical body, sent to one list
Preview & sendthe campaign's tab: pick a list and any person in it, test, send or schedule
Newsletter Settingssender, reply-to, site name, the footer, the default test recipient
Sync runsa record of every reconciliation with Resend
payload.resendBroadcaststhe same operations from your own code

What you get

  • Contacts kept in step on every save, email change and delete — names split for Resend, custom properties pushed with them.
  • Lists as Resend segments, filled in the background when created or refiltered, and kept current as documents change.
  • A preview that renders the campaign for any real subscriber, with a searchable picker and next/previous stepping through the list.
  • Variables with fallbacks — {{firstName|there}} — that become Resend's own {{{contact.first_name|there}}} placeholders at send time.
  • An Image block for uploads from your media collection, sized for email, with absolute URLs, and a check that refuses to send images readers could not load.
  • Test sends through Resend's email API, filled in as the subscriber you picked.
  • Send now or schedule, cancel a scheduled send, and pick up the delivered status.
  • Unsubscribes synced back by a signed webhook, and a full resync for existing data or drift.
  • An in-memory Resend mock for development and tests, so nothing needs a Resend account until you point it at one.

What it is not

It is not an email builder: the design is a React Email component your developers own, and the body is written in a deliberately small Lexical editor. It does not do transactional email — that is what Transactional Emails is for, and the two share the same template contract. It does not report opens and clicks inside Payload yet; Resend's dashboard has them for every broadcast.

Status

0.1.0 — alpha, in testing, published to npm; expect breaking changes before 1.0. Package @payload-solutions/plugin-resend-broadcasts, MIT. Resend is a trademark of Resend, Inc. This plugin is not affiliated with or endorsed by Resend.

On this page