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 "Flag User" operation in the Moderation resource of this Stream Chat node allows you to mark a user for moderation review by flagging them. This is useful in scenarios where a user may have violated community guidelines or terms of service, and you want to bring their behavior to the attention of moderators or automated systems for further action.
Practical examples include:
- Flagging a user who posted inappropriate content.
- Marking a user suspected of spamming or harassment.
- Integrating with automated moderation workflows that trigger alerts or actions based on flagged users.
This operation helps maintain a safe and respectful chat environment by enabling proactive moderation.
Properties
| Name | Meaning |
|---|---|
| Target User ID | The unique identifier of the user to be flagged for moderation. |
| Reason | A text description explaining why the user is being flagged (e.g., "Inappropriate language"). |
Output
The output JSON contains the response from the Stream Chat API after flagging the user. It typically includes details about the flagged user and the moderation action taken, such as confirmation of the flag and any metadata returned by the API.
No binary data is produced by this operation.
Example output structure (simplified):
{
"flagged_user": {
"id": "user123",
"flags": [
{
"reason": "Inappropriate language",
"created_at": "2024-01-01T12:00:00Z"
}
]
}
}
Dependencies
- Requires an active Stream Chat API key credential configured in n8n with permissions to perform moderation actions.
- The node uses the Stream Chat server-side client SDK internally to communicate with the Stream Chat service.
Troubleshooting
Common issues:
- Invalid or missing Target User ID will cause the operation to fail.
- Insufficient API permissions can result in authorization errors.
- Network connectivity problems may cause timeouts or request failures.
Error messages:
"Unsupported operation: moderation.flagUser": Indicates the operation name or resource was not recognized; ensure correct parameters are set.- API errors related to invalid user IDs or permission denied will be surfaced with descriptive messages.
Resolution tips:
- Verify the Target User ID exists in your Stream Chat application.
- Confirm your API credentials have moderation rights.
- Check network connectivity and retry if transient errors occur.