How to get a binary file from Slack

Describe the problem/error/question

I want to download a file from a Slack channel to be uploaded elsewhere. However, when I use the Slack node with the operation “Get file”, it just returns the metadata, no binaries.

Do I have to use an additional HTTP request based on the URL of the file?

Please share your workflow

Share the output returned by the last node

[
  {
    "id": "F08DLHNRHKQ",
    "created": 1739875684,
    "timestamp": 1739875684,
    "name": "test.png",
    "title": "test.png",
    "mimetype": "image/png",
    "filetype": "png",
    "pretty_type": "PNG",
    "user": "U028GD8DM5W",
    "user_team": "T04T612MR",
    "editable": false,
    "size": 1086,
    "mode": "hosted",
    "is_external": false,
    "external_type": "",
    "is_public": true,
    "public_url_shared": false,
    "display_as_bot": false,
    "username": "",
    "url_private": "https://files.slack.com/files-pri/T04T612MR-F08DLHNRHKQ/test.png",
    "url_private_download": "https://files.slack.com/files-pri/T04T612MR-F08DLHNRHKQ/download/test.png",
    "media_display_type": "unknown",
    "thumb_64": "https://files.slack.com/files-tmb/T04T612MR-F08DLHNRHKQ-92c4f243c0/test_64.png",
    "thumb_80": "https://files.slack.com/files-tmb/T04T612MR-F08DLHNRHKQ-92c4f243c0/test_80.png",
    "thumb_360": "https://files.slack.com/files-tmb/T04T612MR-F08DLHNRHKQ-92c4f243c0/test_360.png",
    "thumb_360_w": 296,
    "thumb_360_h": 265,
    "thumb_160": "https://files.slack.com/files-tmb/T04T612MR-F08DLHNRHKQ-92c4f243c0/test_160.png",
    "original_w": 296,
    "original_h": 265,
    "thumb_tiny": "AwAqADDTpCeQB1NKTim9D74oAXB9TRg+tL2pAaAFB/OikPTPpS0AIeopTjvR1pOnWgBaTp0HWjke9HU5oAD0NLSdT9KWgAooooATHpxRg+tLRQAdKKKKAP/Z",
    "permalink": "https://hitmeister.slack.com/files/U028GD8DM5W/F08DLHNRHKQ/test.png",
    "permalink_public": "https://slack-files.com/T04T612MR-F08DLHNRHKQ-67166bd4c7",
    "is_starred": false,
    "shares": {
      "public": {
        "C08D8KX70M6": [
          {
            "reply_users": [
              "U08CDJP5JHL",
              "U028GD8DM5W"
            ],
            "reply_users_count": 2,
            "reply_count": 1,
            "ts": "1739956891.998259",
            "latest_reply": "1739956898.669069",
            "channel_name": "n8n-test",
            "team_id": "T04T612MR",
            "share_user_id": "U028GD8DM5W",
            "source": "UNKNOWN"
          },
          {
            "reply_users": [
              "U08CDJP5JHL",
              "U028GD8DM5W"
            ],
            "reply_users_count": 2,
            "reply_count": 1,
            "ts": "1739956314.414749",
            "latest_reply": "1739956322.553279",
            "channel_name": "n8n-test",
            "team_id": "T04T612MR",
            "share_user_id": "U028GD8DM5W",
            "source": "UNKNOWN"
          },
          {
            "reply_users": [
              "U08CDJP5JHL",
              "U028GD8DM5W"
            ],
            "reply_users_count": 2,
            "reply_count": 1,
            "ts": "1739892101.741469",
            "latest_reply": "1739892105.714789",
            "channel_name": "n8n-test",
            "team_id": "T04T612MR",
            "share_user_id": "U028GD8DM5W",
            "source": "UNKNOWN"
          }
        ]
      }
    },
    "channels": [
      "C08D8KX70M6"
    ],
    "groups": [],
    "ims": [],
    "has_more_shares": false,
    "has_rich_preview": false,
    "file_access": "visible",
    "comments_count": 0
  }
]

Information on your n8n setup

  • Running n8n via (Docker, npm, n8n cloud, desktop app): Cloud

This may help:

There are methods in the HTTP node to configure output responses, you will most likely have to provide the url of the file to the http node and choose the file output response type.

2 Likes