Missed Team ’24? Catch up on announcements here.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do I send an automation email based on the day of the week?

Alex Waugh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 26, 2023

Hello,

I have a rudimentary IT Service Management project for a small helpdesk team. Currently I have an automation that when a ticket is submitted, it sends an email to the team members via email. From there, one of them assigns themselves the ticket.

Recently we have created a coverage schedule so I'm looking for the following to notify specific team members based on the day of the week:

If a ticket is submitted on Monday, send an email to these specific email addresses.

If a ticket is submitted on Tuesday, send an email to these specific email addresses.

 

And so on...

I think I need to compare two values but I'm not sure exactly what I need to compare to check for just the day of the week. There might also be an easier way to do this and I'm not aware of the feature. Thanks in advance.

2 answers

1 accepted

0 votes
Answer accepted
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 26, 2023

This is what I would do, I would create if/else conditions that convert the created date to fullDate using {{[date].[dateformat]}} and then compare to see if it contains Monday, Tuesday and so forth in the if/else. And each if/else would then send the email to the specific emails. Something like this:

Screenshot 2023-09-26 at 1.04.23 PM.png

Alex Waugh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 28, 2023

Thanks so much Mikael. This was exactly what I was looking for. Appreciate it!

2 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 26, 2023

Hi @Alex Waugh 

Is the only thing different the recipient email addresses with the email body the same for all?

If so, you can make a simple and easy to maintain rule using the new Lookup Table action automation rules.  Perhaps like this:

  • trigger: issue created
  • action: re-fetch issue (I always add this after the issue created trigger to slow down the rule; that trigger can run so fast the issue data is not yet available for the rule.)
  • action: create lookup table
    • name: tblCoverageScheduleEmails
    • row
      • key: Mon
      • value: person1email;person2email
    • row
      • key: Tue
      • value: person3email;person4email;person5email
    • ...
  • action: send email, converting the current date into the day of the week using date/time functions
    • the to email address would be:
      • {{tblCoverageScheduleEmails.get(now.format("E")).split(";")}}
    • email body...

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events