Skip to main content

Slack

Use Slack for internal alerts, approval workflows, support triage, lead notifications, and team-facing activity feeds.

Example app: team standups

Build a team standup and announcement app with Slack integration.
Users submit yesterday/today/blockers.
Admins post announcements.
The backend sends formatted messages to a Slack channel.
Store standups and announcements in PostgreSQL.
Use server-side environment variables for Slack credentials.

Choose an integration mode

ModeBest for
Incoming webhookSimple channel notifications.
Slack app with bot tokenRicher messages, multiple channels, commands, and interactions.
Event subscriptionsResponding to Slack events or slash commands.
Slack app dashboard with app list
Create a dedicated Slack app for the Cocoding AI project.
Slack app creation screen
Use a clear app name and workspace for development.
Slack app webhook and OAuth setup screen
Configure webhook, OAuth, or event settings according to the workflow.
SLACK_WEBHOOK_URL=
SLACK_BOT_TOKEN=
SLACK_SIGNING_SECRET=
SLACK_DEFAULT_CHANNEL=

Only configure the variables your chosen mode needs.

Prompt Cocoding AI

Add Slack notifications when a new lead is created.
Use SLACK_WEBHOOK_URL on the server.
Let admins choose whether notifications are enabled.
Show notification delivery status in the lead activity panel.

Test Slack delivery

  1. Use a test Slack channel.
  2. Trigger one safe event from the Cocoding AI preview.
  3. Confirm the message appears in Slack.
  4. Confirm the app stores a success or failure status.
  5. If using interactions, verify the request signing secret.

Incoming webhook setup

For simple notifications:

  1. Open Slack API app settings.
  2. Enable Incoming Webhooks.
  3. Add a webhook to a test workspace and channel.
  4. Store the webhook URL as SLACK_WEBHOOK_URL.
  5. Invite the app to the channel if Slack requires it.
  6. Trigger one test notification from preview.

Message design

Ask Cocoding AI to include enough context in each Slack message:

  • Event name.
  • User or record ID when safe.
  • Status.
  • Link back to the generated app.
  • Failure reason if the notification was not sent.

Do not send private customer data into Slack unless your team has approved that workflow.

Troubleshooting

SymptomLikely causeWhat to check
Message not sentWebhook URL missingVerify server-side configuration.
Slack returns forbiddenApp missing channel accessInvite the Slack app to the channel.
Interactions failSigning secret mismatchRecopy the Slack signing secret.
Wrong channelDefault channel mismatchUpdate SLACK_DEFAULT_CHANNEL or the app setting.