Hi,
Hopefully I’m missing something obvious here!
For our street naming and numbering processes we need to send a weekly list of all completed processes to another team via an email (preferably as an attached PDF).
I can’t see a way to send one email for all processes automatically. I’ve built the message, pdf template, page include list, a signal and the subsets - I just can’t see a way to send one email containing the information on all (eventually it will be four) separate process types on a schedule (once a week).
Any advice would be appreciated (unless it’s get them in a modern system and export the information over, we’re working on that).
Thanks
Hi Victoria
We do this by having a single special record on an Object called e.g. “Calculator” (its also used to aggregate sums and counts of various objects). That Object has a 1 to Many relation to all the other relevant Objects (e.g. Many Street Naming records to 1 Calculator record), and every time we need to relate to that Calculator special record we do so using the “Add relation to special record” rule (normally every time a record is created on the relevant objects or could be e.g. when a record’s process is completed). You could add the relation to other objects and do the same.
The email we send is based on Calculator, sent by a rule triggered by a scheduled Signal. You could apply a subset to that rule to limit it to only triggering on that special record if you end up having additional records in the Calculator object, but theres only ever a need to have one record.
The email based on Calculator then contains a Record list that uses a composite (or a Template) based on Street Naming (and any other record lists/templates pointing to other objects you want to display), with the record list/template constrained by e.g. only records submitted in the last week.
You can do the same to create a single PDF file (base object Calculator that looks at the many related Street Naming records) that you could attach to the email (e.g. save the generated PDF to a File property of the Calculator record), and also aggregate the sum or count with a composite based on that same object.
If you wanted to display multiple objects in a combined list (e.g. mix Object 1 records with Object 2 records instead of showing them in separate lists) you could use a join object and relate that to the Calculator object instead.
Hope that makes sense!
James
Hi,
Thanks for your reply - took me a while to sort (first time messing with special records)but it looks like this is working a treat!
Hi Victoria,
Glad that James was able to describe a solution for you!
I think to make this feel natural and efficient to build, we will consider allowing messages to have no “Base Object” set - ie the message being sent is not about an individual record. So I will add this to our wishlist.
For anyone else passing this thread and wondering how to solve the same problem, an alternative might be:
- Create another object called “Weekly mail” (or similar)
- Schedule a signal to create one of these records once per week
- On creation, rule associates it with all the relevant records that need to be emailed about
- On creation, also send the message
In this setup you’d build your Message (and your PDF) with a Base Object of “Weekly mail”. These would list their related records.
A bonus of this approach is it gives you neat audit trail of what was sent, when.
Paul