Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

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

MethodCredential kindAuth kindFieldsTest request
Personal access token or bot tokenmattermost/access_tokenbearerbase_url, token (secret)yes
OAuth2 (Mattermost OAuth 2.0 app)mattermost/oauth2oauth2_auth_codebase_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

OperationIDEffectPaginatedCassette tests
Create a postpost.createwrites3
Create an ephemeral postpost.create_ephemeralwrites1
Get a postpost.getreads1
Edit a postpost.updatewrites1
Delete a postpost.deletewrites1
List channel postspost.listreadsyes1
Get a threadpost.threadreads1
Search postspost.searchreads1
Pin a postpost.pinwrites1
Unpin a postpost.unpinwrites1

Create a post

Operation post.create.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorTeam whose channels are listed in the channel picker. Values from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
messagestringyesMarkdown text.
root_idstringPost ID to reply to in its thread.
file_idsstringUp to 5 uploaded file IDs (array or comma-separated).
attachmentsjsonMessage attachments array (stored in props.attachments).
propsjsonAdditional post properties.
priorityoptionsOne of important, urgent.
request_ackbooleanfalseAsk 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).

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
userresource_locatoryesValues from lookup users.
messagestringyes

Get a post

Operation post.get.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

Edit a post

Operation post.update.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes
messagestring
propsjson
file_idsstring

Delete a post

Operation post.delete.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

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).

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
return_allbooleanfalse
limitnumber50return_all = false

Get a thread

Operation post.thread. Returns the root post and all replies.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

Search posts

Operation post.search.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
termsstringyesSearch terms; supports from:, in:, before:, after: and quoted phrases.
is_or_searchbooleanfalse
include_deleted_channelsbooleanfalse
time_zone_offsetnumber0

Pin a post

Operation post.pin.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

Unpin a post

Operation post.unpin.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

Reaction

OperationIDEffectPaginatedCassette tests
Add a reactionreaction.addwrites2
Remove a reactionreaction.removewrites1
List reactions of a postreaction.listreads1

Add a reaction

Operation reaction.add.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes
emoji_namestringyesEmoji name without colons, for example thumbsup.
userresource_locatorReact as this user (needs permission). Leave empty for the credential’s own user. Values from lookup users.

Remove a reaction

Operation reaction.remove.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes
emoji_namestringyes
userresource_locatorRemove 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.

NameTypeDefaultRequiredShown whenDescription
post_idstringyes

Channel

OperationIDEffectPaginatedCassette tests
Create a channelchannel.createwrites1
Get a channelchannel.getreads1
Get a channel by namechannel.get_by_namereads1
List public channels of a teamchannel.listreadsyes1
Search channels of a teamchannel.searchreads1
Update a channelchannel.updatewrites1
Archive a channelchannel.deletewrites1
Restore an archived channelchannel.restorewrites1
Add a user to a channelchannel.add_memberwrites1
Remove a user from a channelchannel.remove_memberwrites1
List channel memberschannel.membersreadsyes1
Get channel statisticschannel.statsreads1

Create a channel

Operation channel.create.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
display_namestringyes
namestringyesURL name: lowercase letters, digits, - and _.
typeoptions"O"One of O, P.
purposestring
headerstring

Get a channel

Operation channel.get.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.

Get a channel by name

Operation channel.get_by_name.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
namestringyesThe channel’s URL name.

List public channels of a team

Operation channel.list.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
return_allbooleanfalse
limitnumber50return_all = false

Search channels of a team

Operation channel.search.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
termstringyesMatches channel names and display names.
return_allbooleantrue
limitnumber50return_all = false

Update a channel

Operation channel.update.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
display_namestring
namestring
purposestring
headerstring

Archive a channel

Operation channel.delete.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.

Restore an archived channel

Operation channel.restore.

NameTypeDefaultRequiredShown whenDescription
channelstringyesID of the archived channel.

Add a user to a channel

Operation channel.add_member.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
userresource_locatoryesValues from lookup users.

Remove a user from a channel

Operation channel.remove_member.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
userresource_locatoryesValues from lookup users.

List channel members

