Discord Image Spam LLM Classifier
Manual workflow used by the Discord spam moderator to classify suspicious Discord images, including possible compromised older accounts, and return a compact JSON moderation verdict.
Download ZIP · 2.1 KB
Full JSON
Click to expand
{
"description": "Manual workflow used by the Discord spam moderator to classify suspicious Discord images, including possible compromised older accounts, and return a compact JSON moderation verdict.",
"tags": [
"workflow",
"manual",
"llm",
"image",
"discord",
"moderation",
"spam"
],
"linkedExamples": [
{
"type": "agents",
"variant": "discord-spam-moderator",
"relationship": "Companion Discord actor agent calls this workflow for suspicious image messages."
}
],
"document": {
"name": "Discord Image Spam LLM Classifier",
"enabled": true,
"log_level": "info",
"trigger": {
"type": "manual"
},
"workflowInput": [
{
"name": "image_url",
"description": "Temporary or public URL for the Discord image to inspect. Optional when image_bucket/image_full_path are provided.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "image_bucket",
"description": "Storage bucket for a private AutoTalk media image.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "image_full_path",
"description": "Storage fullPath for a private AutoTalk media image.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "caption",
"description": "Optional Discord image caption.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "member_age_hours",
"description": "How long the sender has been in the Discord server.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "is_new_member_24h",
"description": "Whether the sender joined the Discord server in the last 24 hours.",
"schema": {
"type": "boolean",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "is_dormant_account",
"description": "Whether the contact had no recent known inbound Discord activity before this message.",
"schema": {
"type": "boolean",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "dormant_days",
"description": "Days since the previous known inbound Discord activity for this contact.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "first_image_after_days",
"description": "Days since the previous known Discord image from this contact, when known.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "first_link_after_days",
"description": "Days since the previous known Discord link from this contact, when known.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "recent_message_count",
"description": "Messages sent by this author inside the current 5 minute moderation window.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "recent_image_count",
"description": "Images sent by this author inside the current 5 minute moderation window.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "same_hash_image_count",
"description": "Repeated same-image hash count inside the current 5 minute moderation window.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "text_score",
"description": "Heuristic text/caption spam score computed by the actor.",
"schema": {
"type": "number",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "matched_rules",
"description": "Comma-separated heuristic signals already matched by the actor.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
},
{
"name": "behavioral_signals",
"description": "Comma-separated behavioral signals such as dormant account, first image after 30 days, or message burst.",
"schema": {
"type": "string",
"required": false,
"enableEnums": false,
"enum": []
}
}
],
"steps": [
{
"condition": {
"expr": "present(image_url) || (present(image_bucket) && present(image_full_path))",
"onFailure": "fallback",
"fallback": "",
"resultType": "any",
"strict": false,
"useSimpleCel": false
},
"action": {
"actionType": "actions/ai/llm/chat/generate",
"actions/ai/llm/chat/generate": {
"is_advanced": true,
"platform": "openai",
"model": "gpt-4o-mini",
"temperature": 0,
"max_tokens": 300,
"purpose": "Classify a suspicious Discord image for spam moderation",
"enable_structured_outputs": false,
"messages": [
{
"role": "developer",
"content_type": "text",
"audio_format": "mp3",
"content": {
"expr": "'You classify Discord image messages for spam moderation, including possible compromised older accounts. Return ONLY compact JSON with keys: is_spam boolean, confidence number 0..1, category string, reason string, signals array of strings. Mark spam only when the image or caption clearly promotes scams, phishing, fake Nitro/giveaways, crypto/wallet abuse, malicious links or QR codes, NSFW spam, impersonation, bot-like advertising, or server-invite spam. Behavioral context can raise suspicion but must not be the only reason for spam. Do not mark normal memes, screenshots, game content, selfies, avatars, logos, or regular chat images as spam. No markdown fences.'",
"onFailure": "fallback",
"fallback": "",
"resultType": "any",
"strict": false,
"useSimpleCel": false
}
},
{
"role": "user",
"content_type": "text",
"audio_format": "mp3",
"content": {
"expr": "'Context JSON: ' + json_stringify({\"caption\": caption, \"member_age_hours\": member_age_hours, \"is_new_member_24h\": is_new_member_24h, \"is_dormant_account\": is_dormant_account, \"dormant_days\": dormant_days, \"first_image_after_days\": first_image_after_days, \"first_link_after_days\": first_link_after_days, \"recent_message_count\": recent_message_count, \"recent_image_count\": recent_image_count, \"same_hash_image_count\": same_hash_image_count, \"text_score\": text_score, \"matched_rules\": matched_rules, \"behavioral_signals\": behavioral_signals})",
"onFailure": "fallback",
"fallback": "",
"resultType": "any",
"strict": false,
"useSimpleCel": false
}
},
{
"role": "user",
"content_type": "image",
"audio_format": "mp3",
"content": {
"expr": "present(image_url) ? image_url : {\"bucket\": image_bucket, \"fullPath\": image_full_path}",
"onFailure": "fallback",
"fallback": "",
"resultType": "any",
"strict": false,
"useSimpleCel": false
}
}
]
}
}
}
],
"returnExpression": {
"expr": "get(step(0), 'choices.0.message.content')",
"onFailure": "fallback",
"fallback": "",
"resultType": "any",
"strict": false,
"useSimpleCel": false
},
"customAttributes": {}
}
}
How to Use
Import this workflow with the companion Discord Spam Moderator agent, then set the agent's imageLlmWorkflowId input to the imported workflow ID.