Manual social inbox triage creates operational challenges for global teams — delayed response times, inconsistent comment routing, missed customer inquiries, and a consistently full inbox with plenty of noise. This use case walks you through configuring an AI Agent workflow that automatically detects the nature of comment text, routes comments to the right internal owner, and auto-closes spam or low-value engagement. Because Oktopost distinguishes between newly created conversations and updates to existing conversations, you must create two nearly identical AI Agents to ensure complete inbox coverage.
Prerequisites
- Access to Oktopost AI Agent
- Permission to create workflows
- Permission to use AI Action nodes
- Oktopost User IDs for all routing assignees
Example Use Cases
| Scenario | Outcome |
|---|---|
| Negative sentiment within the comment | Assigned to social media admin |
| Comment opening up an intellectual debate | Assigned to social media admin |
| HR comment about a new joiner | Assigned to HR lead |
| Spam comment | Auto-closed |
Two-Agent Overview
| Agent | Trigger | Purpose |
|---|---|---|
| Initial Triage Agent | New Conversation | Handles the first comment on a post |
| Follow-up Triage Agent | Conversation Updated | Handles replies and ongoing thread activity |
Without both workflows, some conversations may not be processed by the AI Agent.
Configure the Workflow
Step 1: Create the Trigger Events
- Create a new AI Agent workflow for the Initial Triage Agent.
- Set the trigger to New Conversation.
- Create a second, nearly identical workflow for the Follow-up Triage Agent.
- Set the trigger on the second workflow to Conversation Updated.
- Configure the remaining steps identically on both workflows.
Step 2: Filter for Comments
- Add a filter node immediately after the trigger.
- Set the filter condition to Item Type equals Post.
- Route the Yes branch to the AI Action node.
This ensures the AI Action only reads comments and does not process mentions, direct messages, or other item types.
Step 3: Configure the AI Action Node
- Add an AI Action node on the Yes branch after the filter.
- Open the AI Action node settings and enable Read permissions so the node can access comment content from the trigger event.
- Under Advanced Response Fields, create the following String fields:
COMMENTCONTENTREASON
- Replace the example node IDs in the input fields below with the Trigger node ID from your workflow.
- Replace
[COMPANY NAME]with your company name in the AI prompt. - Customize the category definitions and examples to match your social media strategy. Clearer examples with low overlap between categories produce more accurate classifications.
Input fields:
### DATA FIELDS FOR ANALYSIS
> - {{nodes.oktopost-events_<YOUR_TRIGGER_NODE_ID>.output.Item.Data.CommentContent.Text}}
> - {{nodes.oktopost-events_<YOUR_TRIGGER_NODE_ID>.output.Data.CommentContent.Text}}
AI classification prompt:
### TASK 1: COMMENTCONTENT
Analyze the input to identify the content within the comments, for example is it a comment that has negative sentiment, contradictory language to the main post, qualitative content, a positive remark, advertising.
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., NEGATIVE, CONTRADICTORY, QUALITATIVE, ADVERTISING, POSITIVE, HR).
### TASK 2: Content Categorization
Categorize the input based on the following definitions:
NEGATIVE: brief description of the negativeness within the comment
NEGATIVE EXAMPLE 1: Critical comments about [COMPANY NAME]
NEGATIVE EXAMPLE 2: Political or hateful comments about [COMPANY NAME]
CONTRADICTORY: brief description of contradictory nature within the comment
CONTRADICTORY EXAMPLE 1: Comments that disagree with the content in the main post or challenge the facts/opinions within it
CONTRADICTORY EXAMPLE 2: Comments that suggest a different point of view to the main content within the post
QUALITATIVE: brief description of qualitative/in-depth questions and valuable nature within the comment
QUALITATIVE EXAMPLE 1: Comments that ask insightful questions about the main post
QUALITATIVE EXAMPLE 2: Comments that offer a highly nuanced point of view
QUALITATIVE EXAMPLE 3: Comments that are highly intellectual in either their body or their question within the comment
ADVERTISING: brief description of advertising/self promotion nature within the comment
ADVERTISING EXAMPLE 1: Comments that are clearly self-promoting of another business that isn't [COMPANY NAME]
ADVERTISING EXAMPLE 2: Comments that have multiple links to external websites that are not that of [COMPANY NAME]
POSITIVE: brief description of simple and positive nature within the comment
POSITIVE EXAMPLE 1: Thanking [COMPANY NAME] for an event, report release or similar
POSITIVE EXAMPLE 2: Simple positive comments where the whole body of the text is along the lines of "well said!"
HR: brief description of comments that are specifically HR-focused in nature
HR EXAMPLE 1: Comments that contain the text #join[COMPANYNAME]
HR EXAMPLE 2: Comments that state how happy they are to have joined [COMPANY NAME]
### 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 4: Add Filter Conditions
- Add one or more filter nodes after the AI Action node.
- Use a single filter when all matching comments follow the same action path.
- Add multiple filters when routing requires different action types (auto-close, assign to a user, keep open with a note) or when the same action type routes to different users based on comment category.
Example filter conditions (route matching comments via the Yes branch):
| Response | Operator | Value |
|---|---|---|
response.COMMENTCONTENT | EQUALS | QUALITATIVE |
response.COMMENTCONTENT | EQUALS | NEGATIVE |
response.COMMENTCONTENT | EQUALS | POSITIVE |
If only two outcomes exist — for example, some comments go to one user and all others go to a different user — you can route the Oktopost action via both the Yes and No branches.
Step 5: Configure Oktopost Actions
Configure the Oktopost action at the end of each filter branch based on your triage decision.
Assign comments to a user
| Parameter | Value |
|---|---|
| Oktopost Action | assign_conversation |
conversationId | Event — ID (from the picker) |
assignee_id | User ID of the assignee |
note | response.COMMENTCONTENT and response.REASON (from the picker) |
Automatically close comments
| Parameter | Value |
|---|---|
| Oktopost Action | update_conversation_status |
conversationId | Event — ID (from the picker) |
status | closed (input as text) |
Step 6: Add Additional Actions
You can expand the workflow by adding:
- More actions, such as notes on closed messages
- More defining parameters during the AI Action
- More filters when additional AI response fields require different routing paths
Find Oktopost User IDs
To configure auto-assignment routing, you need the numerical Oktopost User ID for each assignee.
- Navigate to Settings > Users.
- Copy the User ID for each regional owner or team member who receives routed comments.
Testing Scenarios
Before confirming final implementation, test the workflow using sample comments if your permissions allow.
| Test Message | Expected Value | Expected Action |
|---|---|---|
| I'm not happy with [COMPANY] | NEGATIVE | Auto-assigned |
| Check out this URL! | SPAM | Auto-closed |
| This is interesting, what about…. | QUALITATIVE | Auto-assigned |
| Really pleased to have joined…. | HR | Auto-assigned |
Troubleshooting
More than just comments are coming through
- Verify the filter is placed immediately after the trigger and set to Item Type equals Post.
- Confirm the AI Action input fields reference comment content only.
AI output formatting fails
- Ensure the AI prompt returns exactly
COMMENTCONTENTandREASONas defined in Advanced Response Fields. - Do not modify the output schema after testing.
Only initial conversations are processed
- Confirm you created the second workflow with the Conversation Updated trigger.
- Verify the prompt, filters, and actions are identical on both workflows.