Use Liquid markup in a Deliver recipient row when a recurring internal mailing should send only to recipients who have relevant query results. This can be useful for staff notifications such as reader assignment reminders, unassigned Inbox message reminders, or upcoming event reminders.
The recipient list query still returns one row per potential recipient. Liquid markup determines whether the recipient email value is output for that row.
⭐ Get Inspired
This article was adapted from a post by Technolutions staff in the Slate Community Forums' Get Inspired space. Have a great idea for a Get Inspired post? Let us know!
Before you begin
Create the Deliver recipient list query that returns the users or people who might receive the mailing.
Add a dictionary subquery export that returns the related rows you want to test, such as assigned applications or open Inbox messages.
Give the dictionary export a computer-friendly name. The examples below use
user_assigned.Export the recipient email address. The examples below use
user_email.
Configure the recipient row
Open the Deliver mailing.
Open the recipient list settings.
In the recipient row, replace the plain email merge field with Liquid markup that outputs the email address only when the dictionary export contains at least one item.
{% if user_assigned.size != 0 %}{{user_email}}{% endif %}When user_assigned contains rows, the mailing receives the value of user_email. When user_assigned contains no rows, the recipient row outputs nothing and the mailing does not send to that user.
📝 Note
Replace
user_assignedanduser_emailwith the exact export names in your recipient list query.
How the size filter works
The size filter returns the number of characters in a string or the number of items in an array. Dictionary subquery exports return an array, so .size can tell Liquid markup whether that export returned any rows for the current recipient.
For example, this expression returns the number of characters in a string:
{{ "Hello Slate Community Forums!" | size }}This expression returns the number of rows in a dictionary export:
{{ user_assigned.size }}Test the mailing
Preview the recipient list query with users who should and should not receive the mailing.
Confirm that the dictionary export returns rows only for users who need the message.
Send a test mailing to confirm that recipient rows without related results do not receive the message.