-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Labels
needs infonot enough information to reproduce or continuenot enough information to reproduce or continue
Description
The deno-slack
versions
"deno-slack-sdk/": "https://deno.land/x/[email protected]/",
"deno-slack-api/": "https://deno.land/x/[email protected]/",
Deno runtime version
deno 1.46.2 (stable, release, aarch64-apple-darwin)
v8 12.9.202.5-rusty
typescript 5.5.2
OS info
ProductName: macOS
ProductVersion: 15.5
BuildVersion: 24F74
Darwin Kernel Version 24.5.0: Tue Apr 22 19:54:29 PDT 2025; root:xnu-11417.121.6~2/RELEASE_ARM64_T6030
Describe the bug
When I add a webhook to my deno app, and include blocks as an input parameter to be able to post messages from external tools, the validation rejects any post that does not include the blocks parameter, even though that parameter is not set as required. This is different behaviour to all other types, which are ignored if they are not required, and not present.
Steps to reproduce
- Install demo
- Create trigger:
slack trigger create --trigger-def "./webhook_trigger.ts"
- Attempt to post to trigger's webhook url:
curl --location 'https://hooks.slack.com/triggers/your_webhook_url' \
--header 'Content-Type: application/json' \
--data '{"channelId": "your_channel_id","blocks": [{"type": "section","text": {"type": "plain_text","text": "This is a blocks test."}}]}'
curl --location 'https://hooks.slack.com/triggers/your_webhook_url' \
--header 'Content-Type: application/json' \
--data '{"channelId": "your_channel_id","text": "This is a text test."}'
Expected result
Both messages should post. Blocks parameter should be ignored when text parameter is present since neither are required.
Actual result
Only the blocks message posts.
2025-06-26 18:53:55 [error] [Wf093BLC11K6] (Trace=Tr0938G1TZLM) Trigger for workflow 'Webhook Notification' failed: parameter_validation_failed
2025-06-26 18:53:55 [error] [Wf093BLC11K6] (Trace=Tr0938G1TZLM) - Validation for parameter `blocks` failed: invalid_blocks
Details:
failed to match all allowed schemas [json-pointer:/0/text]
must be more than 0 characters [json-pointer:/0/text/text]
Thanks
Metadata
Metadata
Assignees
Labels
needs infonot enough information to reproduce or continuenot enough information to reproduce or continue