Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

This node enables server-side management of messages within the Stream Chat platform. Specifically, for the Message - Delete operation, it allows users to delete a message by its unique identifier. This is useful in scenarios where inappropriate, outdated, or erroneous messages need to be removed from chat channels programmatically.

Practical examples include:

  • Automatically deleting messages flagged by moderation tools.
  • Removing messages after a certain time period for compliance or privacy reasons.
  • Allowing administrators to delete user messages via automated workflows.

Properties

Name Meaning
Message ID The unique identifier of the message to delete. This is required to specify which message will be removed.

Output

The output JSON contains the response from the Stream Chat API after attempting to delete the specified message. Typically, this will confirm successful deletion or provide error details if the operation failed.

No binary data is output by this operation.

Example output structure (simplified):

{
  "json": {
    // Response object from the deleteMessage API call, usually empty or confirmation info
  }
}

Dependencies

  • Requires an active connection to the Stream Chat service using valid API credentials.
  • The node depends on a configured API key credential with permissions to delete messages.
  • No additional environment variables are needed beyond standard n8n credential setup.

Troubleshooting

  • Common issues:

    • Providing an invalid or non-existent Message ID will cause the deletion to fail.
    • Insufficient permissions in the API credentials can result in authorization errors.
    • Network or connectivity problems may prevent the API call from succeeding.
  • Error messages and resolutions:

    • "Unsupported operation: message.deleteMessage": Indicates a misconfiguration or unsupported operation; ensure the Resource is set to "Message" and Operation to "Delete".
    • Errors containing "message not found": Verify the Message ID is correct and exists.
    • Authorization errors: Check that the API key has the necessary rights to delete messages.
    • If the node is set to continue on failure, errors will appear in the output JSON under an error field for each failed item.

Links and References

Discussion