Content Moderation
Overview
The Content Moderation Node automatically detects and flags inappropriate or unsafe content using AI. It can analyze both text and image inputs to determine whether they contain offensive, harmful, or restricted material before allowing the workflow to proceed.
This node is essential for ensuring that user-generated content, uploaded files, or messages meet your platform’s safety and compliance requirements.
Description
Moderate content using AI.
Use the Content Moderation Node to evaluate content for categories such as sexual content, harassment, hate speech, violence, and more. It supports two main types of moderation:
Text Moderation
Analyze written content such as messages, comments, or posts for unsafe language.
Image Moderation
Analyze uploaded or generated images for inappropriate visual content.
The node returns a detailed breakdown of flagged categories and confidence scores, allowing you to take automated actions based on the results.
Input Parameters
The Content Moderation node accepts flat key-value pairs that specify the content to analyze and the type of moderation to perform.
attachmentsstringRequired"file1.jpg,file2.png" or "{{nodeId.output.image}}"moderationTypestringOptional"text-moderation"moderationTextstringOptional"This is a test message."Provide all parameters as flat key-value pairs.
For multiple files, use comma-separated values. Access input values dynamically within the workflow using {{nodeId.input.<key>}}.
Output Parameters
After execution, the Content Moderation node returns the AI’s analysis of the submitted content along with moderation details and confidence scores.
flaggedbooleanOptionaltrueflaggedCategoriesstringOptional"violence,hate"processingTimestringOptional"2025-10-27T10:45:12Z"processingIdstringOptional"modr-3438"categories.sexualnumberOptional0.05categories.harassmentnumberOptional0.95categories.hatenumberOptional0.10categories.illicitnumberOptional0.01categories.self-harmnumberOptional0.00categories.violencenumberOptional0.80Access output results using variable references:
{{nodeId.output.flagged}} → true / false
{{nodeId.output.flaggedCategories}} → "violence, hate"
{{nodeId.output.categories.sexual}} → 0.05
Output Type
Output Type: text-moderation/image-moderation
This identifying string indicates the node handles both text-based and image-based moderation tasks. Do not modify this value.
Example Usage
Example 1: Text Moderation
Analyze a text message for harassment.
{ "moderationType": "text-moderation", "moderationText": "I hate you!"}
{ "flagged": true, "flaggedCategories": "harassment", "categories": { "harassment": 0.98, "sexual": 0.01, "hate": 0.05, "illicit": 0.00, "self-harm": 0.00, "violence": 0.02 }, "processingTime": "2025-10-27T10:30:45Z", "processingId": "modr-3438"}
Example 2: Image Moderation
Analyze an uploaded image for violence.
{ "moderationType": "image-moderation", "attachments": "file123.jpg"}
{ "flagged": false, "flaggedCategories": "", "categories": { "violence": 0.1, "sexual": 0.05, "harassment": 0.01, "hate": 0.00, "illicit": 0.00, "self-harm": 0.00 }, "processingTime": "2025-10-27T10:46:55Z", "processingId": "modr-9921"}
How to Use in a No-Code Workflow
Add the Node
Drag and drop the Content Moderation Node into your workflow canvas.
Choose Input Type
- Use
moderationTextfor moderating text messages or comments. - Use
attachmentsfor moderating images or file uploads.
Set Moderation Type
Choose "text-moderation" or "image-moderation" as needed.
Connect Inputs
Link the output from a previous node (like file upload or text generation) to the attachments or moderationText fields.
Access Outputs
Use variable references to pass results to other nodes, such as conditional checks or notifications.
Set Conditions
Create conditional branches (If/Else) in your workflow to stop or flag content automatically if {{nodeId.output.flagged}} is true.
Best Practices
- Always verify that uploaded files are properly connected before moderation.
- For text moderation, keep inputs under 5,000 characters for optimal performance.
- Combine both
moderationTextandattachmentsto analyze mixed media submissions. - Review flagged outputs manually for high-risk content before taking automated action.
- Store
processingIdvalues for tracking or audit purposes.
Do / Don’t
- ✔️ Use specific thresholds for category scores (e.g., flag if
violence > 0.8). - ✔️ Provide clear feedback to users if their content is flagged.
- ✔️ Use this node to protect your community and brand reputation.
- ❌ Don’t rely solely on the boolean
flaggedstatus for nuanced cases; check the scores. - ❌ Don’t ignore the
processingIdwhen debugging false positives. - ❌ Don’t use this node for medical diagnosis or legal judgments.
Common Errors
Missing attachmentsErrorOptionalMissing moderationTextErrorOptionalInvalid moderationTypeErrorOptionalEmpty outputErrorOptionalFile not accessibleErrorOptionalExample Workflow Integration
Use Case 1: Chat Safety
Monitor a chat application for harassment.
- Trigger Node: Receives a new chat message.
- Content Moderation Node: Checks the message text.
- Logic Node: If
flaggedis true, block the message; otherwise, send it.
Workflow Data Flow:
{{chatTrigger.output.message}} → {{moderation.input.moderationText}}
{{moderation.output.flagged}} → {{logicNode.input.condition}}
Use Case 2: User Uploads
Ensure uploaded profile pictures are appropriate.
- File Upload Node: User uploads an image.
- Content Moderation Node: Checks the image for sexual or violent content.
- Notification Node: Alerts admin if the image is flagged.
Workflow Data Flow:
{{fileUpload.output.fileUrl}} → {{moderation.input.attachments}}
{{moderation.output.flagged}} → {{notification.input.trigger}}
