VOOZH about

URL: https://apify.com/jungle_synthesizer/mattermost-message-scraper

โ‡ฑ Mattermost Message Scraper - Export Chat History ยท Apify


Pricing

Pay per event

Go to Apify Store

Mattermost Message Scraper

Export messages from any Mattermost workspace โ€” self-hosted or cloud. Provide your instance URL and a personal access token to scrape channels and posts. Supports team/channel filtering, date ranges, and direct message channels.

Pricing

Pay per event

Rating

0.0

(0)

Developer

๐Ÿ‘ BowTiedRaccoon

BowTiedRaccoon

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

4 days ago

Last modified

Share

Mattermost Message Scraper - Export Chat History from Self-Hosted or Cloud

Export messages from any Mattermost workspace โ€” both self-hosted instances and Mattermost Cloud. Connect with your instance URL and a personal access token to scrape teams, channels, and posts. Supports filtering by team name, channel name, date range, and direct messages. Returns 23 fields per message including team and channel context, author, message body (plain Markdown), reactions, and file attachment IDs.

post_message is stored as plain Markdown text, which makes it directly usable for Confluence or Notion imports, RAG pipeline ingestion, or knowledge base extraction without additional parsing.

What does the Mattermost scraper do?

It authenticates to the Mattermost REST API v4 using your personal access token, enumerates teams and channels accessible to that user, and paginates through posts in each channel. Usernames are resolved from a local cache to minimize API calls. The default API rate limit on self-hosted Mattermost is generous for authenticated users โ€” typically 200+ requests per second.

What data does it extract?

Each record represents one Mattermost post:

FieldTypeDescription
instance_urlstringBase URL of the Mattermost instance
team_idstringTeam UUID
team_namestringTeam URL slug
team_display_namestringTeam display name
channel_idstringChannel UUID
channel_namestringChannel URL slug
channel_display_namestringChannel display name
channel_typestringO=public, P=private, D=direct, G=group
channel_headerstringChannel header text
channel_purposestringChannel purpose text
post_idstringPost UUID
post_root_idstringParent post UUID (empty for root posts, set for thread replies)
post_create_atintegerCreation timestamp in milliseconds since Unix epoch
post_update_atintegerLast update timestamp in ms
post_edit_atintegerLast edit timestamp in ms (0 if never edited)
post_user_idstringAuthor's user UUID
post_user_usernamestringAuthor's username
post_messagestringPost body text (Markdown)
post_typestringEmpty for regular posts; system_* for system messages
post_hashtagsstringSpace-separated hashtags
post_reactionsstringJSON array of emoji reactions [{emoji_name, user_id, create_at}]
post_file_idsstringJSON array of file attachment IDs
post_propsstringJSON object with post metadata (attachments, overrides, etc.)

Sample output record

{
"instance_url":"https://community.mattermost.com",
"team_display_name":"Contributors",
"channel_display_name":"Town Square",
"channel_type":"O",
"post_id":"3yd1q7gcrinbdmdq5qmnggd4xy",
"post_root_id":"",
"post_create_at":1748063442000,
"post_user_username":"john.doe",
"post_message":"Has anyone seen the new API docs? The pagination endpoint changed.",
"post_type":"",
"post_reactions":"[{\"emoji_name\":\"thumbsup\",\"user_id\":\"abc123\",\"create_at\":1748063500000}]",
"post_file_ids":"[]"
}

How to use it

