Stream Chat icon

Stream Chat

Server-side Stream Chat operations

Overview

This node enables server-side management of Stream Chat channels, including the ability to delete files uploaded to a specific channel. The "Delete File" operation allows users to remove a file from a channel by specifying the channel type, channel ID, and the URL of the file to be deleted.

Common scenarios for this operation include:

  • Moderating content by removing inappropriate or outdated files from chat channels.
  • Managing storage by deleting unnecessary files to free up space.
  • Automating cleanup tasks in chat applications integrated with Stream Chat.

For example, if a user wants to delete an image or document previously uploaded to a team channel named "team-alpha," they would specify the channel type as "team," provide the channel ID "team-alpha," and supply the exact URL of the file to be removed.

Properties

Name Meaning
Channel Type The type of the channel. Common options: "messaging" (1-on-1 chats), "team" (group channels), "livestream" (broadcast channels).
Channel ID Unique identifier for the channel (e.g., "general", "random", "team-alpha"). Combined with type to form CID.
File URL The URL of the file or image to delete from the specified channel.

Output

The output is a JSON object representing the response from the Stream Chat API after attempting to delete the file. It typically contains confirmation details or status information about the deletion operation.

No binary data is output by this operation.

Dependencies

  • Requires an API key credential configured in n8n with permissions to manage Stream Chat channels.
  • Depends on the Stream Chat server-side SDK client initialized within the node.
  • Network access to the Stream Chat service is necessary.

Troubleshooting

  • Invalid Channel ID or Type: If the channel does not exist or the combination of channel type and ID is incorrect, the operation will fail. Verify that both values are correct.
  • File URL Not Found: If the file URL does not correspond to any file in the channel, deletion will fail. Ensure the URL is accurate and the file exists.
  • Insufficient Permissions: The API key used must have rights to delete files in the specified channel. Check your API credentials and their permissions.
  • Network Issues: Connectivity problems can cause timeouts or failures. Confirm network stability and Stream Chat service availability.
  • Error messages returned by the node will include details; review them to identify the cause and adjust parameters accordingly.

Links and References

Discussion