Integromat
  • 22 Oct 2020
  • 2 Minutes To Read
  • Print
  • Share
  • Dark
    Light

Integromat

  • Print
  • Share
  • Dark
    Light

Dreaming of adding brains to your Integromat automation workflow? Seek no more, Aito is the easy way of embedding some ML top your processes.

Here's an example how things can look for you! This workflow watches for new rows in a Google Sheet, then uses Aito 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.

image.png

Once you have your Aito instance up and running, here's how to get started in no time!

Creating schema to Aito

We recommend creating the data schema in Aito Console or with CLI first, as this way you can ensure everything is set up properly to receive your data and make predictions.

Making predictions : HTTP/Make a request

Aito is easiest to use with HTTP calls to Aito's API. In Integromat, look for Activity type HTTP, and Action Make a request.

image.png

Then let's do some config to get the HTTP request set right. Follow these steps, together with below screenshot.

  • URL: this is the API endpoint in Aito you are calling. In our case we do Predictions. Also note that you should get your own instance url from Aito Console.
  • Request method is most of the time POST. Check the documentation of each Aito's end point to make sure you get this one right.
  • Headers need to contain your API key. Name is x-api-key and the value you'll find from your Aito 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 Predictive Query, that essentially defines what is Aito predicting. Look for tips of creating queries here. Integromat has a really easy way of adding the content from youru previous action to the query. Check the example with green highlighted text. Tip! By adding "limit": 1 to yyour query, the usage of results are easier as you only have the top prediction.
  • You should check the "Parse response" box, as this will make the next steps much easier!

image.png

With that you are already good to. However, let's look at few more things!

Use of prediction confidence

Integromat's Routers are 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.

image.png

Debugging

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. For example the highlight here contains the first predicted result from Aito. $p means the probability (confidence), field denotes what was the prediction target and feature contains the predicted value.

image.png

Adding data to Aito

In order to send new data in to your Aito instance, you would be using the same HTTP Action called Make a request. Instead of using Aito'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.

Got questions?

With this you are good to go! For any questions and help, join our Slack channel.

Was This Article Helpful?