RSS DEV Community

How to send reports to different recipients based on the date

To send alert messages to the duty engineer for each day based on the date, use SQLMessenger's "Variable Recipient" feature. Create a variable named "SendTo" with a value source of "Read from database" and an SQL statement that selects the email from the roster table where the week_day matches the current day of the week. Then, select the "SendTo" variable as the recipient for the task. This method can also be used to send reports to Slack workspace members by adding a "slack_member_id" column to the roster table and creating a "MemberID" variable to query the Slack Member ID of the on-duty engineer. In the "Select Recipients" dialog, navigate to the "Send Via Slack" tab and select the "MemberID" variable as the Slack recipient for the task.
dev.to
dev.to