Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cedricziel/node-red-contrib-mattermost-app
NodeRED nodes for Mattermost
https://github.com/cedricziel/node-red-contrib-mattermost-app
mattermost nodered nodered-nodes
Last synced: 2 months ago
JSON representation
NodeRED nodes for Mattermost
- Host: GitHub
- URL: https://github.com/cedricziel/node-red-contrib-mattermost-app
- Owner: cedricziel
- License: apache-2.0
- Created: 2023-12-19T13:39:18.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-23T21:17:01.000Z (3 months ago)
- Last Synced: 2024-10-11T20:10:10.161Z (3 months ago)
- Topics: mattermost, nodered, nodered-nodes
- Language: JavaScript
- Homepage:
- Size: 358 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-contrib-mattermost-apps
Custom nodes for Node-RED to interact with a Mattermost server.
## Install
Run the following command in the root directory of your Node-RED install
```bash
npm install @cedricziel/node-red-contrib-mattermost-apps
```## Usage
### Send a post to a channel
You have to provide the channel id, a message and everything else is optional.
```javascript
msg.method = 'createPost';
msg.args = [
{
channel_id: '1234',
message: 'hello',
}
];
return msg;
```Post Object structure
Properties:
```typescript
export type Post = {
id: string;
create_at: number;
update_at: number;
edit_at: number;
delete_at: number;
is_pinned: boolean;
user_id: string;
channel_id: string;
root_id: string;
original_id: string;
message: string;
type: PostType;
props: Record;
hashtags: string;
pending_post_id: string;
reply_count: number;
file_ids?: string[];
metadata: PostMetadata;
failed?: boolean;
user_activity_posts?: Post[];
state?: PostState;
filenames?: string[];
last_reply_at?: number;
participants?: any; //Array;
message_source?: string;
is_following?: boolean;
exists?: boolean;
};
```## License
MIT