# Mattermost

> Send messages, replies and reactions in Mattermost, search and read channel history, and create, update and archive channels and their members on your own server or Mattermost Cloud.

App · 20 actions. Web page: https://docs.lodol.com/docs/integrations/mattermost

## Actions

### Add people to channel

Add one or more people to a channel. They must already be on the channel's team. 'me' adds the connected account.

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- People (`members`, list, required): User ids to add ('Search people' finds them), or 'me'.

**Outputs**

- `channel_id` (text): Channel id
- `count` (number): How many people were added
- `members` (list): The memberships added

**Example output**

```json
{
  "channel_id": "cccccccccccccccccccccccccc",
  "count": 1,
  "members": [
    {
      "channel_id": "cccccccccccccccccccccccccc",
      "last_viewed_at": "",
      "mention_count": 0,
      "msg_count": 0,
      "roles": "channel_user",
      "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
    }
  ]
}
```

### Add reaction

React to a post with an emoji, as the connected account.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).
- Emoji (`emoji_name`, text, required): The emoji's name, as typed after a colon in Mattermost, such as thumbsup or white_check_mark.

**Outputs**

- `created_at` (text): When the reaction was added
- `emoji_name` (text): The emoji's name, such as thumbsup
- `post_id` (text): Id of the post reacted to
- `user_id` (text): Id of the person who reacted

**Example output**

```json
{
  "created_at": "2025-10-14T10:00:00.000Z",
  "emoji_name": "thumbsup",
  "post_id": "pppppppppppppppppppppppppp",
  "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
}
```

### Archive channel

Archive a public or private channel. Its messages are kept, and an admin can restore it in Mattermost.

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').

**Outputs**

- `archived` (true/false): Always true
- `channel_id` (text): Id of the archived channel

**Example output**

```json
{
  "archived": true,
  "channel_id": "cccccccccccccccccccccccccc"
}
```

### Create channel

Create a public or private channel in a team. You become its admin.

**Inputs**

- Team (`team`, text, required): Pick one of your teams, or enter a team id.
- Channel name (`display_name`, text, required): The name people see, such as Q3 Launch.
- URL name (`name`, text): The name in the channel's link: lowercase letters, digits and hyphens. Made from the channel name when empty.
- Who can join (`channel_type`, text): Public channels are open to the whole team. One of: `O` (Public (anyone on the team can join)), `P` (Private (invite only)). Default: `O`.
- Purpose (`purpose`, text): What the channel is for.
- Header (`header`, text): Text shown at the top of the channel. Markdown works.

**Outputs**

- `archived` (true/false): Whether it is archived
- `archived_at` (text): When it was archived, or empty
- `created_at` (text): When it was created
- `creator_id` (text): Id of the person who created it
- `display_name` (text): The name people see
- `header` (text): The header shown at the top of the channel
- `id` (text): Channel id
- `last_post_at` (text): When the last message was posted
- `message_count` (number): How many messages it holds
- `name` (text): URL name, as in the channel's link
- `purpose` (text): What the channel is for
- `team_id` (text): Id of its team (empty for direct messages)
- `type` (text): O public, P private, D direct or G group message
- `type_label` (text): The type in words, such as public
- `updated_at` (text): When it last changed

**Example output**

```json
{
  "archived": false,
  "archived_at": "",
  "created_at": "2025-10-14T10:00:00.000Z",
  "creator_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
  "display_name": "Releases",
  "header": "Release announcements",
  "id": "cccccccccccccccccccccccccc",
  "last_post_at": "2025-10-14T10:00:00.000Z",
  "message_count": 12,
  "name": "releases",
  "purpose": "Where deploys are announced",
  "team_id": "tttttttttttttttttttttttttt",
  "type": "O",
  "type_label": "public",
  "updated_at": "2025-10-14T10:00:00.000Z"
}
```

### Delete post

Delete a post. Deleting a thread's first post deletes its replies too.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).

**Outputs**

- `deleted` (true/false): Always true
- `post_id` (text): Id of the deleted post

**Example output**

```json
{
  "deleted": true,
  "post_id": "pppppppppppppppppppppppppp"
}
```

### Edit post

Replace a post's text. Only your own posts, unless the account may edit others' posts.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).
- Message (`message`, text, required): The message text. Markdown, @mentions and emoji like :tada: work.

**Outputs**

