[New Free Plugin] NodeMailer Email Parser

Ever been annoyed by the tree structure of the RFC 5322 specification for emails? Not looking forward to building a depth first recursive tree search in Bubble to find your attachments? Just wish all your attachments could be in one list? Introducing the NodeMailer Email Parser. A thin wrapper around the Node.js mailparser module supported by the NodeMailer project.

This plugin contains a single Server Side Action that accepts a raw base 64 encoded email and returns a flattened structure of Bubble native lists. The returns includes lists of all the usual headers, “To”, “From”, “CC”, etc… and most important 3 lists for attachments, “File Names”, “Content Types”, and “Raw Base 64 Encoded Content”.

It’s a great alternative to trying to disentangle Gmail’s recursive MessagePart object . Just pass the Raw field in and get Bubble native lists out!


Hi @aaronsheldon thanks for creating this!

Can you share some info about how to pass through emails as inputs?

I’m getting stuck within Gmail’s API with Authentication and sending watch( ) requests to subscribe to webhooks to get push notifications for inbound emails.

It appears you need to use one of their client libraries to make the Auth and Sub requests, which makes it tough to do in Bubble without writing a plugin…

Any ideas? Thanks!

I’m using it and really like it. The thing is that you have to put the email as raw mime data, encoded in base64. Then, it’ll process everything with attachments.

1 Like

Thanks jumping in! But I’m one step behind you…

What is the original source of your emails? Meaning how are you getting the raw into Bubble in the first place?

That’s what I’m trying to solve for first.

Oh… You have different options… Postmark, Sendgrid, AWS SES all offer APIs to send data to Bubble. So, you register one of these services, get your inbound domain setup with them (i’m using AWS SES, cheapest but hardest to setup) and setup an API workflow in Bubble that will trigger on the POST request from one of these services…

My setup is the follow : Custom subdomain is registered at my DNS with AWS SES “cname” and “mx” settings. Got a catch all rule for every emails sent to that subdomain (you could make a rule for just one address if you wanted). When email is received, SES stores the email in an S3 bucket AND sends a notification via HTTPS (api) to my bubble app. Then, in bubble : I parse the email and do what I need to do with it.

Oh also, if you want the absolute easiest solution : pipedream.com (it’s like zapier but better and cheaper). If the email address doesn’t mind, they even provide one… You can make a workflow that will receive email to a specific address (you could make forwarders to that address) and then send an API call to your bubble app. (i wrote this one last, but it’s def the easiest solution and their free plan is quite nice). The thing is that with this setup, you won’t even need the nodemailer plugin.


Appreciate the lengthy explanation!!

Postmark seems like the way to go. I already have the API setup for my transactional emails. Looks like their parsing feature is essentially free and provides a dedicated email address @postmark.com, so I don’t need to worry about using a new domain or Gmail or any other dependency.

Thanks again!!

1 Like