Overview
The "Create Stream" operation in the Zulip HITL (Human-in-the-loop) node allows users to create a new Zulip stream programmatically. This is useful for automating the setup of communication channels within Zulip, especially when workflows require dedicated streams for approvals, notifications, or team discussions.
Typical scenarios include:
- Automatically creating a private stream for sensitive workflow approvals.
- Setting up public streams with descriptive names and descriptions for project collaboration.
- Subscribing specific users to newly created streams to ensure they receive relevant messages and notifications.
For example, a workflow could create a stream named "approval-requests" with a description explaining its purpose, mark it as private, and subscribe key team members automatically.
Properties
| Name | Meaning |
|---|---|
| Stream Name | The name of the Zulip stream to create. Must be lowercase, can contain letters, numbers, and hyphens, and must be 1-60 characters long. It must follow Zulip naming conventions. |
| Stream Description | A textual description of the stream's purpose. Visible to users browsing or subscribing to streams. Maximum length is 1024 characters. |
| Private Stream | Boolean flag indicating if the stream should be private (invite-only). Private streams are only visible to invited members, suitable for sensitive information. |
| Subscribe Users | Comma-separated list of email addresses to subscribe to the stream upon creation. These users will be automatically added and notified. Emails must be registered in Zulip. Maximum length is 2048 characters. |
| Enable Debug Mode | Whether to enable detailed debug logging for troubleshooting purposes. This shows detailed logs about operations, API calls, and internal processing. Use only when needed as it may impact performance. |
| Debug Level | Level of detail for debug logging. Options include Debug, Error Only, Info, Trace, Verbose, and Warnings. Higher levels provide more information but may impact performance. |
| Debug Categories | Specific categories to enable debug logging for, such as API Calls, Authentication, Network, Performance, Recovery, User Feedback, Validation, Workflow, or All Categories. Helps focus on relevant log information. |
| Debug Output Format | Format for debug log output: JSON (machine-readable) or Pretty (human-readable). |
| Performance Tracking | Whether to track operation timing and memory usage to identify bottlenecks. Adds slight overhead. |
| Include Stack Traces | Whether to include stack traces in error and debug logs. Useful for debugging but increases log volume significantly. |
| Formatting Options | Collection of options to configure rich text formatting and markdown processing for messages sent via the node. Includes allowed/forbidden HTML tags, emoji, markdown, math blocks, mentions, spoilers, tables, message style, and XSS protection. |
Output
The output JSON object for the "Create Stream" operation includes:
success(boolean): Indicates whether the stream was successfully created.streamName(string): The name of the created stream.streamId(number): The unique identifier of the created stream assigned by Zulip.description(string): The description provided for the stream.private(boolean): Whether the stream is private.subscribedUsers(array of strings): List of user emails subscribed to the stream.timestamp(ISO string): Timestamp of when the stream was created.
This output confirms the creation details and can be used downstream in workflows for further processing or logging.
Dependencies
- Requires an active connection to the Zulip API using valid credentials including server URL, bot email, and API key.
- The node depends on the Zulip API client library to perform stream creation.
- Proper permissions are required for the API user to create streams and manage subscriptions.
- Optional debug and performance tracking features depend on internal logging and metrics modules.
Troubleshooting
- Invalid Stream Name: If the stream name does not meet Zulip's naming rules (lowercase, allowed characters, length), the node throws a validation error. Ensure the name follows Zulip conventions.
- Invalid Email Format: The "Subscribe Users" field requires valid email addresses separated by commas. Invalid formats cause errors.
- Stream Name or Description Length Exceeded: Stream name max 60 chars, description max 1024 chars, subscription list max 2048 chars. Exceeding these limits causes errors.
- API Connection Issues: Failure to connect to Zulip API or insufficient permissions results in authentication or authorization errors.
- Debug Mode Impact: Enabling debug mode with high verbosity may degrade performance; use only when necessary.
- Error Messages: Errors from the Zulip API during stream creation are captured and surfaced with descriptive messages. Check the error message for details and verify API credentials and permissions.