Skip to content

Email Notifications

ApiMeld can send task result notifications via email using the SMTP server configured in Admin → Settings.

Prerequisites

Email notifications require SMTP to be configured. See Email / SMTP for setup instructions.

Enabling email notifications globally

  1. Go to Admin → Settings → Notifications
  2. Toggle Enable email notifications to On
  3. Optionally restrict which roles can use email notifications

Enabling on a task

  1. Open a task and go to the Notifications tab
  2. Toggle Email notification
  3. Enter one or more recipient addresses (comma-separated)
  4. Choose the trigger events: On Success, On Failure, On Timeout
  5. Save the task

Email content

Notification emails include:

  • Task name and run status in the subject line
  • Start time, completion time, and duration
  • Full output and error output
  • A link back to the run log in ApiMeld

Subject examples:

[ApiMeld] ✅ Nightly Order Sync — Success (12.4s)
[ApiMeld] ❌ Database Backup — Failed
[ApiMeld] ⏱ Report Generator — Timed Out

Sending email from scripts

Scripts can also send arbitrary emails mid-execution using the injected notification API. This is separate from the post-run notification:

PowerShell:

powershell
# Send an email from within a script
Invoke-RestMethod `
    -Uri "https://tasks.example.com/api/notifications/email" `
    -Method POST `
    -Headers $AuthHeaders `
    -ContentType "application/json" `
    -Body (@{
        to      = "manager@example.com"
        subject = "Weekly Report Ready"
        body    = "<h1>Report complete</h1><p>1,247 records processed.</p>"
    } | ConvertTo-Json)

Use for summaries

Post-run email notifications include all output. For long-running tasks, consider using a mid-script email to send a concise summary instead, and leaving the full log in ApiMeld's run history.