- `channel_id` (text): Id of the channel it is in
- `created_at` (text): When it was posted
- `deleted` (true/false): Whether it has been deleted
- `edited_at` (text): When its text was last edited, or empty
- `file_ids` (list): Ids of attached files
- `hashtags` (list): Hashtags in the message
- `id` (text): Post id
- `is_reply` (true/false): Whether it is a reply in a thread
- `message` (text): The message text (Markdown)
- `priority` (text): standard, important or urgent
- `reactions` (list): Emoji reactions on the post
- `root_id` (text): Id of the thread's first post, for a reply; else empty
- `type` (text): Empty for a normal post, or a system post type
- `updated_at` (text): When it last changed
- `user_id` (text): Id of the author

**Example output**

```json
{
  "channel_id": "cccccccccccccccccccccccccc",
  "created_at": "2025-10-14T10:00:00.000Z",
  "deleted": false,
  "edited_at": "",
  "file_ids": [],
  "hashtags": [
    "#release"
  ],
  "id": "pppppppppppppppppppppppppp",
  "is_reply": false,
  "message": "Deploy finished :tada: #release",
  "priority": "standard",
  "reactions": [],
  "root_id": "",
  "type": "",
  "updated_at": "2025-10-14T10:00:00.000Z",
  "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
}
```

### Get channel

Get one channel with its name, purpose, header and message count.

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').

**Outputs**

- `archived` (true/false): Whether it is archived
- `archived_at` (text): When it was archived, or empty
- `created_at` (text): When it was created
- `creator_id` (text): Id of the person who created it
- `display_name` (text): The name people see
- `header` (text): The header shown at the top of the channel
- `id` (text): Channel id
- `last_post_at` (text): When the last message was posted
- `message_count` (number): How many messages it holds
- `name` (text): URL name, as in the channel's link
- `purpose` (text): What the channel is for
- `team_id` (text): Id of its team (empty for direct messages)
- `type` (text): O public, P private, D direct or G group message
- `type_label` (text): The type in words, such as public
- `updated_at` (text): When it last changed

**Example output**

```json
{
  "archived": false,
  "archived_at": "",
  "created_at": "2025-10-14T10:00:00.000Z",
  "creator_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
  "display_name": "Releases",
  "header": "Release announcements",
  "id": "cccccccccccccccccccccccccc",
  "last_post_at": "2025-10-14T10:00:00.000Z",
  "message_count": 12,
  "name": "releases",
  "purpose": "Where deploys are announced",
  "team_id": "tttttttttttttttttttttttttt",
  "type": "O",
  "type_label": "public",
  "updated_at": "2025-10-14T10:00:00.000Z"
}
```

### Get person

Get one person's profile by user id. Leave it as 'me' for the connected account.

**Inputs**

- Person (`person`, text): A user id, or 'me' for the connected account. Default: `me`.

**Outputs**

- `auth_service` (text): How they sign in, empty for email/password
- `created_at` (text): When the account was created
- `deactivated` (true/false): Whether the account is deactivated
- `email` (text): Email address, empty if the server hides it
- `first_name` (text): First name
- `full_name` (text): First and last name, or the username
- `id` (text): User id
- `last_name` (text): Last name
- `locale` (text): Language, such as en
- `nickname` (text): Nickname
- `roles` (text): System roles, space separated
- `updated_at` (text): When it last changed
- `username` (text): Username, without @

**Example output**

```json
{
  "auth_service": "",
  "created_at": "2025-10-14T10:00:00.000Z",
  "deactivated": false,
  "email": "jordan@example.com",
  "first_name": "Jordan",
  "full_name": "Jordan Smith",
  "id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
  "last_name": "Smith",
  "locale": "en",
  "nickname": "",
  "roles": "system_user",
  "updated_at": "2025-10-14T10:00:00.000Z",
  "username": "jordan"
}
```

### Get post

Get one post with its text, author, thread and reactions.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).

**Outputs**

- `channel_id` (text): Id of the channel it is in
- `created_at` (text): When it was posted
- `deleted` (true/false): Whether it has been deleted
- `edited_at` (text): When its text was last edited, or empty
- `file_ids` (list): Ids of attached files
- `hashtags` (list): Hashtags in the message
- `id` (text): Post id
- `is_reply` (true/false): Whether it is a reply in a thread
- `message` (text): The message text (Markdown)
- `priority` (text): standard, important or urgent
- `reactions` (list): Emoji reactions on the post
- `root_id` (text): Id of the thread's first post, for a reply; else empty
- `type` (text): Empty for a normal post, or a system post type
- `updated_at` (text): When it last changed
- `user_id` (text): Id of the author

