Forum Academy Marketplace Showcase Pricing Features

SendGrid Inbound Parse

@Sheila123 Yes that is possible! :slight_smile: On the page where you will allow Users to reply via email, you would specify in the “Send Email” action that the User can reply. Then, make sure the “reply to” email address alias contains the unique ID of the thing that the User can reply to (such as the Thread’s unique id), a + sign, and that Users unique ID – so it becomes: [email protected].

Then you can use/lookup those unique IDs in Bubble using regex. One way to get the Thread’s unique ID from the reply-to email address would be to use the regex pattern:

That will give you everything before the “+” sign of the reply-to email address.

To get the part between the “+” sign and the “@” sign, you can use the regex pattern:
Then, add a “:find and replace” to that expression to remove the + sign from the regex result, and another “find and replace” to remove the @ sign from the regex result. My apologies, I’m not sure if this is the best approach but I couldn’t find a regex pattern which pulled the part of the alias between the + and @ sign of the reply-to address. If anyone knows of a better way to do this, please let me know! :slight_smile:


Wow. Thanks for all your help. You are awesome!

1 Like

Do you mind sharing how you have your API workflow setup? I seem to be doing something off. Thanks again.

@Sheila123 I actually don’t have this setup anymore but I think I can remember how I set it up originally :slight_smile: Have you already set up the webhook in your SendGrid account with the Bubble API endpoint? Or that’s the part that isn’t working yet?

@fayewatson So far I have

  1. Set up the Inbound Parse in Sendgrid as per the following:

  1. Setup the MX in my DNS as per the following:

  1. I setup the Endpoint in Bubble API as per the following:

But when I setup the workflows for the API (create message, add to conversation) I am not sure how to pull the data in.

Ok great! :slight_smile: For the Bubble API endpoint, did you click “Detect data” and did it run successfully? I think if it has run successfully, the “Modify Types” button should be enabled. I remember this can take a minute or two for the response data to show up:

Once the data is detected successfully, you’ll be able to use “Request data's body's text”, in your Create a New Message action to save that as the new Message’s text field.

And you can use “Request data's body's to:extracted with Regex” to obtain either the unique ID of the Thread from the reply-to address or the unique ID of the User from the reply-to address. Let me know if the Detect Data doesn’t work, I know that was definitely the trickiest part!

1 Like

@fayewatson. Thanks a lot for your help!!! I hope it works. :slight_smile:

@Sheila123 My pleasure!! :slight_smile: Let me know if it doesn’t!

@fayewatson - I’m glad to see this thread surfaced. Figuring out SendGrid’s inbound parse has been on my wish list of things to experiment with for a while. Should be much easier with your insights here. :slight_smile:

1 Like

Thank you @dan1! :slight_smile: So glad to hear it was helpful! I have been meaning to try Zapier’s email parser to see if that would work as well (since it may be easier to setup!). The video looks interesting but I’m not sure if it works with SendGrid. Will report back if it does!


I am new to bubble and looking to build an app which can handle replies, I think relying on message Id while sending is more robust?

Also can I ask someone from this forum to help me out with this integration?

Can you set this up as a support/helpdesk type system? Once an email comes in it sends an automatic reply notifying the user that a support request has been created, then from the bubble interface be able to reply to reply to that email, have the user reply again, etc…

1 Like

Hey @fayewatson, I know this thread is a bit old but I’m following the same set up and when I try to Detect Request Data, I get a popup that says “Trigger a request to” with a URL to copy. Did you copy and paste that in another browser? When I do that I’m getting a wrong error message stating that the method should be POST (screenshot below). Is there a way to workaround this?

Also, when I send the test email, how do I know it successfully sent?


Hi @johnny I haven’t set that up specifically before but I believe it would be possible! I remember having some trouble parsing the most recent message in an email thread that contained multiple replies. This may be easier than it used to be now in Zapier. Alternatively, it may be worth looking into Integromat for that purpose (instead of Zapier) since they seem to work well with SendGrid: I haven’t tried it before but it may be a bit easier! :slight_smile:

Hi @JP29 I think this is referring to the API Connector; is the API request for the Zapier webhook set to “GET”? If so, changing that to “POST” should fix the error. After setting it to POST, try clicking the ‘Request Data’ button again, and then send a test email. Within a minute, Bubble will recognize the request after the email is sent and let you modify the API workflow request types. That should work but let me know if not! :slight_smile:

1 Like

Thank you for the suggestion @fayewatson!

1 Like

Hey @fayewatson, thanks for the response! This is actually for setting up SendGrid, without Zapier. Here is my API endpoint in Bubble and the options I see:

1 Like

Ok, I figured out the issue. I was following the format of the “Destination URL” set up in Sendgrid in the screenshot posted above (modifying it for my app), but you have to set it to the one specified in the popup in Bubble after you click “Detect Data” which was a different format altogether.

Note: my app is setup using my own domain but in the Development view it uses for some reason. Not sure if I’ll have to change this URL for the live version? Just wanted to pull the parameters using Detect Data for now though.

You can also set this up manually using the parameters in Sendgrid’s documentation if all else fails.

Hope this helps anyone else that might run into this problem as well!

Bubble URL:

Sendgrid URL:


Hi @fayewatson, one more follow up : )

For the regex pattern, in the “reply-to” address, were you able to extract the Thread’s unique ID and add it to the new message thread on your app?

I’m using the format [email protected]. and for some reason nothing is extracting when I use the regex pattern /[^+]*/ (but I verified it works with a Regex Tester). Is there anything else I could be missing?

Also did you ever figure out how to extract only the Message’s text from the email and remove the quoted text from the email thread?


I have been able to successfully grab the data when I select ‘detect data’ but it doesn’t show up in my DB after any other instance.

Hoping for some help!

@JP29 @johnny any suggestions??