Configure AI Agents in Oktopost to automatically triage Social Inbox conversations—keeping valuable messages open with contextual notes and auto-closing messages that require no action. This reduces inbox noise so your team can focus on messages that need a response.
Prerequisites
- Access to Oktopost AI Agents
- Permission to create workflows
- Permission to use AI Action nodes
- Oktopost User IDs for all routing assignees
Why Two AI Agents Are Required
Oktopost distinguishes between newly created conversations and updates to existing conversations. To ensure no messages bypass automation, create two nearly identical workflows.
| Agent | Trigger | Purpose |
|---|---|---|
| Initial Triage Agent | New Conversation | Handles first inbound messages |
| Follow-up Triage Agent | Conversation Updated | Handles replies and ongoing thread activity |
Step 1: Create the Trigger
- In Oktopost, go to Settings > AI Management > Custom Agents, then open Agent Builder.
- Create a new AI Agent workflow.
- For the Initial Triage Agent, set the trigger to New Conversation.
- For the Follow-up Triage Agent, set the trigger to Conversation Updated.
Step 2: Configure the AI Action Node
Add an AI Action node immediately after each trigger.
Enable Permissions
- Enable Read.
- Enable Advanced Response Fields.
- Create the following String fields:
VALUEJUDGEMENTandREASON.
Map Input Fields
Replace the example node ID in each field with the Trigger node ID from your own workflow.
{{nodes.oktopost-events_1776868836654.output.Item.Data.CommentContent.Text}}{{nodes.oktopost-events_1776868836654.output.Item.Data.Content.Text}}{{nodes.oktopost-events_1776868836654.output.Item.Data.LatestMessage.Text}}{{nodes.oktopost-events_1776868836654.output.Data.LatestMessage.Text}}{{nodes.oktopost-events_1776868836654.output.Data.CommentContent.Text}}{{nodes.oktopost-events_1776868836654.output.Data.Content.Text}}
Add the AI Classification Prompt
Replace [COMPANY NAME] with your company name.
### TASK 1: VALUEJUDGEMENT
Analyze the input to identify the value of the content within the messages, for example is it a valuable message that requires a response, or is it a valueless interaction that doesn't require a response
TASK 1 RULES:
- Ignore fields that are empty, "null", or contain only URLs.
- Priority: If multiple fields have text, use the most descriptive one.
- Value analysis Output: Exactly one word, ALL CAPS (e.g., VALUABLE, VALUELESS).
### TASK 2: Value Categorization
Categorize the input based on the following definitions:
VALUABLE: brief description of the valuableness within the message
VALUABLE EXAMPLE 1: Request for a business meeting, demo, pricing or any direct business enquiry
VALUABLE EXAMPLE 2: Customer support issue or product complaint
VALUABLE EXAMPLE 3: Legal, compliance or safety-relevant content (e.g. data privacy, security etc.)
VALUABLE EXAMPLE 4: Conversation that clearly has come from a journalist, analyst or press enquiry
VALUABLE EXAMPLE 5: Contains language that is abusive or aggressive in nature
VALUELESS: brief description of valuelessness within the message
VALUELESS EXAMPLE 1: Announcements about achieving certification or badges from [COMPANY NAME]
VALUELESS EXAMPLE 2: Employees announcing they are leaving or joining [COMPANY NAME]
VALUELESS EXAMPLE 3: Generic praise with no ask
VALUELESS EXAMPLE 4: Spam, bot-like messages
### TASK 3: REASON
Analyze the evaluations made in TASK 2, and provide a single sentence justification according to these rules:
- The reason must be a single sentence written strictly in ENGLISH, even if the input text was in another language.
- Phrase it as supportive, collaborative guidance for the assigned team member, explaining why an action is recommended and how they might want to handle it (e.g., "you may want to follow up" or "you may want to react to this comment"), rather than a direct command.
- For customer inquiries and collaborations, explicitly state that a quick response is recommended to open up dialogue.
Step 3: Add 'Keep' or 'Close' Filters
Create two Filter nodes after the AI Action node.
| Filter | Condition |
|---|---|
| Keep filter | response.VALUEJUDGEMENT equals VALUABLE |
| Close filter | response.VALUEJUDGEMENT equals VALUELESS |
Step 4: Add Oktopost Actions
Add Oktopost actions so valuable conversations stay open with a note and valueless conversations are auto-closed.
| Filter | Filter decision | Oktopost action |
|---|---|---|
| VALUABLE filter | YES | add_conversation_note |
| VALUELESS filter | YES | update_conversation_status |
Step 5: Configure Oktopost Actions
Add conversation note
The add_conversation_note action adds an internal note to valuable conversations. This keeps the conversation open and gives assignees context for why it was flagged.
| Parameter | Value |
|---|---|
| conversationId | Event - ID (from the picker) |
| note | response.VALUEJUDGEMENT | response.REASON (from the picker) |
Update conversation status
The update_conversation_status action changes the conversation status to closed for valueless messages.
| Parameter | Value |
|---|---|
| conversationId | Event - ID (from the picker) |
| status | closed (input as text) |
Step 6: Add Additional Actions if Required
You can expand the workflow by adding:
- More actions, such as adding notes to closed messages
- More defining parameters during the AI Action
- More filters to route different outcomes to different actions
- Auto-assignments to particular users (see below to find User IDs)
Finding Oktopost User IDs
To configure auto-assignment routing, you need the numerical Oktopost User IDs for each assignee.
- Go to Settings > Users.
- Copy the User ID for each regional owner.
Recommended Testing Scenarios
Before confirming final implementation, test the workflow using sample direct messages (if internal permissions allow).
| Test message | Expected value | Expected action |
|---|---|---|
| I'm pleased to announce I've just joined [COMPANY] | VALUELESS | AUTO-CLOSED |
| I'm not happy with [COMPANY] | VALUABLE | KEEP |
| Where can I get a demo? | VALUABLE | KEEP |
| Great work, [COMPANY]! | VALUELESS | AUTO-CLOSED |
Troubleshooting
Conversations are not being kept open or auto-closed
Verify the following:
- Valuable and Valueless definitions are clear with no overlap
- The workflow trigger is active
- Both AI Agents are enabled
AI output formatting fails
Ensure the AI prompt strictly returns VALUEJUDGEMENT and REASON. Avoid modifying the output schema.
Only initial conversations are auto-closed
- Ensure you also have the second agent with Conversation Updated as the trigger.
- Ensure the prompt, filters, and actions match the Initial Triage Agent exactly.
Best Practices
- Keep routing logic simple and clear.
- Review AI classifications regularly.
- Use internal notes to improve transparency.
- Test with real-world social messages before scaling.
Your completed workflow should contain one trigger, one AI Action node, two value filters, one add_conversation_note action, and one update_conversation_status action.