Actions60
- User Actions
- Channel Actions
- Accept Invite
- Add Members
- Add Moderators
- Archive
- Ban User
- Create
- Delete
- Delete File
- Delete Image
- Demote Moderators
- Disable Slow Mode
- Enable Slow Mode
- Get Config
- Hide
- Invite Members
- Mark Read
- Mark Unread
- Mute
- Mute Status
- Pin
- Query Channels
- Query Members
- Reject Invite
- Remove Members
- Send Action
- Send File
- Send Image
- Show
- Stop Watching
- Truncate
- Unarchive
- Unban User
- Unmute
- Unpin
- Update
- Watch
- Message Actions
- Moderation Actions
Overview
The node provides server-side moderation operations for Stream Chat messages and users. Specifically, the "Flag Message" operation allows you to flag a particular chat message for moderation review, optionally providing a reason for the flag. This is useful in scenarios where you want to mark inappropriate or suspicious content within your chat application for further action by moderators or automated systems.
Practical examples include:
- Automatically flagging messages that contain offensive language detected by an external system.
- Allowing moderators to manually flag messages reported by users.
- Integrating with a workflow that reviews flagged messages and takes subsequent actions like deleting or warning users.
Properties
| Name | Meaning |
|---|---|
| Message ID | The unique identifier of the message to be flagged for moderation. |
| Reason | The reason or explanation for flagging the message (optional but recommended). |
Output
The output JSON contains the response from the Stream Chat API after flagging the message. It typically includes details about the flagged message and confirmation of the flagging action.
Example output structure (simplified):
{
"id": "message_id",
"flagged": true,
"flag_reason": "reason text",
"created_at": "timestamp",
...
}
No binary data is output by this operation.
Dependencies
- Requires an API key credential with permissions to perform moderation actions on Stream Chat.
- The node uses the official Stream Chat server-side client library internally.
- Proper configuration of the Stream Chat API credentials in n8n is necessary.
Troubleshooting
Common issues:
- Invalid or missing Message ID will cause the operation to fail.
- Insufficient permissions on the API key may result in authorization errors.
- Network or connectivity issues can cause timeouts or failures.
Error messages:
"Unsupported operation: moderation.flagMessage": Indicates the operation name or resource was incorrect.- Errors related to invalid message IDs or reasons will be returned from the Stream Chat API; ensure the message exists and the ID is correct.
- Permission denied errors suggest the API key lacks moderation rights.
Resolution tips:
- Verify the Message ID is correct and corresponds to an existing message.
- Ensure the API key used has moderation privileges.
- Check network connectivity and retry if transient errors occur.