When I was looking for a better alternative for the in-built bubble feature to confirm email addresses, I couldn’t find a good answer to this problem or not the solution I was looking for. But after some trial and error, I think I found a way to confirm email addresses, that I would like to share with the community. With this method, you can use a custom template to send to your users.
Add two data types, ‘email confirmed, yes/no’, ‘email confirmation code., text’.
3a) Choose an email service you would like to use, I’m using SendGrid but I’m sure it will work with others.
3b) Go over to SendGrid and put in the Button URL: {{anynameyouwant}} for convenience purposes I just use ‘url’. With other email services, you need to figure out this part on your own but it probably be pretty similar, quick google search and you will find out
3c) On the Bubbleside add an action by sending an email through your email service, then create a new key with the same name as {{anynameyouwant}}. As value put in your confirmation linkpage&code=Email confirmation code.
4a) When clicking on the email it will take you to the confirmation page, on the confirmation page workflow do the following truncate to the end to the number of characters you wanted in your random generated string, I have 7:
(if you have more data to send through your url you can also use extract with Regex instead of truncated)
4b) When the confirmation code of the current user matches with the confirmation code in the link, change the email confirmed to ‘yes’ and redirect them to the home page.
I found myself implementing something similar not long ago. One thing I find with this approach is that, if the user is not logged in, this confirmation will not work. Or I didn’t understood it well?
How then can I tell whether or not someone’s email was confirmed? How is that supposed to be used?
Seems strange to have a workflow action that just sends an email/link without any way to track it. I thought bubble docs said they saved the data on the user type or email field.
The built in “email confirmed” field is saved on the user. To see the contents of that field of your users, you have to create a repeating group and expose that field in the designer.
Really great for you sharing a workaround in setting up an option for being able to send a sendgrid template with the confirmation link. What plugin did you install for send grid to allow adding the substitution tags?
From the Bubble perspective, it would be nice if this was a built-in feature so that we can use the bubble password confirmation rather.
After posting, I went trawling the Bubble documentation which I found extremely helpful. And came across this which may help others out whereby you can use the default Bubble confirmation.
Sendgrid Template ID
Sendgrid allows you to define templates to use when sending emails. When you build a template, add the template ID here, and it will be applied to all emails sent by the app. Templates should contain a single “<%body%>” (without the quotes) field, which will be replaced by the content of the email defined in your actions.
Note: This is optional. Without a template, the email will be exactly what you typed in the Body field.
I am implementing something similar now, as I am building a review system into my app, and I want a review submitter to have to click a unique link in their email to confirm their review (they may not be a user in my app).
One question - why don’t you use the native Bubble email sending feature instead of Sendgrid?
Sendgrid allows for much more formatting with drag and drop elements or custom html/css. This way you can brand your email, add images, buttons and much more.