Components
To build automation, you need to create an automation flow. Each automation flow consists of building blocks called components. It always starts with Trigger, followed by Action, and ends with Stop. You can create a complex multi-step conditional logic by adding more components to the automation flow. Below, you may find the description of each automation component available in Skyvia.
Action
The Action component is what makes the automation happen. It executes an operation over data from the chosen connection. Each connection has its own list of available actions. Use actions to get data, transform it, and transfer it to the destination point. To learn more about actions and their settings, visit the Actions section.
Use Case Scenario
Task | Solution |
---|---|
You need to create an opportunity in Salesforce each time a new deal is added to HubSpot. | Add a connection type trigger that checks for the new records in the Deals object in HubSpot. Add an action that grabs the data from HubSpot and an action that imports data from HubSpot to Salesforce. |
If
The If component sets a condition and splits the automation flow into two branches. If the input data meets the condition, the True branch is executed; otherwise, the automation flow is navigated to the False branch. To create a complex condition, open Expression Editor by selecting the If component and clicking the wand icon. The result of the condition should always be a boolean value.
Use Case Scenario
Task | Solution |
---|---|
You need to check if a customer has made a purchase in the last 30 days. The name of the field that stores the required information is PurchaseDaysPassed. | Set a condition: PurchaseDaysPassed<=30 . If a customer made a purchase during the last 30 days, the True branch would be executed; otherwise — the False branch. |
Foreach
The Foreach component is used to iterate over a list of items. It allows you to apply same actions to each item in the list. To choose a list of items to work with, select it from the List dropdown in the Foreach settings. Use the As box to set an alias name for the item.
Use Case Scenario
Task | Solution |
---|---|
You have a list of customers and a mailing list. You need to add customers to the mailing list only if today is their birthday. | Add a Foreach component that accepts the list of customers. Add an If component inside the Foreach loop that checks if today is the customer’s birthday. Assign an action that adds a customer to the mailing list to the True branch of the If component. |
Break Loop
The Break Loop component allows you to stop a loop (for example, Foreach) at a specific point or based on a specific condition.
Use Case Scenario
Task | Solution |
---|---|
You have a list of customers. You need to know if there is a customer from Germany among them. | Add a Foreach component that accepts the list of customers. Add an If component inside the Foreach loop that checks if Germany is the customer’s location. Add the Break Loop component to the True branch. In this case, the loop stops once the first German customer is found, as there is no further need to iterate over the remaining items in the list. |
Parallel
The Parallel component allows you to perform two or more actions simultaneously. Use it when you need to execute several independent branches at the same time.
Use Case Scenario
Task | Solution |
---|---|
You have a new customer. You need to send a welcome email, create a new account for that customer, and set yourself a reminder to make a call on Monday. | Add a Parallel component add create three branches inside it. Assign email action to the first branch, account action to the second branch, and a reminder to the third one. As all those actions are not interconnected, they can be run in parallel to speed up the execution. |
Try Catch
The Try Catch component allows you to handle errors. It consists of two branches: the Try branch, which tries to execute an action, and the Catch branch, which catches an error if the Try branch fails. The Catch branch can also contain actions that are being executed if the Try branch fails.
Use Case Scenario
Task | Solution |
---|---|
You need to import a customer from one system to another. If the import fails, a notification email should be sent. | Add a Try Catch component. Assign an import action to the Try branch and the send email action to the Catch branch. If the import fails, you will receive an error message, and a notification email will be sent. |
Exception
The Exception component can be used inside and outside the Try Catch component. When used outside Try Catch, Exception triggers an error, and the automation flow stops. When used inside the Try Catch component, it switches the execution to the Catch branch. You can set an error message in the Exception settings. It will be displayed in the Execution Details in case of automation failure.
Use Case Scenario
Task | Solution |
---|---|
You have a customer. You need to create an account for him only if his age is 18 or higher and send him an email only if the account was created. Otherwise, the automation should be treated as failed. | Add an If component that checks if the customer’s age is > 18. Assign the create account action to the True branch and Exception to the False branch. Optionally, set an error message in the Exception settings. Add the send email action after the If component. In this case, an account will only be created if the customer’s age is > 18, and an email will be sent only if the account is created. If the age is < 18, the automation will fail, and you will receive an error message in the Execution Details. |
Stop
Each automation ends with a Stop component. Additionally, you can use Stop to end the automation execution at any point. Note that if you use Stop inside the Parallel component to one of the branches, all parallel branches will finish their execution before the automation stops.
Use Case Scenario
Task | Solution |
---|---|
You have a customer. You need to create an account for him only if his age is 18 or higher and send him an email only if the account was created. | Add an If component that checks if the customer’s age is > 18. Assign the create account action to the True branch, and Stop to the False branch. Add the send email action after the If component. In this case, an account will only be created if the customer’s age is > 18, and an email will be sent only if the account is created. Unlike the same situation with an Exception component, automation will be treated as successful. |
Set Variable
The Set Variable component allows you to set values to the declared variables. It can be useful for performing calculations and for having access to the inner scope of the array from the outside.
Use Case Scenario
Task | Solution |
---|---|
You have a list of potential leads in your CRM. You need to calculate a male/female ratio and add it to your database. | Add a Foreach component that iterates over the list of customers. Add an If component inside Foreach, that checks whether the potential leed is male or female. Set a variable for each case that counts the number of leads. After Foreach, set a male/female ratio variable that checks the values of count male and count female variables and calculates the ratio. Add an action to upload this data to your database. |