MongoDB and Resend: Weekly Collection Stats Email Template

A scheduled Spojit workflow that aggregates document counts and key metrics from a MongoDB collection each week and emails the summary through Resend.

What It Builds

A Schedule trigger fires once a week and a MongoDB Connector node in Direct mode runs the aggregation: total documents, new documents added since last week, and any other counts you care about. A Transform node formats those figures into a clean HTML summary, and a Resend Connector node sends it to your team from your own domain.

The Prompt

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

Build a workflow that runs every Monday at 8am. Query my MongoDB collection to count total documents and how many were created in the last 7 days, then email a formatted weekly summary of those metrics to team@example.com using Resend.

Connectors Used

  • Schedule trigger - runs the workflow weekly on a cron schedule in your timezone.
  • MongoDB - counts and aggregates documents from your collection.
  • Resend - sends the summary email from your verified domain.

Customize It

Change the day and time in the prompt to suit your reporting cadence, swap team@example.com for your recipient, and name the exact collection and metrics you want counted (for example active users, orders, or sign-ups). You can also adjust the 7-day window to a 30-day rolling total.

Tips

  • Use the MongoDB node in Direct mode for predictable, no-AI-cost counts; switch to Agent mode only if you want Miraxa to decide which metrics matter.
  • Verify your sending domain in Resend before the first run so the email is not rejected.
  • Keep date math in a Transform node so the 7-day window recalculates correctly on every run.

Related

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