**Example output**

```json
{
  "channel_id": "cccccccccccccccccccccccccc",
  "created_at": "2025-10-14T10:00:00.000Z",
  "deleted": false,
  "edited_at": "",
  "file_ids": [],
  "hashtags": [
    "#release"
  ],
  "id": "pppppppppppppppppppppppppp",
  "is_reply": false,
  "message": "Deploy finished :tada: #release",
  "priority": "standard",
  "reactions": [],
  "root_id": "",
  "type": "",
  "updated_at": "2025-10-14T10:00:00.000Z",
  "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
}
```

### Get thread

Get a thread, with its first post and every reply, oldest first. Any post in the thread will do.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).

**Outputs**

- `count` (number): How many posts were returned
- `has_next` (true/false): Whether more posts follow this page
- `next_post_id` (text): Id of the post after this page, if any
- `posts` (list): The posts
- `prev_post_id` (text): Id of the post before this page, if any

**Example output**

```json
{
  "count": 1,
  "has_next": false,
  "next_post_id": "",
  "posts": [
    {
      "channel_id": "cccccccccccccccccccccccccc",
      "created_at": "2025-10-14T10:00:00.000Z",
      "deleted": false,
      "edited_at": "",
      "file_ids": [],
      "hashtags": [
        "#release"
      ],
      "id": "pppppppppppppppppppppppppp",
      "is_reply": false,
      "message": "Deploy finished :tada: #release",
      "priority": "standard",
      "reactions": [],
      "root_id": "",
      "type": "",
      "updated_at": "2025-10-14T10:00:00.000Z",
      "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
    }
  ],
  "prev_post_id": ""
}
```

### List channel posts

List a channel's posts, newest first, a page at a time, or every post created or changed since a moment (up to 1,000).

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- Page (`page`, number): Which page to read, starting at 0 for the newest. At least 0. Default: `0`.
- Posts per page (`per_page`, number): How many posts per page, up to 200. From 1 to 200. Default: `60`.
- Changed since (`since`, date and time): Instead of paging, return posts created or changed after this moment. Cannot be combined with paging.

**Outputs**

- `count` (number): How many posts were returned
- `has_next` (true/false): Whether more posts follow this page
- `next_post_id` (text): Id of the post after this page, if any
- `posts` (list): The posts
- `prev_post_id` (text): Id of the post before this page, if any

**Example output**

```json
{
  "count": 1,
  "has_next": false,
  "next_post_id": "",
  "posts": [
    {
      "channel_id": "cccccccccccccccccccccccccc",
      "created_at": "2025-10-14T10:00:00.000Z",
      "deleted": false,
      "edited_at": "",
      "file_ids": [],
      "hashtags": [
        "#release"
      ],
      "id": "pppppppppppppppppppppppppp",
      "is_reply": false,
      "message": "Deploy finished :tada: #release",
      "priority": "standard",
      "reactions": [],
      "root_id": "",
      "type": "",
      "updated_at": "2025-10-14T10:00:00.000Z",
      "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
    }
  ],
  "prev_post_id": ""
}
```

### List my channels

List every channel the connected account is in on a team: public, private, direct and group messages.

**Inputs**

- Team (`team`, text, required): Pick one of your teams, or enter a team id.
- Include archived (`include_archived`, true/false): Also list archived channels. Default: `false`.

**Outputs**

- `channels` (list): The channels
- `count` (number): How many channels were returned

**Example output**

```json
{
  "channels": [
    {
      "archived": false,
      "archived_at": "",
      "created_at": "2025-10-14T10:00:00.000Z",
      "creator_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
      "display_name": "Releases",
      "header": "Release announcements",
      "id": "cccccccccccccccccccccccccc",
      "last_post_at": "2025-10-14T10:00:00.000Z",
      "message_count": 12,
      "name": "releases",
      "purpose": "Where deploys are announced",
      "team_id": "tttttttttttttttttttttttttt",
      "type": "O",
      "type_label": "public",
      "updated_at": "2025-10-14T10:00:00.000Z"
    }
  ],
  "count": 1
}
```

### List my teams

List every team the connected account is on, with their ids.

**Inputs**: None.

**Outputs**

- `count` (number): How many teams were returned
- `teams` (list): The teams

