Slack:计算每天/每周的消息数

Dol*_*lev 4 slack-api slack

TL;DR; How to summarize the number of messages in a slack channel every day with a regex/user.

I am using slack and love it! One of the most important channels in my team is the alert channel. We post alerts from our services/3rd parties to the channel and that keeps us updated if anything goes wrong.

We were wondering if there is a way to post a summary of all messages with a regex every day/week/month.

Eri*_*ken 5

这是一种有效的方法。

  • 您需要一个每天运行一次的 Slack 应用程序来查询您的频道并发布带有摘要的消息。
  • 使用conversations.history应用程序中的 API 方法从频道中检索所有消息并对其进行计数以创建摘要。您可以为该方法指定一个时间范围,因此您只需检索某一天的消息。
  • 使用 API 方法chat.postMessage将摘要发布到 Slack 频道。