Forum Academy Marketplace Showcase Pricing Features

Merged email when value(s) change

Hello,

I am making an app where we store a member base for an association where I am part off.
People can log in and change values about themself like adres, email and can sign up for activities.
I know how I can send an email when they change values about themselves.
But I don’t know how to send one email with only the changed values as conformation the change succeeded.
How can I achieve this?

Hey @ict :wave:

Thanks for the post!

For this, I might take a look at our database trigger workflows. You can trigger a workflow to run based on something changing about a particular record. From there, if you wanted the email to only have the values changed and not send the value if it wasn’t changed, you’ll want to look at our :formatted as text operator which allows you to change what text is printed based on the answer to a boolean statement.

As an example, lets say you want the email to include email only if email was changed: In the database change workflow, you can reference both the thing before and the thing now. In your email, you might write thing before’s email doesn’t contain thing now’s email:formatted as text. Bubble will then let you write a value for if the answer is yes OR if the answer is no. If yes, you might write “Email: Thing now’s email” and if no, you simply wouldn’t enter anything.

The effect of having one of these statements for each field you MIGHT want to report on is that when the email goes out, it’ll only summarize the changed fields and will ignore any that didn’t change.

Give it a try and feel free to reach out to our team directly with any additional questions → [email protected]

Hello @AndrewV,

Thanks for your response.
I implemented your solution like you said and it works really wel.
I only have one question.
When I send the email there are white lines because the request came back as a no. Like
Phone:123455655455

name: Test
If I write the statements without enters all the text stands right behind each other. Like
phone: 234934534598Name: Test
How can I only get an enter between statements that are changed? Like
Phone: 934983459948
Name: Test

Hey @ict

Nice work getting this implemented! And, great question. The easiest way around this is to put all the :formatted as text statements on the same line and include the line break as part of the text only if you’re including a value.

Lets use the example of 3 values. They would be written on the same line like: value 1 value 2 value 3. And, let’s say value 2 is the only one that will actually print a value. Then value 1 is empty and invisible on the same line as value 2, value 2 includes a line break and value 3 is empty and invisible one line down from value 2.

Does that help? Give it a try and don’t hesitate to reach out with any additional questions.

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