Hi maintainers,

First, thank you for this module — it's been essential for our site and use case.

I managed to put together a small Views integration (that was missing) that I'd love to offer as a contribution for you to fold into the Mailchimp Campaign submodule if you think it fits. I'm not a developer by trade and I don't want to take on the responsibility of maintaining a separate contrib project — I'd much rather see this become part of this excellent module under your stewardship than have it live as a standalone thing I can't properly support. It is simply a text format filter that allows for views to be configured in basic “table” format vanilla html. I have tested this and its working nicely!

What it does (see screenshot)

Lets editors embed any Views display inside Mailchimp campaign content using a token: Text filter needs to be checked on mailchimp campaign text format. Basic table format nothing fancy - but email is basic html -

```
[mailchimp_view|view=YOUR_VIEW_NAME|display=block_1|limit=5]
```

At campaign send time it hooks into `hook_mailchimp_campaign_content_alter()`, runs the View, and injects the rendered HTML into the outgoing email. It's a true set-it-and-forget-it integration — recurring campaigns automatically pick up new content without anyone rebuilding the email each time.

Why it might be useful

Sending "upcoming events this week" or "latest articles" style emails currently requires editors to manually rebuild the campaign body for every send. Views is already how most sites express those lists, so leveraging it directly felt like the cleanest approach. I've seen this use case come up a few times in the community.

What's included

- Token renderer service with machine-name validation, argument count/length caps, and items-per-page limits
- Per-display access checks
- Absolute URL rewriting for email client compatibility
- Dedicated logger channel for troubleshooting
- Optional text filter to preview tokens in node output before sending
- Drupal 10.3+ and 11.x compatible, PHP 8 attribute-based plugin, no deprecated APIs

How I'd like to proceed

Forgive my ignorance here but have no idea how to navigate the complexities for contribution.

I'm happy to attach the code as a patch to this issue, or zip it (in full to for your team to review) and share it - however works best for you. I'll address any feedback you have, but after that I'd like to hand it over completely — please take authorship credit, rename it, restructure it, rewrite it, or discard parts of it as you see fit. Whatever makes it genuinely useful to the project is fine by me.

Let me know the best format for sharing the code and I'll post it here.

Thanks again for everything you do on this module.

CommentFileSizeAuthor
Screenshot 2026-04-21 193757.png8.33 KBback from 7

Comments

back from 7 created an issue. See original summary.

back from 7’s picture

Issue summary: View changes
back from 7’s picture

Issue summary: View changes
phenaproxima’s picture

Project: Drupal core » Mailchimp
Version: main » 3.2.0-rc5
Component: views.module » General