FoPost LogoFoPost Docs
WordPressPlatform Configuration

Slack

Configure Slack in the FoPost WordPress plugin.

Slack

Configure the OwlStack WordPress plugin to publish posts to your Slack workspace channels.

Prerequisites

You can connect Slack using either a webhook (simpler) or a bot (more flexible).

Creating a Slack Webhook

  1. Go to Slack API: Incoming Webhooks
  2. Create a new Slack app (or use an existing one)
  3. Enable Incoming Webhooks
  4. Click Add New Webhook to Workspace
  5. Select the target channel and authorize
  6. Copy the Webhook URL

Option B: Bot

Creating a Slack Bot

  1. Go to Slack API and create a new app
  2. Go to OAuth & Permissions
  3. Add the chat:write bot scope
  4. Install the app to your workspace
  5. Copy the Bot Token (starts with xoxb-)
  6. Invite the bot to your target channel with /invite @YourBot

Settings

Navigate to OwlStack > Slack in the WordPress admin.

FieldDescription
Bot TokenSlack bot token, starts with xoxb- (for bot mode)
ChannelTarget channel name, e.g., #general (required for bot mode)
Webhook URLSlack incoming webhook URL (for webhook mode)

Webhook vs. Bot

Use Webhook mode for simple posting to a single channel. Use Bot mode to publish to multiple channels or customize the sender name and icon.

Step-by-step (Webhook)

  1. Go to OwlStack > Slack in your WordPress admin
  2. Paste your Webhook URL
  3. Click Save Settings

Step-by-step (Bot)

  1. Go to OwlStack > Slack in your WordPress admin
  2. Paste your Bot Token
  3. Enter the target Channel (e.g., #general)
  4. Click Save Settings

Testing

After saving your settings:

  1. Click Test Connection to verify your webhook or bot token
  2. Click Send Test Message to post a test message
  3. Check your Slack channel to confirm the message appeared

Publishing

Once configured, Slack appears as a toggle in the OwlStack meta box on post edit screens.

Programmatic publishing

// Simple message
owlstack()->slack('Hello from WordPress!');

// Message to a specific channel (bot mode)
owlstack()->slack('New post published!', null, null, [
    'channel' => '#announcements',
]);

Constraints

ConstraintValue
Max message length40,000 characters
Max attachments20
Supported media typesJPEG, PNG, GIF, MP4, PDF
Max file size1 GB

Troubleshooting

IssueSolution
"Invalid webhook"The webhook URL may have been revoked; create a new one
"channel_not_found"Verify the channel name; for bot mode, invite the bot to the channel first
"not_authed"Bot token is invalid or expired
Messages not appearingEnsure the bot has chat:write scope and is a member of the channel

On this page