> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Post to Slack

> How a Slack workspace connects, and what it takes through the API: channel messages with a header, a button and files, thread replies, first comments, text limits, deletes, comments and analytics.

A Slack account is a whole workspace, with `platform` `slack`. Each post goes to one channel in it: `settings.channel_id`, or the channel saved in the account's [Post defaults](/docs/guides/account-defaults.md). A post is one message carrying its text and its files.

## Connect a workspace

Make a [connect link](/docs/api-reference/accounts/connect-link.md) with `provider` `slack`, or open **Accounts** in the app. The person who connects signs in to Slack and allows what PostSyncer's Slack app asks for: posting, posting under its own name and icon, joining public channels, listing channels, uploading files and reading reactions. PostSyncer doesn't ask to read a channel's messages.

* One workspace is one account, whatever the number of channels.
* Enterprise Grid org-wide installs are refused: connect a single workspace.
* The sign-in renews itself. When Slack ends it (the app is removed, say), the account shows **Needs reconnecting**.

## Pick a channel

[List Slack channels](/docs/api-reference/accounts/slack-channels.md) (or the MCP tool `list-slack-posting-channels`) gives each channel's `id`.

* Public channels are listed to everyone in the workspace. PostSyncer posts in a public channel without joining it. A post with files joins the channel first, since Slack shares files only in a channel the app is in.
* A private channel needs the app first: type `/invite @PostSyncer` in it. Private channels are listed only to the person who connected the workspace, since their names are private to their members. Anyone else sees a post's private channel as "Private channel".
* The list is kept on the account and read again in the background when it's more than 10 minutes old; `meta.refreshing` says when that's happening.
* When a read from Slack fails, `meta.error` says why, and the list is the last one read. The next read waits 5 minutes.

## What you can post

* A text message.
* Text with up to 10 photos, videos and documents, in the same message.
* A header over the text and a link button under it.
* A thread: the message, then replies under it.

## Settings

Every key but `channel_id` is optional. [Create a post](/docs/api-reference/posts/create.md#platform-specific-settings) has the full list.

| Key | What it does |
| - | - |
| `channel_id` | The channel, such as `C01ANNOUNCE`. Needed to publish, unless the account's Post defaults have one. |
| `title` | A header over the text, up to 150 characters. |
| `text` | Slack's own text, instead of the post's text. |
| `username` | The name the message shows, up to 80 characters. |
| `icon_emoji` | The icon it shows, as an emoji such as `:coffee:`. |
| `icon_url` | The icon it shows, as an `https://` image link. |
| `unfurl_links` | Show previews of links. On by default. |
| `unfurl_media` | Show previews of linked media. On by default. |
| `reply_broadcast` | Show the thread's replies in the channel too. Off by default. |
| `cta_label` | A button's label, up to 75 characters. Needs `cta_url`. |
| `cta_url` | The button's `http://` or `https://` link. Needs `cta_label`. |
| `hashtags` | Up to 30 hashtags added after the text. |
| `first_comment` | A first reply in the thread, when the post has no first comment of its own. |
| `first_comment_delay` | Minutes after the post its first comment goes out, 0 to 10080 (7 days); 1 when left out. `0` sends it with the post. |
| `first_comment_media` | The first comment's media library ids, in order: up to 10 files. |
| `media` | This account's own media library ids, instead of the first item's media. |

## Text

* A message takes 40,000 characters. PostSyncer cuts a longer text to that when it's sent.
* Slack's own formatting works: `*bold*`, `_italic_`, `` `code` ``, links and mentions of people (`<@U…>`) and channels (`<#C…>`).
* `&`, `<` and `>` are escaped, so `Save 20% <today only>` shows as typed. `@channel`, `@here` and `@everyone` never ping from a scheduled post.
* With a header or a button, long text is split between paragraphs across Slack's sections (3,000 characters each, up to 50 blocks), never cut off.

## Media

| | Limit |
| - | - |
| Files in one post | Up to 10 photos, videos and documents |
| Photo | Up to 25 MB |
| Video | Up to 100 MB |
| Picture types | JPG, PNG, GIF, WebP |
| Video types | MP4, MOV, WebM |
| Document types | PDF, DOC, DOCX, PPT, PPTX |

* The files go up first, then the message goes out with the text, the header, the button and the files: one message, never the text twice.
* A file's alt text, set in the app's media library, goes with it.
* CSV and TXT files can't be added to the media library. Share them as a link.

## More than one item

Each item after the first is a reply in the message's thread, with its own text and files. `reply_broadcast` shows the replies in the channel too.

A first comment (`is_first_comment: true`) is a reply in the thread. With `first_comment_delay` `0` it goes out with the post; with a delay (1 minute when you leave it out), it's posted that many minutes later.

If a reply fails after the message went out, the post is still published, with a note of what didn't go out. When Slack asks PostSyncer to slow down, the publish waits as long as Slack says and sends again; it's a slow-down, not a refusal.

## Delete a post

Deleting the post in PostSyncer asks Slack to delete the message, its replies from the post, the replies PostSyncer sent from the comments screen, and the post's files. A message already gone counts as deleted. [Test safely](/docs/test-safely.md#what-cant-be-undone) says what happens when Slack refuses.

## Comments

* PostSyncer doesn't read a channel's messages, so replies other people write don't show in the comments screen.
* A reply sent from PostSyncer goes in the post's thread, with photos or files, and can be deleted from PostSyncer.
* Slack can't hide replies: hide answers `422` with `Slack can't hide comments. Delete the comment instead.`

## Analytics

Slack gives `likes` (the message's reactions) and `comments` (the replies in its thread), read from one `reactions.get` answer. It gives no `impressions`, so `engagement_rate` is `null`. See [Read analytics](/docs/guides/analytics.md).

## Example

A post with a header, a button and a thread reply:

```json theme={null}
{
  "workspace_id": 4815,
  "schedule_type": "draft",
  "content": [
    {
      "text": "Fresh *Ethiopia Guji* lots just landed in the roastery.",
      "media": ["https://cdn.postsyncer.com/examples/latte-art.jpg"]
    },
    {
      "text": "Tasting notes: bergamot, peach and jasmine."
    }
  ],
  "accounts": [
    {
      "id": 16410,
      "settings": {
        "channel_id": "C01ANNOUNCE",
        "title": "New harvest",
        "cta_label": "See the menu",
        "cta_url": "https://haldencoffee.example/guji"
      }
    }
  ]
}
```

## Related

> [card] [List Slack channels](/docs/api-reference/accounts/slack-channels.md)
>
> The channels a post can go to.

> [card] [Compare the 14 networks](/docs/platforms/overview.md)
>
> How Slack differs from the other networks.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.