Postponed on #3470738: Brevo newsletter (un)subscribe (via SDK)

Problem/Motivation

Webforms are super popular in Drupal and Brevo module should provide webform integration in a brevo_webform submodule.

It should allow adding a checkbox element to subscribe to the selected newsletter on form submission. Maybe this also needs a dedicated webform handler, I'm not sure about the most flexible architecture here. Maybe this is already solved for other newsletter modules?

It might make sense to sponsor @jrockowitz (see https://www.drupal.org/project/webform) as Brevo for a smart implementation (and because he and open source is worth the donation!)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork brevo-3471021

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

anybody created an issue. See original summary.

anybody’s picture

Title: Webform newsletter subscription checkbox & handler » Webform newsletter subscription integration checkbox & handler
Issue summary: View changes
Status: Active » Postponed
anruether’s picture

anybody’s picture

Thank you @anruether! Nice, I created #3553922: Join forces and merge this into the Brevo module? accordingly. What do you think?

anruether’s picture

@anybody As a sitebuilder I appreciate if I only have to enter my credentials once :)

kensae’s picture

Since there has been no response to the issue regarding the brevo_webform_handler, should we move forward and begin developing the handler ourselves?

anybody’s picture

@kensae yes please feel free to do that! You can still try contacting https://www.drupal.org/project/brevo_webform_handler about the issue and leave a note there.

renrhaf made their first commit to this issue’s fork.

renrhaf’s picture

Status: Postponed » Fixed

Merged into 1.0.x ✅

The Brevo newsletter subscription webform handler is now integrated directly into the Brevo module (brevo_contact), reusing the shared ContactsApiClientHelper so the module's single API key is used — per the "join forces" discussion in #3553922.

Features: email element mapping, one or more contact lists (fetched live), optional opt-in checkbox gating, attribute mapping, and double opt-in. Subscription runs in postSave() on completed submissions.

Includes a kernel test (subscription, opt-in gating, missing email, double opt-in) and config schema. The MR also cleaned up some pre-existing PHPCS naming and a PHPStan ignore so the module is fully green.

Thanks to @anybody, @stijnstroobants, @anruether and @kensae from the brevo_webform_handler project whose module and discussion led to this. This may also let us deprecate the contrib brevo_webform_handler in favour of the in-module handler (#3553922).

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • renrhaf committed a5f63104 on 1.0.x
    Issue #3471021 by renrhaf: Add Brevo newsletter subscription webform...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.