This article explains how to use the Tess AI API to add artificial intelligence to your external workflows, automating tasks and enriching your data.
API Principles
The API lets external applications access Tess AI's features, like agent execution, natural language processing, and other AI jobs. This way, you can plug AI into your own systems and use the training and prompts you set up in Tess AI.
Usage Example (Transcription and Meeting Minutes Generation)
A school admin can automate creating meeting minutes. They record the meeting, upload the video to Google Drive, and Tess AI's API is triggered. The audio gets transcribed using services like Deep Grun, AssemblyAI, Have.ai, or OpenAI's Whisper. Then the transcription is processed by an agent in Tess AI, trained to produce the formatted minutes.
API News
Tess AI is always in development, with new features getting added regularly. Keep an eye on the API documentation for what's new.
Accessing the API
There are two main ways to access the API:
AI Studio (Automations): Create automations that trigger webhooks for your agents/templates.
API Tokens: Generate an access token in the "API Tokens" section of your profile and use it to authenticate your requests. The full API documentation is available in the top menu of the platform.
Practical Case: Feedback Classification: Automation for classifying customer feedback (sentiment, category, reason) based on new spreadsheet entries.
Integration with Zapier (step by step)
Authentication: Log in to Zapier with your Tess AI API token.
New Zap: Create a new Zap.
Trigger: Choose the trigger "New Row in Sheet" (Google Sheets).
Select Spreadsheet: Pick the spreadsheet and the tab that has the feedbacks.
Action: Run Template: Add the action "Run Template" (Tess AI App).
Select Template: Choose the feedback classification template.
Map Fields: Map the "feedback" and "stars" fields from the sheet to the matching template parameters.
Webhook Callback URL (for second Zap): Set the "Webhook Callback URL" to a second Zap that will handle the response.
Second Zap - Trigger: Create a second Zap with the "Catch Hook" trigger.
Copy Webhook URL: Copy the webhook URL made in the second Zap and paste it into the "Webhook Callback URL" field of the first Zap.
Second Zap - Map Fields: In the second Zap, map the Tess AI response fields ("sentiment", "category", "reason") to the proper columns in your sheet.
Second Zap - Action: Update Row: Add the action "Update Row in Sheet" (Google Sheets).
Map Row ID: Map the row ID to make sure you're updating the right record.
Alternative (Delay): Instead of a second Zap, you can use the "Delay" action in the first Zap to wait for a response from Tess AI. This makes things simpler but might not be the best if you have slow processing.
Integration with Make (step by step)
New Scenario: Create a new scenario in Make.
Trigger: Add the trigger "Watch changes in sheet" (Google Sheets).
Select Spreadsheet: Select the spreadsheet and tab with the feedbacks.
HTTP Module (POST): Add the "HTTP" module and set the method to POST.
Execution URL: Set up the template execution URL (check Tess AI API docs).
Authorization Header: Add the "Authorization" header with the value "Bearer <your_token>".
Request Body: In the request body, send the parameters ("feedback", "stars") as JSON or "multipart/form-data".
Store Execution ID: Add a "Set Variable" module to store the execution ID returned by the API.
Repeater Module (Polling): Add a "Repeater" module for polling.
Polling Interval: Set how often you want to check the status.
HTTP Module (GET) inside Repeater: Inside the repeater, add an "HTTP" module with method GET.
Status Check URL: Set up the status check URL (from API docs), using the execution ID you stored earlier.
Authorization Header (GET): Add the "Authorization" header with the value "Bearer <your_token>".
Repeater Stop Condition: Set the repeater to stop when the "status" field in the response is either "success" or "fail".
Extract Response Data: After the repeater, add a "Set Variable" module to grab the response data ("sentiment", "category", "reason").
Update Sheet: Add the module "Update a row" (Google Sheets).
Map Data to Sheet: Map the variables you got from the response to the correct columns in your sheet.
API Credits: Using the API spends credits, even if you're on the platform's unlimited plan. Usage is shown in the automation responses.
Discover all this on Tess AI!