**Example output**

```json
{
  "count": 1,
  "teams": [
    {
      "allow_open_invite": false,
      "created_at": "2025-10-14T10:00:00.000Z",
      "description": "",
      "display_name": "Engineering",
      "id": "tttttttttttttttttttttttttt",
      "name": "engineering",
      "type": "O"
    }
  ]
}
```

### Open direct message

Open the direct-message channel between the connected account and one person, creating it if needed. Send to it with 'Send message' and the returned channel id.

**Inputs**

- Person (`member`, text, required): The user id of the person to message ('Search people' finds it), or 'me' for your own notes channel.

**Outputs**

- `archived` (true/false): Whether it is archived
- `archived_at` (text): When it was archived, or empty
- `created_at` (text): When it was created
- `creator_id` (text): Id of the person who created it
- `display_name` (text): The name people see
- `header` (text): The header shown at the top of the channel
- `id` (text): Channel id
- `last_post_at` (text): When the last message was posted
- `message_count` (number): How many messages it holds
- `name` (text): URL name, as in the channel's link
- `purpose` (text): What the channel is for
- `team_id` (text): Id of its team (empty for direct messages)
- `type` (text): O public, P private, D direct or G group message
- `type_label` (text): The type in words, such as public
- `updated_at` (text): When it last changed

**Example output**

```json
{
  "archived": false,
  "archived_at": "",
  "created_at": "2025-10-14T10:00:00.000Z",
  "creator_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
  "display_name": "Releases",
  "header": "Release announcements",
  "id": "cccccccccccccccccccccccccc",
  "last_post_at": "2025-10-14T10:00:00.000Z",
  "message_count": 12,
  "name": "releases",
  "purpose": "Where deploys are announced",
  "team_id": "tttttttttttttttttttttttttt",
  "type": "D",
  "type_label": "direct message",
  "updated_at": "2025-10-14T10:00:00.000Z"
}
```

### Pin post

Pin a post to its channel, so it shows under the channel's pinned messages.

**Inputs**

- Post (`post_id`, text, required): The post's id, or its link from Mattermost (a message's ... menu > Copy Link).

**Outputs**

- `pinned` (true/false): Always true
- `post_id` (text): Id of the pinned post

**Example output**

```json
{
  "pinned": true,
  "post_id": "pppppppppppppppppppppppppp"
}
```

### Remove person from channel

Remove someone from a public or private channel. 'me' makes the connected account leave it.

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- Person (`member`, text, required): The user id of the person to remove, or 'me' to leave.

**Outputs**

- `channel_id` (text): Channel id
- `removed` (true/false): Always true
- `user_id` (text): Id of the person removed

**Example output**

```json
{
  "channel_id": "cccccccccccccccccccccccccc",
  "removed": true,
  "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
}
```

### Search people

Find people by username, name, nickname or email. Use it to look up the user id other actions need.

**Inputs**

- Search for (`term`, text, required): Part of a username, name, nickname or email.
- Team (`team`, text): Only people on this team. Pick one of your teams, or enter a team id.
- In channel (`in_channel`, text): Only people in this channel. Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- Include deactivated people (`include_inactive`, true/false): Also return deactivated accounts. Default: `false`.
- Maximum results (`limit`, number): How many people to return, up to 100. From 1 to 100. Default: `100`.

**Outputs**

- `count` (number): How many people matched
- `users` (list): The matching people

**Example output**

```json
{
  "count": 1,
  "users": [
    {
      "auth_service": "",
      "created_at": "2025-10-14T10:00:00.000Z",
      "deactivated": false,
      "email": "jordan@example.com",
      "first_name": "Jordan",
      "full_name": "Jordan Smith",
      "id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
      "last_name": "Smith",
      "locale": "en",
      "nickname": "",
      "roles": "system_user",
      "updated_at": "2025-10-14T10:00:00.000Z",
      "username": "jordan"
    }
  ]
}
```

### Search posts

Search a team's messages. Supports Mattermost's search syntax: "exact phrase", from:username, in:channel-name, before:/after:/on: YYYY-MM-DD and -excluded words.

**Inputs**

- Team (`team`, text, required): Pick one of your teams, or enter a team id.
- Search for (`terms`, text, required): Words to find, with optional search modifiers.
- Match any word (`match_any`, true/false): Find posts with any of the words, instead of all of them. Default: `false`.

**Outputs**

- `count` (number): How many posts matched
- `posts` (list): The matching posts, newest first

