Create automation using AI.
In this video, we get hands-on.
We will observe two automation scenarios using Mandalia's action.
Comparing among the two available AI sources, the public cloud AI and the secure private AI, for each of them two different models executing the same task.
Then, we will measure their costs in terms of credit consumption.
For the first example, we will ask the AI to automatically correct the format of a phone number.
Here is our first use case.
In this workspace, a table contains numbers that are poorly formatted, and the objective will be to create an automation that calls on the AI, which will normalize each number in an international format.
Let's go to Automation,
Automate with Timetonic.
Let's create the new scenario.
We will name our new scenario.
Save.
The trigger will be ... upon saving the form for creating a new lead.
the creation of the form will be saved,
so I select my life form,
I validate.
I will have a condition when the original phone number field is filled in, I will call on the public AI source I For the example,
we will use the public Cloudia source using the credits available in Timetonic.
In this first example of configuration on the model, we choose Gemini 2.0 Flash Lite, which is the most economical public cloud model, which also receives attachments for OCR in order to extract data in an image format.
And I will find the option that allows me to use my own personal API key.
I will select to give a role to the AI and I will insert the structure of the prompt in the question.
I have a ready-made prompt in which I give it information about its task, I provide it with context. Here, for the context, we will insert the variable of the country. so that it can use this information to determine the correct international dialing code if it is not already indicated.
Then, in the input, we're going to give it the form number field, so the original number, I give it a set of rules to output the expected output. And finally, I will choose the output field into which the AI will have to insert this formatted number.
I validate my configuration and create my automation.
We will run the test of creating a Lead sheet.
I go into the form.
I enter the prospect's data. his email. his country of origin and the phone number.
I will save.
I return to my table with the data lines.
I see in the corrected phone number field the country code for calling Portugal from France.
I will look in the logs for information to see that my scenario has been triggered correctly and on hovering, obtain information about the consumption generated by the triggering of this automation in credit.
an input consumption of 16 credits which will correspond to the information given in my role and in my question, and I will have six credits to consume on output for the phone number. I will get in the update field direct access to the logs on this line, but I can return to automation, from my automation, click on the icon to see the logs and discover all the logs from the triggering on this automation and find the information in the same way.
Now, for comparison, we will return to the automation configuration.
For the example, I will select another model to verify its consumption and see if it gives the same result, in order to choose the most economical model.
This one, is the GPT-OSS20P.
This model does not accept the format of the feet-joints for OCR processing, but in our case, it is not necessary.
I will save my automation and I will create the same sheet exactly.
In comparison, in the result of output for the correction of the number, Let's discover in the logs the result of the consumption for this model.
We can see that the GPT-OSS model, in output, consumes more credits. It costs 156 credits in output to offer exactly the same result.
Here is an illustration showing the test we just performed at the triggering of the correction of a phone number in comparison to two AI models.
The most economical model is the best option.
It costs us 22 credits on Gemini for correcting the phone number against 164 credits for the GPT on SS and the result is the same.
What will be interesting is to see it on the volume.
For 1,000 Lead Sheets Created, the most economical model will cost us 22,000 credits against 164,000 for the most expensive model, with the same result.
The most economical option is the best one.
Now, let's implement the second use case that allows extracting information from the image format of a business card.
We stay in this workspace where we have just corrected a phone number and we will import the IA template model that extracts data from a business card.
So, I do import a workspace I will select the automation tag and I will search for the automation IA business card template.
I import the tables from this space which will be pre-configured. on what this IA template does in the automation.
We will go to the pre-configured automation scenario.
In the Ask AI action, we will select the private AI source with a model that allows authorizing the business card in image format.
For the test, we will choose the Mistral Small model, in which we will insert the pier-joint field that receives the business card.
we always insert a role for the AI and in the question a prompt that structures what the AI will receive on input, what we ask it to execute and then the output format we ask it, corresponding to the information it will have to find on the business card and therefore extract in JSON format in the second part of our window configuration.
In more detail,
here,
you find all the keys of the JSON format that AI will have to find and generate on output.
a set of rules asking it to extract the data on output.
In the pie-joint field, you will go to find the corresponding field to the business card in image format.
In the response format option,
we choose the GSON with destination field.
This is the step that connects the AI's response to the field of the table.
In the prompt,
we asked Lia to return this data on a specific format.
a JSON object with specific keys.
Mobile,
company,
address,
and so on.
And these are exactly the same keys you should enter in the column.
of the field name of the property,
Jason.
character by character,
without any difference.
A simple rule to remember,
always write in lowercase,
without space,
with an underscore to separate words.
This is a standard used in development and that's what AI naturally produces when you ask it in the prompt.
Concretely,
if in the prompt,
job title is written like this with an underscore separating the two words and you enter job title this way,
without the underscore in the property field, the mapping will not work.
AI has returned exactly what you asked it for,
Timetonic looks for exactly what you wrote,
they must be identical.
Once the keys have been correctly entered,
you select in the field destination column,
previously created in your table,
the job title that will therefore receive the value.
So to recap,
AI extracts the data,
the JSON,
it structures,
and Timetonic distributes each value in the right field automatically.
you validate,
you save,
and when you automatically insert the pier joint field,
AI will process the data and insert them into the respective fields.
Let's go to the update field to observe the logs of the AI automation.
To note that the chosen model consumes 61 IA credits in input and 33 IA credits in output format.
You will also find there all the JSON structure generated by the AI with the copy found and created in And again,
we will modify the AI model to make a comparison of the output result and consumption.
We will test the Quent 2.5.
We don't change any configuration.
My header-joint field is present.
I save. and we will generate the same treatment by the AI on the same business card.
Let's go to the logs, in the update fields. and we notice that the Quent model costs us 569 IA credits on input and 84 IA credits in output format for the same result.
Here is this illustration showing the example we just performed.
The choice of the Quant 2.5 model costs us seven times more than the Mistral Small model.
At the volume of processing of 100 business cards,
The choice of the most economical model is imposed on us.
We have seen how to choose the right model according to the task.
The principle,
to choose the AI model,
is above all a question of adequacy to the task.
The right model is not the most powerful,
it's the one that meets the needs without unnecessary cost.
In the next video,
we see how to track the consumption of your AI credits from your account.
See you shortly!



