Wrote this to send out every day at 7am to users that are approvers of tickets that have not yet approved those tickets. This rule will send out a list of the tickets that the certain user has not yet approved listing a link and the title.


Select SQL:
select group_concat('http://K1000_WEBSITE_URL/userui/ticket.php?ID=', T.ID, "\r\n Title: ", T.TITLE SEPARATOR "\r\n\r\n") as TICKETS, APPROVER.EMAIL as A_EMAIL from HD_TICKET T
left join USER APPROVER on APPROVER.ID = T.APPROVER_ID
where T.APPROVAL != 'Approved'
and T.APPROVER_ID != 0
and T.HD_QUEUE_ID = 13
GROUP BY APPROVER.FULL_NAME

Email each recipient in query results:
Subject: The following ticket(s) needs your approval
Column containing email addresses: A_EMAIL
Message:
Please review the following ticket(s) for approval:

$tickets


Run on a schedule as needed.