Mattermost
connector.mattermost · connector.mattermost_trigger · communication
Post, edit and search messages, manage channels, users, teams, reactions and files on a Mattermost server, and start workflows from outgoing webhooks or new posts.
Vendor API documentation: https://developers.mattermost.com/api-documentation/
Authentication
| Method | Credential kind | Auth kind | Fields | Test request |
|---|---|---|---|---|
| Personal access token or bot token | mattermost/access_token | bearer | base_url, token (secret) | yes |
| OAuth2 (Mattermost OAuth 2.0 app) | mattermost/oauth2 | oauth2_auth_code | base_url, client_id, client_secret (secret) | yes |
Actions
Node type connector.mattermost. Choose a resource and an operation; each operation has its own parameters.
Post
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create a post | post.create | writes | 3 | |
| Create an ephemeral post | post.create_ephemeral | writes | 1 | |
| Get a post | post.get | reads | 1 | |
| Edit a post | post.update | writes | 1 | |
| Delete a post | post.delete | writes | 1 | |
| List channel posts | post.list | reads | yes | 1 |
| Get a thread | post.thread | reads | 1 | |
| Search posts | post.search | reads | 1 | |
| Pin a post | post.pin | writes | 1 | |
| Unpin a post | post.unpin | writes | 1 |
Create a post
Operation post.create.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Team whose channels are listed in the channel picker. Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
message | string | yes | Markdown text. | ||
root_id | string | Post ID to reply to in its thread. | |||
file_ids | string | Up to 5 uploaded file IDs (array or comma-separated). | |||
attachments | json | Message attachments array (stored in props.attachments). | |||
props | json | Additional post properties. | |||
priority | options | One of important, urgent. | |||
request_ack | boolean | false | Ask readers to acknowledge the post (needs a priority). |
Create an ephemeral post
Operation post.create_ephemeral. Shows a post to one user only. Needs the create_post_ephemeral permission (system admins).
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
user | resource_locator | yes | Values from lookup users. | ||
message | string | yes |
Get a post
Operation post.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
Edit a post
Operation post.update.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes | |||
message | string | ||||
props | json | ||||
file_ids | string |
Delete a post
Operation post.delete.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
List channel posts
Operation post.list. Posts of a channel, page by page (post order inside a page follows the server’s map order; sort by create_at when order matters).
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get a thread
Operation post.thread. Returns the root post and all replies.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
Search posts
Operation post.search.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
terms | string | yes | Search terms; supports from:, in:, before:, after: and quoted phrases. | ||
is_or_search | boolean | false | |||
include_deleted_channels | boolean | false | |||
time_zone_offset | number | 0 |
Pin a post
Operation post.pin.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
Unpin a post
Operation post.unpin.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
Reaction
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Add a reaction | reaction.add | writes | 2 | |
| Remove a reaction | reaction.remove | writes | 1 | |
| List reactions of a post | reaction.list | reads | 1 |
Add a reaction
Operation reaction.add.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes | |||
emoji_name | string | yes | Emoji name without colons, for example thumbsup. | ||
user | resource_locator | React as this user (needs permission). Leave empty for the credential’s own user. Values from lookup users. |
Remove a reaction
Operation reaction.remove.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes | |||
emoji_name | string | yes | |||
user | resource_locator | Remove this user’s reaction (needs permission). Leave empty for the credential’s own user. Values from lookup users. |
List reactions of a post
Operation reaction.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
post_id | string | yes |
Channel
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Create a channel | channel.create | writes | 1 | |
| Get a channel | channel.get | reads | 1 | |
| Get a channel by name | channel.get_by_name | reads | 1 | |
| List public channels of a team | channel.list | reads | yes | 1 |
| Search channels of a team | channel.search | reads | 1 | |
| Update a channel | channel.update | writes | 1 | |
| Archive a channel | channel.delete | writes | 1 | |
| Restore an archived channel | channel.restore | writes | 1 | |
| Add a user to a channel | channel.add_member | writes | 1 | |
| Remove a user from a channel | channel.remove_member | writes | 1 | |
| List channel members | channel.members | reads | yes | 1 |
| Get channel statistics | channel.stats | reads | 1 |
Create a channel
Operation channel.create.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
display_name | string | yes | |||
name | string | yes | URL name: lowercase letters, digits, - and _. | ||
type | options | "O" | One of O, P. | ||
purpose | string | ||||
header | string |
Get a channel
Operation channel.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. |
Get a channel by name
Operation channel.get_by_name.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
name | string | yes | The channel’s URL name. |
List public channels of a team
Operation channel.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Search channels of a team
Operation channel.search.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
term | string | yes | Matches channel names and display names. | ||
return_all | boolean | true | |||
limit | number | 50 | return_all = false |
Update a channel
Operation channel.update.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
display_name | string | ||||
name | string | ||||
purpose | string | ||||
header | string |
Archive a channel
Operation channel.delete.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. |
Restore an archived channel
Operation channel.restore.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
channel | string | yes | ID of the archived channel. |
Add a user to a channel
Operation channel.add_member.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
user | resource_locator | yes | Values from lookup users. |
Remove a user from a channel
Operation channel.remove_member.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
user | resource_locator | yes | Values from lookup users. |
List channel members
Operation channel.members.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Get channel statistics
Operation channel.stats.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. |
User
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Get a user | user.get | reads | 1 | |
| Get the authenticated user | user.get_me | reads | 2 | |
| Get a user by email | user.get_by_email | reads | 1 | |
| Get a user by username | user.get_by_username | reads | 1 | |
| List users | user.list | reads | yes | 1 |
| Search users | user.search | reads | 1 | |
| Create a user | user.create | writes | 1 | |
| Deactivate a user | user.deactivate | writes | 1 | |
| Invite users to a team by email | user.invite | writes | 1 |
Get a user
Operation user.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
user | resource_locator | yes | Values from lookup users. |
Get the authenticated user
Operation user.get_me.
This node has no parameters.
Get a user by email
Operation user.get_by_email.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
email | string | yes |
Get a user by username
Operation user.get_by_username.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
username | string | yes |
List users
Operation user.list.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
in_team | resource_locator | Only members of this team. Values from lookup teams. | |||
in_channel | string | Only members of this channel ID. | |||
status | options | "all" | One of all, active, inactive. | ||
sort | options | One of last_activity_at, create_at, status. | |||
return_all | boolean | false | |||
limit | number | 50 | return_all = false |
Search users
Operation user.search.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
term | string | yes | Matches usernames, full names, nicknames and email. | ||
team | resource_locator | Values from lookup teams. | |||
allow_inactive | boolean | false | |||
limit | number | 100 |
Create a user
Operation user.create.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
email | string | yes | |||
username | string | yes | |||
password | string | yes | |||
first_name | string | ||||
last_name | string | ||||
nickname | string | ||||
locale | string |
Deactivate a user
Operation user.deactivate.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
user | resource_locator | yes | Values from lookup users. |
Invite users to a team by email
Operation user.invite.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
emails | string | yes | Email addresses (array or comma-separated). |
Team
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| List my teams | team.list | reads | 1 | |
| Get a team | team.get | reads | 1 | |
| Add a user to a team | team.add_member | writes | 1 |
List my teams
Operation team.list.
This node has no parameters.
Get a team
Operation team.get.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. |
Add a user to a team
Operation team.add_member.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
user | resource_locator | yes | Values from lookup users. |
File
| Operation | ID | Effect | Paginated | Cassette tests |
|---|---|---|---|---|
| Upload a file | file.upload | writes | 1 | |
| Get file details | file.get_info | reads | 1 | |
| Download a file | file.download | reads | 1 |
Upload a file
Operation file.upload. Uploads a file to a channel; attach it to a post with the returned file ID.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. | ||
binary_property | binary_property | "data" | yes | ||
file_name | string | Defaults to the binary file name. |
Get file details
Operation file.get_info.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | string | yes |
Download a file
Operation file.download.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
file_id | string | yes | |||
binary_property | string | "data" |
Lookups
Lookups fill dropdowns and resource pickers in the editor from the vendor API.
| Lookup | Depends on | Search | Description |
|---|---|---|---|
teams | client-side | {{ item.name }} | |
channels | team | client-side | {{ {‘O’: ‘Public’, ‘P’: ‘Private’, ‘D’: ‘Direct message’, ‘G’: ‘Group message’}[item.type] }} |
users | client-side | @{{ item.username }} |
Triggers
Node type connector.mattermost_trigger.
| Trigger | ID | Kind | Deduplication key | Signature | Webhook registration | Cassette tests |
|---|---|---|---|---|---|---|
| Message with trigger word or in channel (outgoing webhook) | outgoing_webhook | webhook | automatic | 0 | ||
| New post in channel (polling) | new_post | poll | {{ item.id }} | 0 |
Trigger: Message with trigger word or in channel (outgoing webhook)
Creates a Mattermost outgoing webhook pointing at this node when the workflow is activated and deletes it on deactivation. Mattermost sends public-channel messages that start with a trigger word, or every message in the chosen channel. Requests whose token does not match the registered webhook are acknowledged and ignored.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | yes | Values from lookup teams. | ||
channel | resource_locator | Public channel to watch. Required when no trigger words are set. Depends on team. Values from lookup channels. | |||
trigger_words | string | Comma-separated words; a message must start with one of them. | |||
trigger_when | options | 0 | One of 0, 1. | ||
display_name | string | "Tappet workflow" | Name shown for the webhook in Mattermost. |
Trigger: New post in channel (polling)
Checks a channel for new posts on the poll schedule, including private channels the account can read.
| Name | Type | Default | Required | Shown when | Description |
|---|---|---|---|---|---|
team | resource_locator | Values from lookup teams. | |||
channel | resource_locator | yes | Depends on team. Values from lookup channels. |
Import
Exported workflows that use these node types import to this node. Unverified ranges import with a parameter warning until parity fixtures confirm them; see Migrating.
| Source type | Version range | Status | Fixtures |
|---|---|---|---|
n8n-nodes-base.mattermost | 1 | unverified |
Provenance
Written from the vendor’s documentation:
- https://docs.mattermost.com/api
- https://docs.mattermost.com/api/reference/posts
- https://docs.mattermost.com/api/reference/channels
- https://docs.mattermost.com/api/reference/users
- https://docs.mattermost.com/api/reference/teams
- https://docs.mattermost.com/api/reference/reactions
- https://docs.mattermost.com/api/reference/files
- https://docs.mattermost.com/api/reference/webhooks
- https://docs.mattermost.com/api/reference/o-auth
- https://docs.mattermost.com/developers/integrate/webhooks/outgoing
- https://raw.githubusercontent.com/mattermost/mattermost/master/api/v4/source/posts.yaml
- https://raw.githubusercontent.com/mattermost/mattermost/master/api/v4/source/webhooks.yaml
- https://raw.githubusercontent.com/mattermost/mattermost/master/api/v4/source/reactions.yaml
- https://docs.mattermost.com/integrations-guide/oauth2-provider.html
- https://docs.mattermost.com/developer/personal-access-tokens.html