Skip to content

feat(webhook): add WebhookTrigger class for Workflow Builder triggers#2615

Draft
zimeg wants to merge 3 commits into
mainfrom
eden/webhook-trigger
Draft

feat(webhook): add WebhookTrigger class for Workflow Builder triggers#2615
zimeg wants to merge 3 commits into
mainfrom
eden/webhook-trigger

Conversation

@zimeg
Copy link
Copy Markdown
Member

@zimeg zimeg commented Jun 2, 2026

Summary

This pull request adds a WebhookTrigger class to @slack/webhook for Workflow Builder webhook triggers.

Currently the package only supports incoming webhooks (IncomingWebhook). WFB webhook triggers differ — they accept arbitrary JSON payloads and return JSON responses (vs plain text). Consumers like slack-github-action have to use raw fetch for triggers because the SDK lacks support.

WebhookTrigger mirrors IncomingWebhook's pattern:

  • Constructor takes URL + defaults (timeout, agent)
  • send(payload) POSTs arbitrary key-value data, returns { ok, body }
  • Reuses existing error infrastructure and User-Agent instrumentation

Requirements

Add a new WebhookTrigger class that mirrors IncomingWebhook but handles
Workflow Builder webhook triggers which return JSON responses with
arbitrary payloads (vs plain text "ok" from incoming webhooks).

- Constructor takes URL + defaults (timeout, agent) — same pattern
- send() accepts arbitrary key-value payload, returns { ok, body }
- Reuses existing error infrastructure and User-Agent instrumentation
- Enables consumers like slack-github-action to use the SDK instead
  of raw fetch for WFB triggers

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 2, 2026

⚠️ No Changeset found

Latest commit: 0aab45b

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

❌ Patch coverage is 90.56604% with 10 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.90%. Comparing base (efacdb4) to head (0aab45b).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2615      +/-   ##
==========================================
+ Coverage   88.88%   88.90%   +0.01%     
==========================================
  Files          62       63       +1     
  Lines       10239    10345     +106     
  Branches      451      462      +11     
==========================================
+ Hits         9101     9197      +96     
- Misses       1116     1125       +9     
- Partials       22       23       +1     
Flag Coverage Δ
cli-hooks 88.90% <90.56%> (+0.01%) ⬆️
cli-test 88.90% <90.56%> (+0.01%) ⬆️
logger 88.90% <90.56%> (+0.01%) ⬆️
oauth 88.90% <90.56%> (+0.01%) ⬆️
socket-mode 88.90% <90.56%> (+0.01%) ⬆️
web-api 88.90% <90.56%> (+0.01%) ⬆️
webhook 88.90% <90.56%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

zimeg and others added 2 commits June 2, 2026 14:20
Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Workflow Builder webhook trigger inputs are always string values.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant