Best answer

How to find the root message in a thread in Slack using an @mention in the comments?

  • 26 July 2023
  • 3 replies
  • 255 views

Userlevel 1

Is there a way to find the root message in a thread in slack?

functionally I would like to be able to use an @mention in the comments of a thread to grab the top level post of that thread.

I have the thread T which is the same as the top level post’s T value so i think I should be able to find the top level post somehow, but I am unsure how to do this.

thank you in advance

 

icon

Best answer by SamB 26 July 2023, 11:47

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Userlevel 7
Badge +11

Hi @Seaney Shell, welcome to the Community! 👋

There isn’t currently a search action that would allow you to get the parent message but we’ve got an existing feature request for this. I’ve added your vote to that so we will email you if/when that gets added.

There’s no ETA on when that might become available. But as you’ve got the Thread Ts, then it seems like you’d be able to use that in a Webhooks by Zapier action as discussed here: 


Alternatively you might be able to get it working using Slack’s API Request (Beta) action to find the parent message. You can find out more about how to set up that kind of action here: Set up an API request action. As with the Webhooks by Zapier action you’d need to reference Slack’s API documentation when configuring the request. It looks like Slack’s conversations.history endpoint specifically would be the one you’d need to reference.

Hope that helps to get you pointed in the right direction. If I’ve misunderstood or you run into any issues on that just let us know! 🙂

Userlevel 1

Thank you so much for the help I did not know that zapier could directly interface with the slack API, or other webhooks!

Userlevel 7
Badge +6

Hi @Seaney Shell,

Awesome! I’m glad to hear SamB was able to point you to the right direction!

If you have any other questions, please don’t hesitate to reach out to the Community. We’re always happy to help!

Happy Zapping! 🚀