Mattermost @a24k icon

Mattermost @a24k

Post messages to Mattermost with file and rich attachment support

Mattermost @a24k

AI-generated

Summary

Posts a message to a Mattermost channel, optionally including uploaded files, rich attachments, and a thread parent. Uses the configured Mattermost API credentials and returns details from the created post for each input item.

Inputs

  • Channel ID (required) — Channel to post to. During manual test runs, Advanced Options → Channel ID for Test Run can override this.
  • Message — Post body; supports Markdown. If empty, the message can instead come from Extra Body Fields JSON.
  • Root Post ID — Parent post ID for a thread reply. Overrides a resolved Thread Group Key and any root_id in Extra Body Fields.
  • Files — Comma-separated n8n binary property names to upload, up to 10 total including names supplied through Extra Body Fields. Uploads are attached to the post; sequential upload can preserve listed order.
  • Attachments — One or more rich attachments, each requiring a fallback string. Optional fields include color, Markdown text, author and footer details, image or thumbnail URLs, title and link, and tabular fields with title, value, and short layout setting.
  • Advanced Options → Extra Body Fields — JSON object of additional Mattermost post fields. It can also supply message, root_id, file_ids, props, or file binary property names; UI values take precedence for channel_id and non-empty message/root ID. JSON file IDs and uploaded file IDs are combined, and JSON attachments are followed by UI attachments.
  • Advanced Options → Thread Group Key — Automatically reuses or records a thread root for posts with the same key and effective channel, using the Mattermost user preferences API. Ignored when Root Post ID is set.
  • Advanced Options → Channel ID for Test Run — Routes manual test executions to this channel instead of the required Channel ID.
  • Advanced Options → Upload Files Sequentially — Uploads files one at a time in the listed order; otherwise uploads them in parallel, with no guaranteed order.

Output shape

A list of n8n items, one per successfully processed input item, each containing a post record.

Successful records include post_id, channel_id, message, file_ids, and create_at; when a Thread Group Key is used, they also include thread_group_key and thread_root_post_id. With Continue On Fail, errors are returned as items containing error; upload or post failures after successful uploads can also include uploaded_file_ids. Without Continue On Fail, errors are thrown.

Links

Discussion