You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When creating an Event trigger, if I am filtering for messages that contain a digit string, some part of Slack interprets it as filtering for containing a number and it gives an error.
Steps to reproduce
Suppose I am trying to filter for messages that contain a certain number, say 573. Pretend this is for a leaderboard; I want to see who sends the most messages containing the number 573.
(I have the option with a space there to demonstrate that if it is not a purely digit string, there is no error).
3. Send any message in that channel.
Expected result
The workflow should trigger if the message contains 573, and not trigger otherwise.
Actual result
From slack activity --tail:
2024-12-16 21:22:35 [error] [Wf085AP4AB3P] (Trace=Tr0862EGC5B2) Trigger for workflow 'Get 573 leaderboard' failed: Hermes\Types\IntegerValue is not supported by operator CONTAINS
Note that if I replace the CONTAINS operand '573' with, say, 'hello', there are no errors and it triggers fine.
Hey @pigrammer3! 👋 🥧 Thanks for sending this in with setup steps! 👾
I can confirm that numbers aren't being cast to strings in the CONTAINS statement, causing the same error you're finding. This operator is documented as supporting just strings, but it makes sense to support numbers here.
Various other attempts at escaping the number brought no luck for me. Both the SDK and CLI are also passing the provided trigger details to the API as is - shown in --verbose outputs - so I'm marking this as a server-side issue and will share this with the backend team.
Unfortunately I'm unaware of a workaround for checking if numbers are contained for the event trigger, but similar logic can be implemented in a custom function in the meantime. I hope this is helpful for now, but I hope to share updates about some changes to this filtering logic soon 🙏 ✨
The
deno-slack
versionsDeno runtime version
OS info
Describe the bug
When creating an Event trigger, if I am filtering for messages that contain a digit string, some part of Slack interprets it as filtering for containing a number and it gives an error.
Steps to reproduce
triggers/leaderboard_update.ts
:(I have the option with a space there to demonstrate that if it is not a purely digit string, there is no error).
3. Send any message in that channel.
Expected result
The workflow should trigger if the message contains
573
, and not trigger otherwise.Actual result
From
slack activity --tail
:Note that if I replace the
CONTAINS
operand'573'
with, say,'hello'
, there are no errors and it triggers fine.Requirements
Please read the Contributing guidelines and Code of Conduct before creating this issue or pull request. By submitting, you are agreeing to those rules.
The text was updated successfully, but these errors were encountered: