MongoDB and Slack: Daily Error-Count Digest Template

A daily digest that counts the prior day's logged events in a MongoDB collection and posts the error tally to a Slack ops channel.

What It Builds

A Schedule trigger fires once a day on a cron you set. A MongoDB Connector node in Direct mode counts documents in your log collection from the previous day, filtered to error-level events. A Slack Connector node then posts the tally to your ops channel, so the team starts each morning with a clear health snapshot in Spojit.

The Prompt

Paste this into Miraxa and it builds the workflow, connecting the tools for you:

Build a workflow that runs every morning at 8am. Count the documents in my MongoDB "logs" collection where the level is "error" and the timestamp falls within yesterday, then post a message to the #ops Slack channel saying how many errors were logged yesterday.

Connectors Used

  • Schedule trigger - runs the digest once a day on a cron expression in your timezone.
  • MongoDB - counts error-level documents in your log collection for the prior day.
  • Slack - posts the error tally to your chosen channel.

Customize It

Change the run time and timezone in the prompt, swap the collection name and the level filter value, or point the message at a different channel such as #engineering. You can also ask for the count broken down by service if your documents carry a service field.

Tips

  • Make sure your MongoDB connection has read access to the log collection, and that timestamps are stored consistently so the day boundary is accurate.
  • Keep the MongoDB and Slack nodes in Direct mode here: the count and the post are exact actions with no AI cost.
  • Invite the Slack app to the target channel first, or the post will fail to deliver.

Related

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.