Comment on page
Integromat / MAKE
Here's an example how things can look for you! This workflow watches for new rows in a Google Sheet, then uses aito.ai to predict the accounting category based on row data, and uses Router to send ones with good predictions to elsewhere than the ones with not confident enough predictions.
The easiest way is to amke HTTP calls to aito.ai API. In Integromat, look for Activity type HTTP, and Action Make a request.
Then let's do some config to get the HTTP request set right. Follow these steps, together with below screenshot.
- Headers need to contain your API key. Name is
x-api-keyand the value you'll find from your aito.ai Console in the instance details. Note that for read only queries you can use Read-Only key, but for writing or altering data you need the separate Read/Write key.
- Body type is Raw, with Content type being JSON.
- Request content is where you put the aito.ai Predictive Query, that essentially defines what is aito.ai predicting. Integromat has a really easy way of adding the content from your previous action to the query. Check the example with green highlighted text. Tip! By adding
"limit": 1to your query, the usage of results is easier as you only have the top prediction.
- You should check the "Parse response" box, as this will make the next steps much easier!
With that, you are already good to go! However, let's look at a few more things.
Integromat's Routers are a super-easy way of deciding what to do with predicted data, according to the confidence of the prediction. In our example here, we have chosen the condition to be
$p, which essentially is the confidence of the given prediction. Then we have chosen to send entries with higher than 90% confidence to continue with automated workflow, and all the rest have a different way of processing.
We love Integromat! Check below how easy it is to debug your workflow! Use the magnifying glass to view the full input and output with aito.ai. For example ,the highlight here contains the first predicted result from aito.ai.
$pmeans the probability (confidence),
fielddenotes what was the prediction target and
featurecontains the predicted value.
In order to send new data in to your instance, you would be using the same HTTP Action called Make a request. Instead of using aito.ai's prediction end points, you simply use Data API instead. As Integromat mostly operates on entry by entry basis, the most practical approach is to use single entry upload.