The problem:

I'm trying to monitor daily for contacts meeting certain criteria, and would thus like to have a way to receive a scheduled email if a smart group contains contacts.

Possible solution: Using CiviReport?

CiviReport supports scheduled delivery of reports, configurable under a report's "Email Delivery" tab.

Is there a way to avoid sending the report if it contains no rows?

Alternately, I could do something in cron with drush sql-query or some such, but ideally I'd like to do this within CiviCRM.

Other options:

Are there other to achieve this goal within CiviCRM that would not require custom code?

2 Answers 2


We've done just this using CiviRules and CiviReport, though the solution does still send emails if the smart group is empty.

I've outlined the steps here: https://civicrm.stackexchange.com/a/4873/105

  • Right, that's the very sticking point I'm trying to avoid -- should send no email if the smart group it's empty. Except for that point, CiviReport's own email feature would do fine for my use case.
    – TwoMice
    Jan 12, 2017 at 5:12

Have you tried using CiviCRM Rules integration? Not sure if it would work in the context of a scheduled job, but it can send emails.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.