Possible to email all users with active subscriptions? Using Stripe plugin

I’m using the Stripe plugin and I know it keeps track of each user’s subscription status. I’m already using workflows “Do when Current User’s Stripe Customer subscription’s Status is empty” to kick out non-subscribers.

I want to make a page where app admins can write an email to send to all users with active subscriptions to let them know about app updates, scheduling changes, etc.

I have input fields for the body and subject line, and a send button that triggers a workflow, and I’m using Do A Search for > Users > then constraints - but there’s no “subscription status” constraint. That seems to only work as a constraint for Current User, not a search for all users.

Any ideas to get this done? Am I missing something?

Update: totally redid things, and have this mostly working - or at least it should be. I seem to have some deliverability issues to Google Workspace emails with Sendgrid. Still troubleshooting.

I’m using webhooks from Stripe to keep track of active/canceled subscriptions as described in this video: Managing Subscriptions with Stripe - Bubble.io Tutorial - YouTube

Oddly, to get access to subscription status, it seems we can’t use the built-in “Stripe Customer’s subscription status” and instead need to webhook + make our own field in the User data.

I’m handling emails as described in this video: How to Send Emails from Your Bubble.io App to Multiple Recipients - YouTube

Emails are arriving as expected to my gmail account, but NOT to two gmail-powered Google Workspace paid accounts. If anyone has had that problem and solved it, I’d love to know.

Update 2: It’s actually going to those Google Workspace emails - what’s going on is it’s only sending to the current user that has drafted the email. Still haven’t figured this out.

Strange… you mentioned being aware of Bubble’s native Stripe Subscription Status tracking but opted to use webhooks anyway… Why not setup a backend trigger that runs whenever a User’s Stripe Subscription status changes to unpaidpast_due or whatever it may be?

Sounds great, the answer is basically my own incompetence. I found a YouTube video detailing how to do it with webhooks, and did not find a YT video describing to do it with the native version, so in the interest of getting the functionality done I went with what I had instructions for.

I first tried to use the native Stripe status as a constraint when generating my list of people to email - but it’s not available as a constraint for some reason. That’s actually very confusing to me, why would we not be able to access the Stripe status in so many basic Bubble functions? I can make a workflow on a page, “if current user’s Stripe status is empty, [kick them out of the page.]” But I can’t say, “do a search for users who’s Stripe status is not empty.” Odd.

Anyway after that I moved on to creating a variable I could use as a constraint, and just followed the instructions for doing it with webhooks.

If you have a link to instructions on how to do it with the native version, I’d probably make the switch.

And just for context, I was handed a barely functioning Bubble project when my client’s previous “coder” bailed, but we had a couple hundred subscribers so I had to keep it running rather than starting from scratch. I’m reasonably tech savvy and have built websites, but a lot of Bubble’s functionality is all new to me, and fairly confusing. So I’m sure I’m FAR from best practices and just hacking things together.

1 Like

Hey, @tryingtomakeanapp.

Correct, it’s not available as a first-tier constraint. But you can “Do a Search for Users” and then a “:filtered”. Then, the “Stripe Customer subscription” can be used as a constraint.

1 Like