Skip to main content
Best answer

Slack thread comments are triggering my zap - should only be triggered for parent posts


 

Hi, 

I’ve got a problem similar to:


But the suggested workaround there isn’t working for me.

Problem - 
Every time someone posts a comment in a thread for an existing post, where the original post meets my “continue only if” condition, the zap is triggered again, and passes the new comment of the thread through to the next step in my zap (even though the “continue only if” condition is specific to the text from a specific line in the original text of the post).

This has been a problem for a long time already.  Yesterday I tried changing my zap to only check for the trigger words in a specific line of the original post (using the “split response to line items” option) - it’s a post from a bot, with a predefined template, so I know exactly in which line to check for the trigger words.  I thought that would inherently prevent zapier from being triggered by thread comments, but no such luck. 

I tried adding a new step as per the recommended workaround in the above issue, and I also see that there’s now a Boolean filter option for “Is Thread”, but that one seems to return True if there exist any thread messages (i.e. implying that the post IS a thread) and not as I expected -- a check on whether the posted message itself is a “thread message” (v sa parent post) - ie. looks like it’s just a nicer wording for your suggested workaround from the above linked issue, which was to check whether a `Ts` entry exists.

Since our bot automatically always automatically adds an initial comment to the thread of each post (with a zendesk issue link), seems every post I’m tracking will always come back as true for “Is Thread”, so I can’t use that as the condition.  

What I’m looking for is a filter option to say IsParentPost true/false (or for the basic “New Message Posted to Channel” event to have an option to limit it to Parent posts) - so that it will only continue if the post is a new (parent) post & not be triggered each time comments are added to the thread (but that the existence of comments in the thread shouldn’t prevent the parent post from successfully passing the test condition). 

In the above linked issue from 3 months ago, you wrote that your team is working on adding this capability.  Can you please share the ETA?  

Best answer by ken.aBest answer by ken.a

Hi there @JackieDoc,

Unfortunately, there is no way to differentiate between parent and thread message at the moment via Zap. With that being said, I have added you as another interested member to the open feature request. I’m very sorry, but we can’t provide an exact ETA for the feature’s implementation. However, we will keep you in the loop via email once the feature has been implemented.

Additionally, I saw this Slack API where if the thread_ts and ts values. If they are equal, the message is a parent message. Maybe you can try setting up your Filter step like this:

bd3a22175ad6a90bdc6c2e99ab9cf2a7.png
(view larger)

I haven’t tested this out myself, but I was hoping that this would work as a workaround. 🤞

View original
Did this topic help you find an answer to your question?

5 replies

ken.a
Forum|alt.badge.img+6
  • Zapier Staff
  • 6324 replies
  • Answer
  • January 11, 2024

Hi there @JackieDoc,

Unfortunately, there is no way to differentiate between parent and thread message at the moment via Zap. With that being said, I have added you as another interested member to the open feature request. I’m very sorry, but we can’t provide an exact ETA for the feature’s implementation. However, we will keep you in the loop via email once the feature has been implemented.

Additionally, I saw this Slack API where if the thread_ts and ts values. If they are equal, the message is a parent message. Maybe you can try setting up your Filter step like this:

bd3a22175ad6a90bdc6c2e99ab9cf2a7.png
(view larger)

I haven’t tested this out myself, but I was hoping that this would work as a workaround. 🤞


  • Author
  • Beginner
  • 2 replies
  • January 11, 2024

Interesting idea.  I’ll try it out. Thx


SOLVED: 

Set up the filters but use ts (time and date) BEFORE thread ts. Logic - the sub-thread time will never be before the parent thread thus preventing the trigger each time the sub thread is responded to. it will say it failed but that is the entire point 😎

 


  • New
  • 1 reply
  • January 28, 2025

Hey, 

So the suggested solution using the condition TS = Thread TS, was working while testing the flow on Zapier BUT wasn’t testing in prod when a new message was posted in my slack channel. 

I then had a look at the logs and figured out that on the initial trigger (when a new slack message is posted), the Thread TS was not provided by slack. But then when testing the flow on Zapier the thread TS would exist and be passed. 

Hopefully the workaround that works is using Thread TS doest not exist:

  • The zap would continue on the initial (parent) message since Thread TS is not provided by slack yet
  • The Zap would not continue if someone answers in the Thread since a Thread TS would exist then

 


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • 7304 replies
  • January 29, 2025

Hi folks 👋

@kellishomeward - I’m so sorry we missed your post here previously. Thanks for taking the time to share the alternative filter setup that worked for you!

@Lucastor - really appreciate you sharing your solution here as well!

It’s so great to see members helping each other out like this. 🤗 Thank you both again for sharing your insights—I hope to see more from you in the Community! 🚀