1

There are some older related questions, but I thought I'd ask in case the situation was different.

Some related questions:

My situation: I made a token to display all classes created in the past two weeks. I want to include that token in an email sent out weekly to members of the "New Classes" group.

I had assumed that it would just be a matter of scheduling the email, but the standard email form only allows for sending once. So no dice there unless someone is manually setting it up weekly.

Next option I looked at was a Scheduled Reminder. That seems like it might work, but it is awkward since the reminders are built around something happening: an activity, a registration, an expiration. I'm not sure what "something" would make the most sense to try.

Third option I'm looking at is the one from the last link using the CiviRules DailyGroupMembership trigger. Again, I think it might work, but it doesn't seem quite right either.

Is there a better route to take for this that I'm overlooking?

(Environment is Civi 5.63 with Drupal 9)

2 Answers 2

1

This took a while to come up with a solution for and work out the logic on, so I wanted to share in case it helps anyone. As Lars suggested above the answer was with CiviRules, but it required some extra steps.

  • I have two groups: "Subscribers" and "Sent".
  • I have a rule that triggers daily for all members of Subscribers that are not also members of Sent.
  • That rule sends an email with the specified template, and it adds contacts to the Sent group.
  • I have a second rule that triggers daily for all members of the Sent group.
  • That rule's action has a delay until Sunday at Midnight (technically, I have it at 12:01), and its action is only to remove the contact from the Sent group.

The thing that took me a long time to work out was where the delay's needed to be to make it flow correctly. In other configurations I ended up with varying numbers of emails.

0

I think Scheduled Reminders are the way to go. You can set up a repeating reminder that goes out once per week, per your requirement. When setting up the reminder you can choose "Contacts" as the base entity, you can limit it to the group of your choice, and for the date field you can simply choose a fixed date (e.g. today) as the start date, and the reminders will thus be scheduled to send once per week starting today.

5
  • The form is insisting that I pick a specific date. That is, under Contact, I have a couple of Date options - Birth Date, Created Date, Modified Date - only.
    – zip
    Commented Aug 28, 2023 at 19:43
  • 1
    Correct me if I'm wrong, but I think the problem with using a repeating Scheduled Reminder is that contacts that are added to the group after the original Reminder is set up will not receive the email. So if you add a contact to the New Classes group, they won't get the emails, which is probably not what you are looking for.
    – Lars SG
    Commented Aug 28, 2023 at 20:05
  • 1
    I think CiviRules is the only way to get a scheduled email that updates based on the group membership at time of sending (neither CiviMail nor Scheduled Reminders do this).
    – Lars SG
    Commented Aug 28, 2023 at 20:06
  • I had forgotten that's how scheduling mail for groups works. I'll work on the CiviRules option, thanks! I see it has a daily trigger with "Delay until" as an option, so I can maybe use that. Hopefully it doesn't send the email 7 times when it gets to the delay-until day.
    – zip
    Commented Aug 29, 2023 at 11:42
  • Unfortunately, the "Delay until" doesn't stop it from triggering every day, so I did indeed get 7 of them. I feel like there has to be some way to do this, but now I'm thinking it might take some development to add a weekly trigger.
    – zip
    Commented Sep 6, 2023 at 11:08

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.