Using AI Agents for Social Inbox Triage to Keep or Close Conversations

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.

AgentTriggerPurpose
Initial Triage AgentNew ConversationHandles first inbound messages
Follow-up Triage AgentConversation UpdatedHandles replies and ongoing thread activity
Without both workflows, some conversations may not be processed by the AI Agent.

Step 1: Create the Trigger

  1. In Oktopost, go to Settings > AI Management > Custom Agents, then open Agent Builder.
  2. Create a new AI Agent workflow.
  3. For the Initial Triage Agent, set the trigger to New Conversation.
  4. 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

  1. Enable Read.
  2. Enable Advanced Response Fields.
  3. Create the following String fields: VALUEJUDGEMENT and REASON.

Map Input Fields

Replace the example node ID in each field with the Trigger node ID from your own workflow.

  1. {{nodes.oktopost-events_1776868836654.output.Item.Data.CommentContent.Text}}
  2. {{nodes.oktopost-events_1776868836654.output.Item.Data.Content.Text}}
  3. {{nodes.oktopost-events_1776868836654.output.Item.Data.LatestMessage.Text}}
  4. {{nodes.oktopost-events_1776868836654.output.Data.LatestMessage.Text}}
  5. {{nodes.oktopost-events_1776868836654.output.Data.CommentContent.Text}}
  6. {{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.

FilterCondition
Keep filterresponse.VALUEJUDGEMENT equals VALUABLE
Close filterresponse.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.

FilterFilter decisionOktopost action
VALUABLE filterYESadd_conversation_note
VALUELESS filterYESupdate_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.

ParameterValue
conversationIdEvent - ID (from the picker)
noteresponse.VALUEJUDGEMENT | response.REASON (from the picker)

Update conversation status

The update_conversation_status action changes the conversation status to closed for valueless messages.

ParameterValue
conversationIdEvent - ID (from the picker)
statusclosed (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.

  1. Go to Settings > Users.
  2. 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 messageExpected valueExpected action
I'm pleased to announce I've just joined [COMPANY]VALUELESSAUTO-CLOSED
I'm not happy with [COMPANY]VALUABLEKEEP
Where can I get a demo?VALUABLEKEEP
Great work, [COMPANY]!VALUELESSAUTO-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

  1. Ensure you also have the second agent with Conversation Updated as the trigger.
  2. 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.

Was this article helpful?
0 out of 0 found this helpful