FoPost LogoFoPost Docs
Platforms

Slack

Publishing messages to Slack channels.

Slack

Slack supports two modes - bot token and webhook - with Block Kit layout support.

Connect

Connect Slack in the OwlStack dashboard:

Bot token mode:

  1. Go to Project Settings > Platforms > Slack
  2. Click Connect with Slack
  3. Authorize OwlStack and select a workspace
  4. Choose the target channel

Webhook mode:

  1. In your Slack workspace, create an incoming webhook
  2. Paste the webhook URL in the OwlStack dashboard

Publishing

use OwlStack\Enums\Platform;

$result = $client->publish($post, [Platform::Slack]);

Options

OptionTypeDescription
blocksboolUse Block Kit layout
thread_tsstringReply in thread
unfurl_linksboolUnfurl URLs
$result = $client->publish($post, [Platform::Slack], [
    'blocks' => true,
    'unfurl_links' => true,
]);

Constraints

ConstraintValue
Max text length40,000 characters
Formatter markupmrkdwn

On this page