Forum Academy Marketplace Showcase Pricing Features

SendGrid Inbound Parse

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!

3 Likes

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?
https://www.mailgun.com/blog/tracking-replies-in-mailgun-or-any-other-email

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?

Thanks!

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: https://www.integromat.com/en/integrations/gateway/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 bubbleapps.io 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:
image

2 Likes

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?

Thanks!
JP

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??

Hey @cameron1,

I would help, but I stopped using Sendgrid about a year ago and don’t really remember anymore.

1 Like

No worries! :slight_smile: