What you need
- A classifaily account with an API key (get one from your dashboard)
- A Zapier account - any plan works for this pattern
Step 1: Set up your trigger
Your trigger is whatever source sends content into the workflow. Common examples:
- Typeform / Jotform / Gravity Forms - new form submission
- Gmail / Outlook - new email received
- Intercom / Zendesk - new conversation or ticket
- Webhooks by Zapier - any source that can POST
Set up and test the trigger until Zapier has a sample record, then proceed to step 2.
Step 2: Add the classification step
Add a new action step. Choose Webhooks by Zapier and select the POST method. Configure it as follows:
URL:
https://api.classifaily.com/v1/classify
Headers:
Authorization: Bearer cai_live_your_key_here
Content-Type: application/json
Body (Data): Set the type to JSON and paste:
{
"input": "{{your trigger field here}}",
"categories": ["sales_inquiry", "support_request", "spam", "partnership", "other"]
}
Map input to the text field from your trigger - the form message, email body, ticket description, or whatever you want classified. Set the categories to match your routing logic.
Test the step. Zapier will show the raw response, which looks like:
{
"result": {
"label": "sales_inquiry",
"confidence": 0.89
}
}
Step 3: Branch with Paths
Add a Paths step (recommended over Filter for multi-way branching). For each path, set the condition on the label field returned by classifaily:
- Path A:
labelexactly matchessales_inquiry- create a deal in HubSpot - Path B:
labelexactly matchessupport_request- create a Zendesk ticket - Path C:
labelexactly matchesspam- end the path (do nothing) - Path D: everything else - post to Slack for manual review
Filtering by confidence
Add a second condition to any path to filter on confidence. For the spam path: label exactly matches spam AND confidence greater than 0.80. Anything below that threshold falls through to your review path instead of being silently dropped.
Tips
- Concatenate fields for better accuracy. Instead of just the message, pass
"Subject: {{subject}}\nFrom: {{email}}\nMessage: {{message}}"as the input. More context improves classification. - Use schema IDs. Save your categories as a named schema in classifaily and pass
"schema": 123instead of the full category list. Updating the schema updates all Zaps at once.
Read the full step-by-step Zapier guide on the blog.
Read the guide