Rela AIRela AI Docs
Tutorials

Schedule a Weekly Report

Step-by-step: get the weekly maintenance PDF to ship by itself every Monday morning, with corporate branding and fixed recipients.

Schedule a Weekly Report

In this tutorial you'll schedule a maintenance report that generates and ships every Monday without human intervention.

Prerequisites

You need:

  • A verified email account (or a connected WhatsApp number).
  • A saved branding (optional but recommended) — see Brandings.
  • A recipient list (emails or phones).
  • ~15 minutes.

Step 1 — Prepare the branding

If you haven't already:

  1. Administration → Brands and Logos → New.
  2. Upload logo, set header colors, set footer text.
  3. Mark it as tenant default.
  4. Save.

If you already have a default, skip to Step 2.

Step 2 — Create the scheduled report

  1. Data → Scheduled Reports → New.
  2. Name: "Weekly Maintenance — North Plant".
  3. Frequency: weekly.
  4. Hour: 7 (UTC). Adjust to your timezone — 7 UTC = 3am EST / 8am GMT.
  5. Day: Monday (day_of_week=0).
  6. Channel: email.
  7. Email account: pick the verified account.
  8. Recipients: management@your-company.com, maintenance@your-company.com.
  9. Branding: pick the one from Step 1 (or leave blank if you already marked one as default).

Step 3 — Define the report structure

Use the block editor. Suggested structure:

1. Key-value block
   - Plant: North
   - Period: last week
   - Owner: Maintenance Coordinator

2. Heading: "Tasks Completed This Week"

3. Table (source: `tasks` collection, filter: last week, status=completed)
   - Columns: task_code, title, asset, technician, duration

4. Heading: "Critical Alarms"

5. Table (source: _alerts, filter: last week, severity=critical)
   - Columns: asset_id, first_seen_at, count, status

6. Heading: "Period KPIs"

7. Key-value: availability, MTTR, MTBF, tasks completed

Step 4 — Test the run

Before activating, verify everything works:

  1. On the scheduled report detail, click Run now.
  2. Open the email that lands for test recipients.
  3. Check:
    • Branding applies correctly (logo, colors).
    • Tables have data.
    • Title and dates are coherent.

If something looks off, edit the structure and run again.

Step 5 — Activate

  1. Toggle Enabled to on.
  2. Save.

Next Monday at 7 UTC the system generates the PDF and ships it to recipients automatically.

Step 6 — Check the history

One week later:

  1. Data → Scheduled Reports → open the report.
  2. Tab Executions.
  3. See:
    • The past Monday's execution with ok status.
    • The signed_url of the delivered PDF (click to re-download).
    • The effective recipients.

Tips

  • If the report ships with empty tables, check the collection filters — "last week" can misbehave if the system timezone isn't set.
  • To change branding or recipients: edit the scheduled report. The next execution applies the changes automatically.
  • To pause without deleting: toggle Enabled off. Flipping it back on resumes the schedule.

See data/scheduled-reports for full parameters and advanced cases.

On this page