Operation channel.members.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
return_allbooleanfalse
limitnumber50return_all = false

Get channel statistics

Operation channel.stats.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.

User

OperationIDEffectPaginatedCassette tests
Get a useruser.getreads1
Get the authenticated useruser.get_mereads2
Get a user by emailuser.get_by_emailreads1
Get a user by usernameuser.get_by_usernamereads1
List usersuser.listreadsyes1
Search usersuser.searchreads1
Create a useruser.createwrites1
Deactivate a useruser.deactivatewrites1
Invite users to a team by emailuser.invitewrites1

Get a user

Operation user.get.

NameTypeDefaultRequiredShown whenDescription
userresource_locatoryesValues 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.

NameTypeDefaultRequiredShown whenDescription
emailstringyes

Get a user by username

Operation user.get_by_username.

NameTypeDefaultRequiredShown whenDescription
usernamestringyes

List users

Operation user.list.

NameTypeDefaultRequiredShown whenDescription
in_teamresource_locatorOnly members of this team. Values from lookup teams.
in_channelstringOnly members of this channel ID.
statusoptions"all"One of all, active, inactive.
sortoptionsOne of last_activity_at, create_at, status.
return_allbooleanfalse
limitnumber50return_all = false

Search users

Operation user.search.

NameTypeDefaultRequiredShown whenDescription
termstringyesMatches usernames, full names, nicknames and email.
teamresource_locatorValues from lookup teams.
allow_inactivebooleanfalse
limitnumber100

Create a user

Operation user.create.

NameTypeDefaultRequiredShown whenDescription
emailstringyes
usernamestringyes
passwordstringyes
first_namestring
last_namestring
nicknamestring
localestring

Deactivate a user

Operation user.deactivate.

NameTypeDefaultRequiredShown whenDescription
userresource_locatoryesValues from lookup users.

Invite users to a team by email

Operation user.invite.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
emailsstringyesEmail addresses (array or comma-separated).

Team

OperationIDEffectPaginatedCassette tests
List my teamsteam.listreads1
Get a teamteam.getreads1
Add a user to a teamteam.add_memberwrites1

List my teams

Operation team.list.

This node has no parameters.

Get a team

Operation team.get.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.

Add a user to a team

Operation team.add_member.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
userresource_locatoryesValues from lookup users.

File

OperationIDEffectPaginatedCassette tests
Upload a filefile.uploadwrites1
Get file detailsfile.get_inforeads1
Download a filefile.downloadreads1

Upload a file

Operation file.upload. Uploads a file to a channel; attach it to a post with the returned file ID.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends on team. Values from lookup channels.
binary_propertybinary_property"data"yes
file_namestringDefaults to the binary file name.

Get file details

Operation file.get_info.

NameTypeDefaultRequiredShown whenDescription
file_idstringyes

Download a file

Operation file.download.

NameTypeDefaultRequiredShown whenDescription
file_idstringyes
binary_propertystring"data"

Lookups

Lookups fill dropdowns and resource pickers in the editor from the vendor API.

LookupDepends onSearchDescription
teamsclient-side{{ item.name }}
channelsteamclient-side{{ {‘O’: ‘Public’, ‘P’: ‘Private’, ‘D’: ‘Direct message’, ‘G’: ‘Group message’}[item.type] }}
usersclient-side@{{ item.username }}

Triggers

Node type connector.mattermost_trigger.

TriggerIDKindDeduplication keySignatureWebhook registrationCassette tests
Message with trigger word or in channel (outgoing webhook)outgoing_webhookwebhookautomatic0
New post in channel (polling)new_postpoll{{ 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.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatoryesValues from lookup teams.
channelresource_locatorPublic channel to watch. Required when no trigger words are set. Depends on team. Values from lookup channels.
trigger_wordsstringComma-separated words; a message must start with one of them.
trigger_whenoptions0One of 0, 1.
display_namestring"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.

NameTypeDefaultRequiredShown whenDescription
teamresource_locatorValues from lookup teams.
channelresource_locatoryesDepends 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 typeVersion rangeStatusFixtures
n8n-nodes-base.mattermost1unverified

Provenance

Written from the vendor’s documentation: