spotler
Spotler integrates your Drupal site with the Spotler (formerly Webpower)
email marketing platform, letting visitors subscribe to your newsletters
straight from your pages — no copy-pasted embed codes or external forms.
If you send newsletters through Spotler and want a native, on-brand signup
experience on your Drupal site, this module connects the two over Spotler's
REST API. Each Spotler campaign acts as a separate newsletter or
audience: a visitor picks a campaign, enters their email address, and Spotler
takes over with its own double opt-in confirmation. You stay in Drupal; Spotler
stays the source of truth for your contacts.
Features
- Newsletter signup paragraph — drop a subscribe form onto
any page built with Paragraphs. Submits over AJAX with inline success/error
feedback, and editors can scope it to one or more campaigns. With a single
campaign the radio list collapses to a clean confirmation line. - Sent mailings paragraph — show a list of recent
newsletters you sent through Spotler (subject + date), each linking to a
rendered preview, so visitors can browse your newsletter archive. - Public mailing viewer — a sandboxed preview of a sent
mailing. Spotler's email template is rendered in an isolated, script-free
Twig environment, with a safe fallback if a template cannot be parsed. - Webform handler — add a "Spotler subscribe" handler to
any Webform for custom signup flows, with configurable email, language and
campaign elements plus a field map to Spotler contact fields. - Spam protection — optional Honeypot and/or Antibot
integration, auto-detected and individually toggleable in the settings. - GDPR consent — an optional, configurable rich-text
consent checkbox on the subscribe form. - Developer service — a
spotler.newsletter_manager
service exposinggetCampaigns(),subscribe()and
getSentMailings()with typed value objects for custom code. - Privacy-aware logging — email addresses and OAuth
credentials are scrubbed from log messages; a status-report check tells you
whether the integration is fully configured. - Dutch (
nl) translations included.
Use this module when your newsletters live in Spotler but you want signup,
archive and preview to feel like a native part of your Drupal site — on landing
pages, in campaign footers, or behind a custom Webform.
Post-Installation
After enabling the module:
- Store your API credentials. Go to
Configuration → System → Keys and add a key of type
Authentication (multivalue) containing your Spotler
client_idandclient_secretas JSON. Use the
Configuration provider for testing, or Environment /
File in production so the secret never lands in your config
export. - Configure the module. Go to
Configuration → Web services → Spotler settings
(/admin/config/services/spotler), select your credentials key,
enter your API base URL (e.g.https://your-tenant.webpower.eu),
and click Save and test connection to verify it reports the
number of campaigns found. - Place the paragraphs. The module ships two paragraph
types — Spotler newsletter signup and Spotler sent
mailings. Opt them in on the Paragraphs reference field where you want
to use them (for examplefield_paragraphson a landing page),
then add them to your content like any other paragraph. - Optional — Webform. For custom flows, add the
Spotler subscribe handler under a Webform's
Settings → Emails / Handlers.
There is no new content type to create and no text-format changes are
required. Once the connection test passes and a paragraph is placed, signups
flow straight into Spotler.
Additional Requirements
- Drupal 10 or 11, PHP 8.1 or higher.
- Key — stores the OAuth2
credentials securely. - Paragraphs —
provides the signup and mailings paragraph types. - A Spotler / Webpower account with REST API access (OAuth2
client-credentials).
Recommended modules/libraries
- Webform — only needed
if you want to use the Spotler subscribe Webform handler. - Honeypot — adds a
hidden honeypot field and minimum-submission-time check to the subscribe
form when enabled in the settings. - Antibot — blocks
submissions from clients without JavaScript when enabled in the
settings.
Similar projects
Webpower targets the
same platform (Spotler was formerly Webpower) but takes an
administrator-oriented approach: it exposes Spotler forms as configurable blocks
with field mapping. Spotler is visitor-facing instead — it provides ready-made
Paragraphs, an AJAX signup experience, a public newsletter archive and mailing
viewer, and accessibility-focused markup. Choose this module when you want a
native subscription experience on your pages rather than an embedded
admin-configured form.
Supporting this Module
Contributions, issues and patches are welcome through the project's issue
queue.
Community Documentation
See the project's README.md for full configuration details,
including the mailing viewer, asset base URL, Content-Security-Policy and
RSS-driven mailing setup.