-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUERY] Trigger Event filter out thread messages #309
Comments
Hi @gilhrpenner thanks for writing in 💯 I tried to implement this in a few different ways, but I was not able to successfully filter out reactions made to messages in thread, this seems to be limitation/bug, I've queried about this internally in an attempt to find a workaround |
Hey @WilliamBergamin thanks for checking this |
Hey @WilliamBergamin any updates on this? Users reactions on thread messages are eating through my premium workflow usage lol |
A fix for this should be coming in the near future but I don't have any real ETA The only work around I've been able to gather seems to leverage the Potentially a filter resembling something like |
Thanks @WilliamBergamin !! It sort of works now, I am able to filter out thread reactions but with a single emoji, haven't been able to have an OR operator together filter: {
version: 1,
root: {
operator: "AND",
inputs: [
{
operator: "NOT",
inputs: [{
statement: "{{data.message_link}} CONTAINS thread_ts",
}],
},
{
operator: "OR",
inputs: [
{ statement: "{{data.reaction}} == white_check_mark" },
{ statement: "{{data.reaction}} == eyes" },
{ statement: "{{data.reaction}} CONTAINS clock" },
],
},
],
},
}, 2024-05-07 14:32:21 [error] [Wf070UBJPSJY] (Trace=Tr072SUCCPCZ) Trigger for workflow 'Message reactions workflow' failed: invalid_block Am I doing this wrong or is it possibly a bug? |
I've tried to implement this but I think the value of Currently trying to identify how to access the variable referred to the Let me know if you where successfully able to filter out messages from threads, this is the filter I was testing with filter: {
version: 1,
root: {
operator: "AND",
inputs: [
{
operator: "NOT",
inputs: [{
statement: "{{data.message_link}} CONTAINS thread_ts",
}],
},
{ statement: "{{data.reaction}} == eyes" },
],
},
}, |
Hey @WilliamBergamin I was able to successfully filter out thread reactions, data.message_link is not being returned null for me. Your filter works for me, it triggers the function when I react with 👀 on the main message. |
Hi @gilhrpenner the issue with the Thank you for bringing this forward 🙏 |
Hi @gilhrpenner thanks again for bringing this up, this was a bug and a patch has been shipped, I've tested it this morning and the nested You may need to recreate your trigger, let me know if this resolves the issue |
Hey @WilliamBergamin, thanks for the follow up! This is my filter filter: {
version: 1,
root: {
operator: "AND",
inputs: [
{
operator: "NOT",
inputs: [{
statement: "{{data.message_link}} CONTAINS thread_ts",
}],
},
{
operator: "OR",
inputs: [
{ statement: "{{data.reaction}} == white_check_mark" },
{ statement: "{{data.reaction}} == eyes" },
{ statement: "{{data.reaction}} CONTAINS clock" },
],
},
],
},
}, If I remove the nested AND filter and have either NOT operator or OR it works fine but not both at the same time |
Can you make sure that you've deleted and recreated your trigger this can be done with the following slack trigger delete
slack trigger create
|
Yep, deleted and created the trigger, still not working
I can't remember but shouldn't the trigger be listed under the "Listing triggers installed to the app..."? |
I see, I was able to reproduce your behavior This does not seem like we completely fixed the issue |
@gilhrpenner Yesterday a patched was deployed this should now work as expected Let me know if it works on your end, I'll mark this issue as resolved |
Hey @WilliamBergamin although I still can't see the trigger being listed under the trigger list I can confirm it's working! Thank you so much for crushing this bug 🐛 |
Question
Hello! Am trying to work on an event trigger that listens for message reactions but I would like to filter out all events on a thread message, so if user reacts a given emoji on main message of a thread it proceeds and if the message is a thread reply then it halts.
Context
Environment
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: