Create Post
mattermost.create_post
ActionChat & messagingconnection required
Calls the Mattermost API with the connection's credentials.
Post a message to a channel. Mattermost addresses channels by id, so this needs a channel_id — resolve a channel name first with mattermost.get_channel_by_name.
Connection
- Required
- Yes — the node will not save without one
- Auth type
- Bearer token
- Providers
- Mattermost
- Secret shape
- the personal access token, or {"token": "…"}
- Config it needs
- base_url, team_id
- Resolved by
- config.connection_id, else node.connection_id
Configuration
5 fields, 1 required. A dotted path is a nested object and name[] an array of objects — the editor renders the same tree.
| Field | Type | Required | Default | Constraints | Example |
|---|---|---|---|---|---|
channel_id The channel id (not its name) — use mattermost.get_channel_by_name to resolve one. | string | Yes | — | — | — |
message The markdown message to post. | string | No | — | — | — |
root_id Post as a reply in this thread; leave blank for a new thread. | string | No | — | — | — |
file_ids File ids to attach, from mattermost.upload_file. | array | No | — | array of string | — |
props Post props (JSON) — message attachments go in props.attachments. | object | No | — | — | — |
- At least one of message, file_ids must be set.
Output
One shape.
result
| Field | Type | Example |
|---|---|---|
id The post id. | string | pst1234567890abcdefghijklmn |
channel_id The channel the post belongs to. | string | — |
user_id The author — the token's user for a post this node made. | string | — |
message The post's markdown message. | string | — |
root_id The thread root, or an empty string for a top-level post. | string | — |
create_at Creation time, in milliseconds since the epoch. | number | — |
type The post type; empty for an ordinary user post. | string | — |
{
"channel_id": "",
"create_at": 0,
"id": "pst1234567890abcdefghijklmn",
"message": "",
"root_id": "",
"type": "",
"user_id": ""
}Notes
- A post needs a message, one or more file_ids, or both.
- Rich attachments are props.attachments, an array of Mattermost message attachment objects.
See Create Post run in a workflow.
In a technical demo we add the Mattermost connection, drop the node on the canvas and let Workflow Health pre-flight it before the first real run.