(Updates coming soon)
The ability to add AI to a Zapier workflow opens up a world of possibilities. In this example, we will train an AI model to recognize positive and negative restaurant reviews. We will then deploy that model via Zapier to monitor a Twitter account. When negative feedback is detected, we will slack the customer success team to follow up with the customer and mitigate the damage.
To start, we upload a set of existing restaurant reviews into a new Akkio flow. For this demonstration, we have 1000 different text examples that are tagged as positive or negative. As you can see below, Akkio will automatically detect text in one column (the review) and a category in the other (positive or negative).
Next, we add a prediction step by choosing “add step” on the left-hand side, and select “review” as the prediction target, then train the model. Training takes about 30 seconds while the AutoML system determines the best AI model for this dataset. When complete, we are presented with the model report, which helps us understand how the model performs. The model is trained on 80% of the data and then tested on the held back 20% of the data. Our results look like this:
Zooming in on the performance, you can see that the model is going a great job - it correctly classifies the review’s tone as positive or negative over 95% of the time!
Now that we have built our ML model, we add one more step on the left-hand flow menu - deploy. We choose Zapier and hit confirm.
When deploy is clicked, the confirmation screen means the model is now live and ready to be integrated into our Zapier Zap.
Log into Zapier and start a new workflow. Because we will be monitoring Twitter, we will begin with the Twitter integration and connect it to our account. Because I don’t run a restaurant, we will use my Twitter handle @jonathonreilly. We will search for when my account is mentioned:
And we will trigger on my handle.
You can then quickly confirm that the trigger is working correctly by validating that it pulls your latest mention. The next step is to pass the mentions (reviews) to the Akkio model we set up in Step 1. Simply add a step, search Akkio, and connect it. Then choose the event “make a prediction,” as shown below:
Next, you will need to connect your Akkio account. You only need to do this step once. After that, all of your deployed ML models will be available for use in Zapier. Follow the link to your team settings page in the Akkio web app, and copy and paste your API key, then choose to continue.
Now that your Akkio account is connected to Zapier, you can choose the model you created in step 1 (in this case “Akkio-Restaurant”). For the input “Review Text,” select the tweet’s text (which will also show the last time the target account was mentioned).
Finally, run a test to make sure you are getting predictions back correctly and turn on the Zap.
The next step is adding building the Slack integration. First, we only want to slack the team if the review is negative so we add a filter step that triggers on the Akkio prediction and continues if the review is negative:
Finally, we add the step to send the slack message. If necessary, follow the steps to connect your Slack to Zapier. Choose the event “send a channel message” and select your slack account.
Then set up the action - we will send both the URL of the tweet, the User name, the text of the negative review tweet, and the Akkio AI model output (that it’s negative). Including the Akkio prediction is not needed, but it helps us double-check the Zap is working correctly.
Finally, run the test, and make sure the text pops up correctly in your slack channel. If everything has worked correctly your Zap should look like this:
I had someone send a negative and a positive review of a restaurant mentioning my Twitter handle.
As expected, only the negative review is forwarded to the slack channel for the team to address.
Zapier is an excellent tool for automating business workflows, and when you combine it with the power of Akkios machine learning, you can automate incredibly complex tasks.