Scheduled Reports

Automatically send dashboard snapshots and reports to stakeholders on a recurring schedule.

How It Works

  1. Select a dashboard to send
  2. Configure filters and parameters for the snapshot
  3. Set the delivery schedule (daily, weekly, monthly)
  4. Choose recipients (individuals or groups)
  5. Select the delivery format (PDF, PNG, CSV)

Creating a Subscription

curl -X POST "https://api.lucaro.dev/v2/projects/{projectId}/subscriptions" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Weekly Sales Report",
    "dashboard_id": "dash_abc123",
    "schedule_cron": "0 9 * * 1",
    "timezone": "America/New_York",
    "format": "pdf",
    "recipients": [
      {"email": "sales-team@company.com"}
    ],
    "filters": {
      "date_range": "last_7_days",
      "region": "North America"
    }
  }'

Schedule Options

ScheduleCron ExpressionDescription
Daily at 9am0 9 * * *Every day at 9:00 AM
Weekly Monday0 9 * * 1Every Monday at 9:00 AM
Monthly 1st0 9 1 * *1st of each month at 9:00 AM
Quarterly0 9 1 1,4,7,10 *Start of each quarter

Delivery Formats

PDF

Full dashboard snapshot with all views

PNG

Image attachment of the dashboard

CSV

Raw data from all views

Custom Email Templates

Customize the email template for scheduled reports:

{
  "email_template": {
    "subject": "{{dashboard_name}} - {{date}}",
    "body_html": "<h1>Weekly Report</h1><p>Here's your {{dashboard_name}} report for {{date_range}}.</p>",
    "include_summary": true,
    "include_inline_preview": true
  }
}

// Available template variables:
// {{dashboard_name}} - Name of the dashboard
// {{date}} - Report generation date
// {{date_range}} - Applied date filter
// {{project_name}} - Project name

Managing Subscriptions

# List subscriptions
curl "https://api.lucaro.dev/v2/projects/{projectId}/subscriptions" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# Update subscription
curl -X PATCH "https://api.lucaro.dev/v2/subscriptions/{subscriptionId}" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -d '{"schedule_cron": "0 8 * * 1-5"}'

# Delete subscription
curl -X DELETE "https://api.lucaro.dev/v2/subscriptions/{subscriptionId}" \
  -H "Authorization: Bearer YOUR_API_TOKEN"

# Send test email
curl -X POST "https://api.lucaro.dev/v2/subscriptions/{subscriptionId}/test" \
  -H "Authorization: Bearer YOUR_API_TOKEN"