Email with button to dynamic URL from Bubble

Hi! What’s the easiest way to add a button to an email sent from Bubble that send people to a dynamic hyperlink (a fixed part and a “token” part at the end of the URL)?

I thought about some options:

  • Using HTML to build the button --> Not HTML is allowed
  • Using a image faking a button --> Images cannot be linked to a URL (to send to a website when clicking on it)

I’d like to avoiding the complexity of 3rd party tools (Sendgrid, Sendinblue), and also I think those tools don’t allow to create a dynamic hyperlink, right?

Thanks a lot!

2 Likes

I would recommend using a 3rd party service. Sending emails is not as simple as you think. Or let me rephrase: sending is easy - making sure they are received and tracking this is the hard part. We have used sendgrid with an html template where the token is sent via the api call from bubble. Works perfectly :slight_smile:

2 Likes

Thanks for your advice, @soeren! OK, I will give a try to Sendgrid using dynamic tokens via API Connector :slight_smile: Thanks again!

Hi @soeren (@soeren1)

Is there any chance you could show your work flow for this?
I have a sendgrid account hooked up to my app, it has an HTML template but I have absolutely no idea how to integrate buttons within that - did you follow any guides when configuring yours?
-any advice would be greatly appreciated!

Alex

Hi,

I have a placeholder holding the Bubble ID that I want appended to the URL of the button in the email. This is -inspection_id- (see below). When I make the call to Sendgrid from Bubble, I put this in the “substitutions”:
“-inspection_id-”:“thing_in_bubble’s unique_id”

And in my email template in Sendgrid, I define the button here (note the -inspection_id- is appended to the URL of the A tag:

<table border="0" cellpadding="0" cellspacing="0" class="btn btn-primary" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;box-sizing:border-box;width:100%;"> <tbody> <tr> <td align="left" style="font-family:sans-serif;font-size:14px;vertical-align:top;padding-bottom:15px;"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse:separate;mso-table-lspace:0pt;mso-table-rspace:0pt;width:100%;width:auto;"> <tbody> <tr> <td style="font-family:sans-serif;font-size:14px;vertical-align:top;background-color:#ffffff;border-radius:5px;text-align:center;background-color:#4FB25E;"><a href="https://app.qarmainspect.com/qc-report/-inspection_id-" style="text-decoration:underline;border:solid 1px;border-radius:5px;box-sizing:border-box;cursor:pointer;display:inline-block;font-size:14px;font-weight:bold;margin:0;padding:12px 25px;text-decoration:none;" target="_blank">See Report and Reply &rarr;</a></td> </tr> </tbody> </table> </td> </tr> </tbody> </table>

3 Likes

this is super though I think i may be a quite bit further behind in setting this up than I thought.
With your sendgrid API key - are you inserting it in the ‘settings → domain & email → email settings’ section or are you adding it straight to the ‘Send Emails with Sendgrid’ plugin page?

right now ive put it in the settings page.
In addition, in my workflow, my send emails with Sendgrid plugin workflow looks like this:

How do you have the body with the JSON object in your workflow?

thanks a lot,

I believe @soeren may have setup a custom API connection (via free API Connector plugin) and that body is a single dynamic value that’s sent after filling in the dynamic variables during that workflow.

This screenshot may help you get started. I am using a custom API connection to add new users to my SendGrid campaign lists (I have more connections, such as editing contact info and removing people from lists). It’s a matter of diving into the API documentation (Authentication | Twilio) and testing with custom variables:

See for more info:

https://manual.bubble.is/using-plugins/special-plugins.html#the-api-connector

1 Like

@philip, you are right. I have set this up with the API connector. Here is my configuration for sending emails:

1 Like

So I’ve setup with the Bubble API connector,

However when I Initialise call, it comes up with a 404 error

Also, how are you triggering the workflow within the bubble workflow editor?
Within plugins I can’t seem to find an option for the new sendgrid setup or Bubble API Connector

Lastly,What is your setup like on the sendgrid side?
How are you defining which sendgrid template to use?

Apologies but very new to using APIs - thank you so much for all your help.

You should not put HTTP/1.1 in the POST URL, that is giving you the 404 error.

The workflow is triggered in by adding an action from Plugin-> Send_mail

On the Sendgrid side, I have defined a Transactional template, pasted my html code for the email in there (including the placeholder tags like -inspection_id-) and this template has an id that is one of the parameters in the JSON post made from Bubble.

This was a bit brief - let me know if you have more questions.

Okay,
So i have managed to configure it so I can send emails from bubble through sendgrid and it brings up the template!
however, Im a little confused to how sendgrid works. Ive been reading up on their API and so within bubble - I have this as my email setup

On Sendgrid, I have this as the template:

When I trigger the email, the test image appears, %body% becomes testworld, which is great, but how do I send reference the button to cause an action (ideally as a navaigation back to bubble which will also alter a field for the user allowing me to trigger a new workflow?)
I cant seem to find it anywhere in their docs :confused:

thanks so much - Alex

nevermind i got it!
thanks so much

The button should be a link to a web page on Bubble. Like the example I showed. Then the user clicks the button and the web page opens.

You can then add parameters to the URL if you want.

If you tell us what you want to accomplish, it will be easier to suggest how to set it up :slight_smile:

This topic was automatically closed after 70 days. New replies are no longer allowed.