- Python 98.8%
- Just 1.2%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
All checks were successful
Lint / lint (push) Successful in 18s
Dev tooling no longer publishes as a [dev] extra and plain uv sync installs it; ruff comes only from the pinned pre-commit rev. pytest-cov added for the test-cov recipe. |
||
| .forgejo/workflows | ||
| fw_nodes_zulip | ||
| tests | ||
| .gitignore | ||
| .pre-commit-config.yaml | ||
| justfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
fw-nodes-zulip
Zulip nodes for Flowire workflow automation: real-time event triggers, an outgoing-webhook trigger, and action nodes for messages, reactions, users, channels, and files.
Installation
# Production: install from PyPI into the Flowire image/venv
pip install fw-nodes-zulip
# Local development: clone into the flowire-app workspace
git clone <repo-url> flowire-app/nodes/fw-nodes-zulip
cd flowire-app && uv sync --all-packages
Any installed package with flowire.nodes entry points is loaded automatically.
Authentication
Zulip's API authenticates with HTTP Basic auth using an email + API key pair. The Flowire credential needs three fields:
| Field | Description |
|---|---|
site_url |
Zulip server URL (e.g., https://yourorg.zulipchat.com) |
email |
The bot's (or user's) email |
api_key |
The bot's (or user's) API key |
- Bot account (recommended): In Zulip, go to Personal settings → Bots → Add a new bot (a "Generic" bot). Copy the bot's email and API key from its card. Subscribe the bot to the channels it should see.
- Your own account: Personal settings → Account & privacy → API key. The nodes then act as you, with your permissions.
Why no OAuth? Zulip's OAuth/OIDC/SAML support is only for logging into Zulip (SSO); it does not offer an OAuth2 authorization flow for third-party API clients. API keys are the only supported API authentication mechanism, so this package intentionally has no OAuth2 provider.
Triggers
Zulip Events (stream trigger)
Real-time events via Zulip's events API (register an event queue, long-poll for events — Zulip has no event WebSocket). The Connection Manager keeps the queue registered and re-registers automatically when it expires.
Filters:
events— Zulip event types:message,reaction,subscription,stream,realm_user,update_message,delete_message,typing,presence,user_status,attachment, … (anything the register endpoint accepts). Only the selected types are registered server-side.channels— channel IDs to filter on. Note: events without channel context (direct messages, reactions, presence) are blocked when this filter is set.all_public_streams— receive message events from all public channels instead of only the bot's subscriptions (needs server-side permission).
The bot only ever sees what its account can see: subscribe it to the channels
you want to watch (or use all_public_streams).
Zulip Outgoing Webhook
Triggered when an Outgoing webhook bot is @-mentioned or receives a direct message. Create the bot in Zulip (Personal settings → Bots, type "Outgoing webhook") and set its endpoint URL to this node's webhook URL. Configure the bot's token on the node so requests are verified (constant-time comparison).
An optional reply is returned in the HTTP response and shows up as the bot's
answer; otherwise the node acknowledges silently and the workflow can respond
with Send Message / Send Direct Message.
Action nodes
| Node | Description |
|---|---|
| Zulip Send Message | Send to a channel topic; uploads attachments and links them in the message |
| Zulip Send Direct Message | DM one or more users (emails or IDs; multiple = group DM) |
| Zulip Update Message | Edit content and/or move to another topic (propagate_mode) |
| Zulip Delete Message | Delete a message |
| Zulip Add Reaction | Add an emoji reaction |
| Zulip Remove Reaction | Remove the credential user's reaction |
| Zulip Get User | Look up a user by ID or email |
| Zulip Get Channel | Look up a channel by ID or name |
| Zulip Get Messages | Fetch history with channel/topic/sender/search narrows |
| Zulip Download File | Fetch a /user_uploads/... attachment into workflow storage |
Channel dropdowns are populated from the credential (GET /streams); typed
channel names and IDs also work everywhere a channel is accepted.
Development
just install # deps + git hooks
just lint # pinned ruff via pre-commit
just format # format
just test # tests
just test-cov # tests with coverage
Dependencies
- httpx2 - Async HTTP client
- flowire-sdk - Flowire node SDK