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 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
- Set up the Inbound Parse in Sendgrid as per the following:
- Setup the MX in my DNS as per the following:
- 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! 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!
@fayewatson. Thanks a lot for your help!!! I hope it works.
@Sheila123 My pleasure!! 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.
Thank you @dan1! 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…
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: https://www.integromat.com/en/integrations/gateway/sendgrid. I haven’t tried it before but it may be a bit easier!
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!
Thank you for the suggestion @fayewatson!
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:
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!
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!
I would help, but I stopped using Sendgrid about a year ago and don’t really remember anymore.