Adding contacts to a Brevo list

I have the following scenario:

The first filter checks if the user has opted into marketing:

Brevo Get a contact - checking the email:

I then filter to see if that email exists:

If the email doesn’t exist add their details to the Brevo contact list:

But I get an error for an test email that doesnt exist:

Have I set this up wrong, could this be streamlined any better?

Bascially I want to add a contact to the list if:

  1. The have selected to opt into marketing
  2. If they already exist don’t do anything
  3. If they dont exist add them to the contact list in Brevo

Also if a user who already exists but didn’t opt in initially, then fills out the form another time and decides to opt in, I’d want to allow for that

I thought I had this correct initially but dont know what to do at this point.

1 Like

Welcome to the world of error handling, @MaxW.

Since the email doesn’t exist, and an error is raised, we can use the error handler resume to keep the scenario moving forward.

You don’t need to configure anything for the resume module, but potentially modify your filter for the not found case.

Does the list a contact module have some sort of field to list a specific email? If so that might be a better option to use.

Hey there, can you explain this a bit more? Sounds like a possible solution.

Hey there, would I need a router this scenario? Where it goes to the resume error handler?

Or does it branch off the get contact module?

Also how would I handle if the contact exists already and decides to opt in later on?

What fields does the List Contacts module on the Brevo app look like? Can you take a screenshot? I do not have a Brevo account.

Hey there, here are the screenshots.

Just note I’m populating: email, first name, last name and opt_in_marketing fields only, the others aren’t used.

When I testing this scenario:

  • Existing contact - goes to the Update a Contact module
  • New contact - Errors on the Get a Contact module: “Contact does not exist (document_not_found).”
1 Like

Hey there, here are the screenshots from the scenario.

Just note I’m populating: email, first name, last name and opt_in_marketing fields only, the others aren’t used.

Unfortunately that doesnt have an email for that module.

Hi @MaxW
You can add error handler to get a contact module:
If the error message is contact does not exist you can create a contact.

How to add error handler:
Right click on the module and select add error handler:
image

filter:

Best regards,

Msquare Automation
Gold Partner of Make
@Msquare_Automation

3 Likes

That worked!! amazing and thank you so much.

Your approach is very unique and never would’ve tried that. Is that an alternative approach that can work for other apps or is it specific to Brevo?

1 Like

Thank you, @Msquare_Automation, for helping out @MaxW. I realize that the screenshot of the error handler with the create contact would’ve been better to provide upfront to reduce the back-and-forth.

And, Max, this technique works for many scenarios. You just have to think about what you want to do when something fails. Such as an alternative action, ignore, introduce default data, or something else.

2 Likes