InputRequiredDescription
instanceUrlYesBase URL of your Mattermost instance (e.g. https://mattermost.yourcompany.com). Works with self-hosted and Mattermost Cloud.
accessTokenYesPersonal access token (see setup below)
teamNamesNoList of team URL slugs to scrape. Leave empty for all accessible teams.
channelNamesNoList of channel names to scrape within selected teams. Leave empty for all.
sinceDateNoOnly fetch posts on or after this date (ISO 8601)
untilDateNoOnly fetch posts on or before this date (ISO 8601)
includeDirectMessagesNoSet true to include DM and group message channels
maxItemsNoMaximum number of posts to return

Generating a personal access token

  1. Log in to your Mattermost instance
  2. Go to Account Settings โ†’ Security โ†’ Personal Access Tokens
  3. Click Create Token, give it a description, and copy the token

The path may vary slightly between Mattermost versions and UI themes. Administrators can also generate tokens from the Admin Panel โ†’ Users panel for any user account.

Example input

{
"instanceUrl":"https://mattermost.yourcompany.com",
"accessToken":"your-personal-access-token",
"teamNames":["engineering"],
"channelNames":["general","incidents"],
"sinceDate":"2024-01-01",
"maxItems":5000
}

Use cases

  • Compliance archival โ€” export message history for legal hold or regulatory retention requirements in enterprise and government Mattermost deployments
  • Platform migration โ€” export messages to move to Slack, Microsoft Teams, or a custom data warehouse
  • Knowledge base export โ€” post_message is plain Markdown, so channel history exports directly to Confluence, Notion, or any RAG pipeline without additional parsing
  • Incident retrospectives โ€” extract incident channel history for post-mortems, filtered by date range
  • Communication analytics โ€” analyze team communication patterns, channel activity, and response times across channels

FAQ

Does this work with Mattermost Cloud? Yes. Set instanceUrl to your cloud workspace URL (e.g. https://yourteam.cloud.mattermost.com). The REST API v4 is identical between self-hosted and cloud.

What permissions does the token need? A standard personal access token with the authenticated user's default permissions is sufficient. The actor only reads data the token's user can access โ€” private channels and DMs are included only if the user is a member.

How do I handle very large workspaces? Set maxItems to limit the run, then resume by setting sinceDate to the date of the last run. The actor pages through channels in batches of 200 posts per API request.

Output is available in JSON, CSV, and Excel via the Apify dataset export panel.

You might also like

Rocket.Chat Message Scraper

jungle_synthesizer/rocketchat-message-scraper

Export messages, channels, private groups, and direct messages from any Rocket.Chat instance using the REST API. Authenticate with a personal access token. Supports date-range filters, room allowlists, and full thread history.

๐Ÿ‘ User avatar

BowTiedRaccoon

1

Telegram Public Channel Scraper

rupom888/telegram-scraper

Scrape public Telegram channels for messages, media, and channel info. Extract message text, date, views, forwards, reactions, and media attachments. Get channel statistics: subscriber count, description, and message history. Works with public channels only โ€” no login required.

Discord Message Scraper

jungle_synthesizer/discord-message-scraper

Scrape messages from Discord channels

๐Ÿ‘ User avatar

BowTiedRaccoon

223

Telegram Channels Scraper: Messages, Contacts & Leads

khadinakbar/telegram-channel-scraper

Extract message history, view counts, reactions, media URLs, links, emails, and channel metadata from public Telegram channels. No API key or login required.

90

Telegram Group/channel Message Scraper

bhansalisoft/telegram-group-channel-message-scraper

Telegram Group/channel Message Scraper- Scrap Telegram Groups/Channel message from chat history

477

1.0

Telegram Scraper - Channels, Messages, Media & Search

scrapesage/telegram-scraper

Scrape public Telegram channels: full message history, media, reactions, polls, forwards, replies, link previews, channel stats, and in-channel keyword search. HTTP-only, no login or phone number required.

Slack Message Scraper

jungle_synthesizer/slack-message-scraper

Extract messages from Slack channels using browser tokens. Supports public/private channels, DMs, threads, and reactions. No OAuth app required.

๐Ÿ‘ User avatar

BowTiedRaccoon

10

Instagram Message Sender

clothefobia/instagram-message-sender

Instagram Message Sender- Send message to any instagram userid.

236

Related articles

How to use the Discord API in Python
Read more