When creating your automation, you'll see that it’s possible to use various tools and additional features that will help you create increasingly personalized and effective flows depending on what process you want to automate.
The Error Handler is a feature that allows you, as the name suggests, to define what should happen with that automation if an error occurs at a certain step.
This feature creates a range of new possibilities and allows, for example, that even if there is an error at some step, the automation continues.
You can use it to create a kind of router for your automation when an error happens. The difference here is that, instead of setting a condition for the automation to continue or stop based on a parameter, the condition will be based on whether or not there is an error at this step.
It also allows you to use the tool as a way to check for duplicates, whether it's contacts, messages, or another parameter, in certain platforms that don’t have this feature natively available.
Below, you'll see more about the tool and how to set up these various uses.
How to Add the Error Handler to Your Automation
After setting up the steps of your automation, you will see, to the right of each step, the icon with 3 dots. By clicking on it, you’ll have access to the Error Handler:
The Error Handler is a feature associated with a step, meaning its use will not incur any extra costs beyond what is already associated with that particular step in your automation.
When you select the Error Handler, you will see 3 available options. These options will determine what happens if an error occurs at that step.
By clicking the info icon next to each option, you can see more details about what will happen when an error occurs at that step.
In summary, the options are:
Stop the automation: In this case, if an error occurs, the automation will automatically stop, and no steps after this will be executed.
Continue the automation: If this option is selected, the automation will continue as normal, regardless of whether there’s an error or not, moving to the next step.
Proceed to the selected step below: This option allows you to use the Error Handler as a router. If an error occurs, you can direct the automation to skip to a subsequent step, whichever you choose, in your automation.
Next, you will see some practical uses of this tool that may help you when creating your automation.
How to Use the Error Handler to Check for Duplicates
Several Apps natively integrated with Albato have a tool to check for duplicates during certain actions. For example, when creating a new contact on a platform, this tool helps verify if the contact already exists. If it does, Albato will update the contact instead of creating a new one.
However, due to certain limitations or the way they were developed, some platforms don’t allow checking for duplicates. But, by using the Error Handler, it’s possible to create a similar and equally effective structure.
In the following example, we’ll use Conta Azul to demonstrate how to use the Error Handler as a kind of duplicate checker.
In Conta Azul, there’s no built-in duplicate-checking feature, but there is an action called "Find Customer by Filter" available.
First, go to your automation and add this step:
In this step, you can configure the search using the data you receive from the Trigger in your automation. In this example, we have a trigger for a new row added to a Google Sheets document.
In this example spreadsheet, Column A contains the contact name, and Column B contains the company name. These are the exact details we’ll use to configure the "Find Customer by Filter" step.
In other words, we’ll check on Conta Azul to see if a customer already exists and is registered with that information.
The configuration for Step 2 will look like this:
Notice that in this example, we’re using this action, but the same concept can be used for other Apps with actions like: Find Contact, Locate Customer, Find Deal, Find Record… among others.
The goal of this automation is to create a system that checks whether the contact already exists. If it does, it should be updated; if not, it should be created from scratch. To enable this model, you will now need to add more steps.
First, add the "Update Customer" step, and then an action to "Create Customer":
If no customer is found in Step 2, an error will occur. Without the Error Handler activated, this would mean that the automation would only run up to this point.
Now, let’s proceed with our duplicate checker.
Click the 3 dots next to the "Find Customer" step (Step 2) and select Error Handler:
Then, select option 3 and specify that, if an error occurs, the automation should continue to the "Create Customer" step.
This means that every time there is an error (i.e., no contact is found), we can deduce that no contact with these details exists on the platform, and therefore, the automation should create a new one.
If no error occurs, the automation will proceed to Step 3 – Update Customer, and we will use the contact ID found at that step to update the customer’s information.
Step 3 will look like this:
Finally, add a Break tool right after Step 3, to ensure that if the customer is only updated, the automation will stop after that step and not reach the "Create Contact" step.
Your automation will look like this:
Now, you have a duplicate checker, even for apps that don’t have this option available!
Next, here’s another possible use of the Error Handler.
Using the Error Handler as a Filter or Router for Your Automation:
We know that it’s possible to use the Router or an Incoming Data Filter to determine whether an automation should start or not, and which path it should take if a specific condition is met.
However, in both cases, we need to specify a parameter to configure the condition. In summary, this parameter needs to be equal to, different from, contain, or be greater/less than a specific value for the Router or Filter to work.
However, there are cases where we want our automation to behave in a certain way based on whether any of the steps present an error or not. For this, we can also use the Error Handler.
The possibilities are endless, and you can apply the same logic as you do with the other resources mentioned earlier.
Example:
A good example of this feature is for creating a kind of notification. Let’s say you’re creating an automation, where every time you make a sale in WooCommerce, a contact with the buyer’s details should be created in RD Station.
You want to be sure this step doesn’t have any errors, so you wish to be notified if something goes wrong, i.e., if there is an error in the contact creation step.
Initially, your automation would be set up like this:
To configure an alert if something goes wrong, add a step with the app you want to use to send the notification. For example, Gmail, Slack, Telegram, and among others.
In our case, we’ll use Gmail and configure an email-sending step:
In the fields of this step, I’ll set the email to be sent to myself. To do that, just fill in the "TO" field with your own email.
In the body (message body) and Subject fields, you can add a default message to help identify the error and even dynamic values with data about the action that wasn’t executed correctly.
Once done, we will add a Break in the automation right before this step to ensure that, in normal cases where there’s no error, the automation doesn’t reach the email notification step.
Finally, it’s time to configure the Error Handler.
As we learned earlier in the duplicate checker setup, just click the 3 dots next to the RD Station action and then select Error Handler.
Now, select the last option and direct the automation to the email-sending step.
This way, you’ll receive a personalized notification via email whenever an error happens in that step.
Remember, you can also use the Error Handler in other situations, like if you want the automation to ignore an error and continue its flow. For that, just select the second option (continue automation).
I hope this content has been useful to you, and that you can use this amazing tool to create even more personalized and effective automation.
If you have any questions, our support team is here to help!