Recommendations for handling automation that wants to post messages longer than 4000 characters per message

Mattermost limits messages to 4000 characters due to the database column type used and in order to not affect performance, that’s the limit for the foreseeable future.

There’s automation users are building that needs to send messages more than 4000 characters long.

Opening a thread to get ideas and recommendations from the community on how to address this.

Reference: https://github.com/mattermost/platform/issues/2769

1 Like

contolini mentioned working around this issue by posting large messages to anonymous GitHub gists.

What if the bot API automatically uploaded large messages as if they were text file attachments?

The message portion of the post could contain an automatically-generated snippet preview of the text attachment contents.

And clients could be improved so that when a user clicks on a text file attachment, it displays the text inline inside a pane with a scrollbar, so that the user doesn’t have to download the text file locally in order to read the full message.

1 Like

Our team often send some massive logs and text. @fjarlq 's idea, the bot API, automatically upload it as text file attachments, is really needed for us!!

This is definitely a dealbreaker for us. Posting stacktraces and logparts and stuff daily. The limit of 4000 chars is way too low.
Any workaround should be automatic. If i have to use a third party application for stacktraces, it should post and show the text automatically.

1 Like

Totally makes sense, we can open a ticket to add this if you’d like to help contribute?

1 Like

When the limit of 4000 chars is reached, offer to make an attachment auto-upload.

The attachment should not just consist of an icon, but some of the content should be displayed.

Done …

1 Like

Thanks for starting this thread guys. I like the idea of auto uploading.

Why not to do exactly as Slack does with snippets?