**Example output**

```json
{
  "count": 1,
  "posts": [
    {
      "channel_id": "cccccccccccccccccccccccccc",
      "created_at": "2025-10-14T10:00:00.000Z",
      "deleted": false,
      "edited_at": "",
      "file_ids": [],
      "hashtags": [
        "#release"
      ],
      "id": "pppppppppppppppppppppppppp",
      "is_reply": false,
      "message": "Deploy finished :tada: #release",
      "priority": "standard",
      "reactions": [],
      "root_id": "",
      "type": "",
      "updated_at": "2025-10-14T10:00:00.000Z",
      "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
    }
  ]
}
```

### Send message

Post a message to a channel, or reply in a thread by giving the thread's first post. Mark it Important or Urgent to highlight it (Entry, Professional and Enterprise servers).

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- Message (`message`, text, required): The message text. Markdown, @mentions and emoji like :tada: work.
- Reply to post (`root_id`, text): To reply in a thread, the id or link of the thread's first post. Leave empty for a new message.
- Priority (`priority`, text): Important and Urgent add a label to the message. Not available on Team Edition servers. One of: `standard`, `important`, `urgent`. Default: `standard`.

**Outputs**

- `channel_id` (text): Id of the channel it is in
- `created_at` (text): When it was posted
- `deleted` (true/false): Whether it has been deleted
- `edited_at` (text): When its text was last edited, or empty
- `file_ids` (list): Ids of attached files
- `hashtags` (list): Hashtags in the message
- `id` (text): Post id
- `is_reply` (true/false): Whether it is a reply in a thread
- `message` (text): The message text (Markdown)
- `priority` (text): standard, important or urgent
- `reactions` (list): Emoji reactions on the post
- `root_id` (text): Id of the thread's first post, for a reply; else empty
- `type` (text): Empty for a normal post, or a system post type
- `updated_at` (text): When it last changed
- `user_id` (text): Id of the author

**Example output**

```json
{
  "channel_id": "cccccccccccccccccccccccccc",
  "created_at": "2025-10-14T10:00:00.000Z",
  "deleted": false,
  "edited_at": "",
  "file_ids": [],
  "hashtags": [
    "#release"
  ],
  "id": "pppppppppppppppppppppppppp",
  "is_reply": false,
  "message": "Deploy finished :tada: #release",
  "priority": "standard",
  "reactions": [],
  "root_id": "",
  "type": "",
  "updated_at": "2025-10-14T10:00:00.000Z",
  "user_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu"
}
```

### Update channel

Change a channel's name, URL name, purpose or header. Fields left empty stay as they are. Direct messages only take a header.

**Inputs**

- Channel (`channel`, text, required): Pick one of your channels, or enter a channel id (from the channel name > View Info in Mattermost, or 'List my channels').
- Channel name (`display_name`, text): A new name people see.
- URL name (`name`, text): A new name for the channel's link. Old links stop working.
- Purpose (`purpose`, text): A new purpose.
- Header (`header`, text): A new header. Markdown works.

**Outputs**

- `archived` (true/false): Whether it is archived
- `archived_at` (text): When it was archived, or empty
- `created_at` (text): When it was created
- `creator_id` (text): Id of the person who created it
- `display_name` (text): The name people see
- `header` (text): The header shown at the top of the channel
- `id` (text): Channel id
- `last_post_at` (text): When the last message was posted
- `message_count` (number): How many messages it holds
- `name` (text): URL name, as in the channel's link
- `purpose` (text): What the channel is for
- `team_id` (text): Id of its team (empty for direct messages)
- `type` (text): O public, P private, D direct or G group message
- `type_label` (text): The type in words, such as public
- `updated_at` (text): When it last changed

**Example output**

```json
{
  "archived": false,
  "archived_at": "",
  "created_at": "2025-10-14T10:00:00.000Z",
  "creator_id": "uuuuuuuuuuuuuuuuuuuuuuuuuu",
  "display_name": "Releases",
  "header": "Release announcements",
  "id": "cccccccccccccccccccccccccc",
  "last_post_at": "2025-10-14T10:00:00.000Z",
  "message_count": 12,
  "name": "releases",
  "purpose": "Where deploys are announced",
  "team_id": "tttttttttttttttttttttttttt",
  "type": "O",
  "type_label": "public",
  "updated_at": "2025-10-14T10:00:00.000Z"
}
```
