How to retrieve all threads which have replies since a given timestamp?

Viewed 169

I am ideally looking for an API that returns all the messages posted(including replies) since a given timestamp.

conversations.history is supposed to be the one I should be using, but it does not return replies, it only returns parent message (only if the timestamp of the parent message satisfies the "oldest" param I supply - i.e. if the oldest supplied in the query is later than parent's ts but earlier than replies, neither parent nor replies will be returned).

Hence, I am trying to find if there is any other API that returns the threads based on "oldest" timestamp. i.e. all the threads which have replies since a given timestamp.

Note: I looked at conversations.replies, it is only useful if you know which thread's replies you are fetching.

2 Answers

Currently there is no API to do what you aspire to do.

The best work around is manually fetching all threads data in-memory and then applying filter.

Did you find an alternative solution to this question? I have the same use case and when contacting Slack support I received the same response that we need to use the combination of conversations.history & conversations.replies. This will be quite an intensive and continuously growing number of calls if we need to call conversations.replies for all threaded messages just to filter out the timestamps that fit the date range. This would be catastrophic in the long run.

Ideally slack need to update conversations.replies API to support getting all replies between oldest & latest parameter just like in history.

Another alternative I am considering is to change the implementation and use the Events API instead of the Web Client API and use queueing to store all incoming messages then this will make sure that all messages are captured and stored then apply the required filters.

Related