Mathematical operation tool
IN THIS ARTICLE
If you need to calculate some data from any app, use Albato Mathematical Operation tool.
It will be useful when:
- You need to convert currency. For example, when the cost comes in dollars, but you want to send it to CRM in euros.
- You receive two or more fields with a numerical value, then you need to add, subtract, multiply or divide them and transfer into one field. For example, add the weight of the product and the weight of the box to transfer the gross weight.
- Add VAT to the amount or perform any other calculations. Let's take a look at how to use the tool. For example, whenever one of your current customers makes a purchase, two fields are updated in the respective Deal in HubSpot: order value and discount value. However, you only want to send to Google Sheets the total amount including the discount for your sales records.
How to set up
In Automation Builder, add HubSpot in the first step of the workflow. Select the Deal updated trigger and connect your app account.

Add Google Sheets in the second step. Select the Create/update a row action and connect your app account. Specify the spreadsheet and the tab where your sales records are stored.

Map the fields to fill in the spreadsheet according to HubSpot data. Leave the Total amount field blank.

Click on the + icon between the steps and select the Tool option. Then, find the Mathematical Operation tool and click the Select button.

In the Operation field, describe the required mathematical operation. You can also select the rounding type for fractional results and the number of decimal places.
In our example, we enter the following values from HubSpot:
Order value - Discount value

Click the gear icon in the Google Sheets step to do the final setup. Then, select the Total value field and define the Result parameter in the drop-down list linked to the Mathematical operation tool.

Ready! Now you will receive the result of mathematical operation. If Order value is 5000 and Discount value is 100, then the math operation result 4900 will be sent to Google Sheets.
See below another example that can also be very useful.
Calculating Sales Commission for New Products Sold on Hotmart
We know that Hotmart allows users to sell digital products and courses, and a very common practice is to work with affiliates, external salespeople, or even the community itself to increase the number of sales.
However, the final amount you will receive, after deducting the commission, is not always immediately clear.
In this guide, we’ll show you how to use the Mathematical Operation tool to perform this calculation and, in a simplified way, automatically save the result in a CRM, spreadsheet, or other apps.
Note: In this example, we’ll use the Hotmart app, and the data will be saved in Notion. However, you can apply the same logic to any apps you prefer.
Your previously configured automation would look something like this:

In this example, every time a purchase is completed on Hotmart, a new item is created in a Notion database.
To add the Mathematical Operation tool, click between the two steps:

Then, select Mathematical Operation:

Now, you just need to configure the desired operation.
Imagine that the commission in this case is 10%.
In this example, we’ll use the Purchase Full Price value, selecting the parameter from the dropdown list, and then add the calculation * 0.10.
It would look like this:

In the next step, simply select the result of this operation in the field where you want to save it.

You can calculate different commission percentages by changing the formula used.
This tool also allows for many other use cases, such as subtracting the number of products from your inventory after a sale, calculating conversion rate changes in a website traffic report, and many other possibilities.
Once you have finished configuring everything, simply activate your automation, and your workflow will be ready to use.
Did this answer your question?