#16047·chatwoot

Slack integration: audio files posted in a Slack thread are relayed as generic files, so Instagram (and WhatsApp) never receive a voice note

Author: AswinmcwCreated Sep 28, 2026Updated Sep 29, 2026
LabelsslackBug📷 channel/instagram

Describe the bug

When an agent replies inside the Slack thread of a conversation by uploading an audio file (mp3, m4a, wav, ogg), Chatwoot creates the outgoing message with the attachment typed as file rather than audio.

The cause is Integrations::Slack::SlackMessageHelper#file_type, which only maps image and video Slack filetypes and falls through to :file for everything else:

https://github.com/chatwoot/chatwoot/blob/develop/lib/integrations/slack/slack_message_helper.rb#L67-L79

The channel send services pass that type straight to the provider (Instagram::BaseSendService#attachment_type uses attachment.file_type), so Instagram receives attachment.type: "file" and shows a document, not a playable voice note. Instagram documents its file type as PDF only. The very same clip uploaded from the dashboard or the API arrives as audio, because Messages::MessageBuilder types attachments by content type through FileTypeHelper#file_type, which returns :audio for any audio/*.

To Reproduce

  1. Connect the Slack integration in two-way mode and have an Instagram (or WhatsApp) inbox.
  2. Let a contact write in, so the conversation appears as a Slack thread.
  3. In that Slack thread, upload an mp3 (or wav / m4a).
  4. In Chatwoot the message is created with attachments[0].file_type == "file"; on Instagram the contact receives a file attachment instead of an audio message.
  5. Upload the same mp3 from the Chatwoot dashboard: file_type == "audio", Instagram shows a voice note.

Expected behavior

Audio uploaded from Slack should be typed audio, consistent with uploads from the dashboard and API, so Instagram and WhatsApp render it as a voice note.

Environment

Chatwoot Cloud (app.chatwoot.com), Instagram channel, Slack integration.

Additional context

Slack reports filetype values mp3, m4a, wav, ogg for audio and a mimetype of audio/*. A fix that checks the mimetype first (mirroring FileTypeHelper) and adds those filetypes to the explicit list follows in a PR.