8398a7/action-slack "Error: Specify secrets.SLACK_WEBHOOK_URL" (missing webhook)
action-slack reads the webhook URL from the SLACK_WEBHOOK_URL env var. Without it the action cannot post and errors immediately.
What this error means
The Slack notify step fails with "missing webhook" or "Specify secrets.SLACK_WEBHOOK_URL".
github-actions
Error: Specify secrets.SLACK_WEBHOOK_URL
##[error]Error: missing webhookCommon causes
Webhook env not set
SLACK_WEBHOOK_URL was not exported on the step env.
Secret unavailable on fork PRs
On fork-originated PRs the secret is not exposed, so the env is empty.
How to fix it
Provide the webhook via env
- Set SLACK_WEBHOOK_URL under env on the action-slack step.
- Gate the notify on non-fork runs if the secret is unavailable for forks.
- Re-run the workflow.
.github/workflows/notify.yml
- uses: 8398a7/action-slack@v3
if: ${{ always() }}
with:
status: ${{ job.status }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}How to prevent it
- Pass webhook URLs via env to the notify step.
- Skip notifications on fork PRs where secrets are not available.
Related guides
GitHub Actions slackapi/slack-github-action Fails to PostFix slackapi/slack-github-action errors - a missing/invalid webhook URL or bot token, the wrong technique for…
GitHub Actions slackapi/slack-github-action "invalid_auth"Fix slackapi/slack-github-action "invalid_auth" - the bot token is missing, malformed, or lacks the scope for…
GitHub Actions secret not available to fork pull_requestFix the GitHub Actions issue where secrets are empty for workflows triggered by pull_request from a fork, by…