Skip to main content
Applies to:
  • Plan -
  • Deployment -

Summary

Slack alerts can be created programmatically with the Project automation API. Create a project_automation where config.event_type is "logs" and config.action.type is "slack", then set workspace_id and channel to the Slack workspace and channel IDs. Ensure the Slack integration is enabled and the API key can create project automations.

What is happening

The UI exposes Slack alert setup but the same behavior can be reproduced via the project_automation API. When you POST to /v1/project_automation with an action of type "slack", the platform sends alerts to the specified Slack workspace and channel. If the workspace app is not installed or the bot lacks channel write permissions, messages will not arrive.

Fix or suggestion

  1. Ensure the Slack integration/app is installed in the target workspace and the bot can post to the channel.
  2. Use an API key with permission to create project automations.
  3. POST a project_automation with a config that includes event_type, btql_filter, interval_seconds, and an action of type "slack". Example minimal payload:
Notes:
  • Use Slack workspace and channel IDs, such as T... and C.... The channel field is the Slack channel ID, not the channel name.
  • Ensure the Slack app has the scopes required to post messages to the target channel.

Option 2: Configure Slack alerts via the UI

  1. Go to Settings > Alerts.
  2. Click New alert and select Slack as the destination.
  3. Select the workspace and channel from the dropdowns.
Use the UI if you prefer interactive workspace/channel selection or if you need the platform to refresh channel lists automatically.

How to confirm it worked

  • Verify the automation appears in the project’s automations list in the UI.
  • Trigger a test event matching your filter and confirm a message appears in the specified Slack channel.

Notes

  • For UI setup, see Alerts. For the API schema, see Create project automation.
  • POST /v1/project_automation returns an existing automation unchanged when another automation with the same name already exists. Use PUT /v1/project_automation if you need create-or-replace behavior.
  • For self-hosted deployments, alerts require data plane v0.0.72 or later, and Slack alerts require data plane v1.1.29 or later.