Pre-release
This release is a pre-release and may not be stable for production use.
Flowire Mattermost Nodes
Mattermost integration nodes for Flowire workflow automation. This package provides nodes for receiving and sending messages with Mattermost.
Installation
cd flowire-app/backend
uv pip install fw-nodes-mattermost
Then enable the package in your .env file:
# .env (comma-separated list)
INSTALLED_NODE_PACKAGES=fw-nodes-core,fw-nodes-mattermost
Included Nodes
Triggers
| Node | Description |
|---|---|
Mattermost Events |
Receive real-time events (messages, reactions, etc.) via WebSocket |
Mattermost Outgoing Webhook |
Receive messages from Mattermost channels via outgoing webhooks |
Mattermost Slash Command |
Receive slash command invocations from Mattermost |
Messaging
| Node | Description |
|---|---|
Mattermost Post Message |
Post a message to a Mattermost channel |
Usage Examples
Mattermost Events (WebSocket)
Receive real-time events from Mattermost via WebSocket connection:
# Node configuration:
{
"credential_id": "your-mattermost-credential",
"events": ["posted", "reaction_added", "reaction_removed"],
"channels": ["channel-id-1", "channel-id-2"], # Optional: filter by channel
"teams": ["team-id"] # Optional: filter by team
}
# Outputs:
# - event_type: Type of event (posted, reaction_added, etc.)
# - user_id: User who triggered the event
# - channel_id: Channel where event occurred
# - team_id: Team where event occurred
# - post_id: Post ID (for posted/reaction events)
# - message: Message content (for posted events)
# - emoji_name: Emoji name (for reaction events)
# - sender_name: Username of the sender
# - raw_event: Full event payload
Advantages over webhooks:
- Real-time events with no polling delay
- Captures events webhooks can't (typing, status changes, etc.)
- No webhook configuration required in Mattermost admin
Outgoing Webhook
Receive channel messages when a trigger word is used:
# Node configuration:
{
"validate_token": true,
"token": "{{project.mattermost-webhook-token}}"
}
# Outputs:
# - text: The message content
# - user_name: Who posted the message
# - channel_name: Where it was posted
# - trigger_word: The word that triggered the webhook
Slash Command
Receive slash command invocations (e.g., /mycommand args):
# Node configuration:
{
"validate_token": true,
"token": "{{project.mattermost-slash-token}}"
}
# Outputs:
# - command: The slash command (e.g., "/weather")
# - text: Arguments after the command
# - user_name: Who invoked the command
# - response_url: URL for delayed responses
Post Message
Send messages to Mattermost channels:
# Node configuration:
{
"credential_id": "your-mattermost-credential",
"channel_id": "{{slash-command.channel_id}}",
"message": "Hello from Flowire! Processing your request...",
"root_id": "{{slash-command.post_id}}" # Optional: reply in thread
}
Mattermost Setup
Outgoing Webhook
- Go to Integrations > Outgoing Webhooks in Mattermost
- Click Add Outgoing Webhook
- Set the callback URL to your Flowire webhook endpoint
- Configure trigger words or channels
- Copy the token and store it as a project variable
Slash Command
- Go to Integrations > Slash Commands in Mattermost
- Click Add Slash Command
- Set the request URL to your Flowire webhook endpoint
- Configure the command (e.g.,
/mycommand) - Copy the token and store it as a project variable
Credentials for Post Message
- In Mattermost, go to Account Settings > Security > Personal Access Tokens
- Generate a new token with appropriate permissions
- In Flowire, create a Mattermost credential with:
- Server URL: Your Mattermost server (e.g.,
https://mattermost.example.com) - Access Token: The personal access token
- Server URL: Your Mattermost server (e.g.,
Development
# Install with dev dependencies
uv sync --all-extras
# Run linter
ruff check .
# Auto-fix lint issues
ruff check . --fix
# Format code
ruff format .
# Run tests
pytest
Project Structure
fw-nodes-mattermost/
├── fw_nodes_mattermost/
│ ├── __init__.py
│ └── nodes/
│ ├── __init__.py
│ ├── stream_trigger.py
│ ├── outgoing_webhook.py
│ ├── slash_command.py
│ └── post_message.py
├── tests/
├── pyproject.toml
└── README.md
License
This project is licensed under the MIT License.
Metadata
Release files for fw-nodes-mattermost 0.0.1a2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| fw_nodes_mattermost-0.0.1a2.tar.gz | 16.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| fw_nodes_mattermost-0.0.1a2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.0 kB
Release files / fw_nodes_mattermost-0.0.1a2.tar.gz
| Download URL | fw_nodes_mattermost-0.0.1a2.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
040939cc659795916adddcb0ec01cf105e674af34e4c3e2eaac45a5af47ca41a
|
|
BLAKE2b-256 checksum How to use checksums |
d9827c019b950b928ae38b916114a2a73b0f710f44b55bb1d4d28c31682be0d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / fw_nodes_mattermost-0.0.1a2-py3-none-any.whl
| Download URL | fw_nodes_mattermost-0.0.1a2-py3-none-any.whl |
|---|---|
| Size | 19.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b8b7b074fa6ef9353961076aff11a3100b2905e82234844782cf575f5297e5f
|
|
BLAKE2b-256 checksum How to use checksums |
f5628112460b5117086992ff977979541c48a5db366f1f1491111d15f637d703
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"12","id":"bookworm","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|