Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I shorten the date in the e-mail?

Antonia
Contributor
July 22, 2025

So I have built a rule that sends me a reminder email and the rule should contain the date on which I have to renew a key. The date is in the asset. I have also already built a query that also gives me a date in the mail, but the date is displayed the wrong way round and with the time. Can I change this somehow? I have already tried every formatting but none of them work.

Screenshot 2025-07-22 141147.png

{{lookupObjects.first.DATUM}} --> 2025-07-29T00:00:00.0+0000

??? --> 29.07.2025

2 answers

1 vote
Marc - Devoteam
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.
July 22, 2025

Hi @Antonia 

You could solve this by 1st creating a variable.

Then in the email use {{<variable-name>.toDate.jiraDate}}

Does this give you the required output?

Antonia
Contributor
July 22, 2025

Hi @Marc - Devoteam

I tried it but no date will be put out.

I tried this in the mail too: {{<variable-name>.toDate.format("dd/MM/yyyy")}}, but it doesn't work.

Screenshot 2025-07-23 083240.png

Marc - Devoteam
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.
July 23, 2025

Hi @Antonia 

Anything in done in an automation brach will not be usable in the main route of the automation rule.

Create the variable in the branch and the send email action asa well.

The send email action, now will only be able to use information found in the lookup action before the brach.

Anything that is done in the brach is not usable in in the sent email action.

A brach runs parallel to the main route of the rule.

Antonia
Contributor
July 23, 2025

Hi  @Marc - Devoteam

thank you for your help.

So, I moved "And: Send email" into the branch and the "create variable" is above this action. But no e-mail is getting sent. When the Aciton "And: Send email" was not in the branch, emails were sent out.

Marc - Devoteam
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.
July 23, 2025

Hi @Antonia 

Did al the conditions pass, or did one of them fail?

If a condition fails, then the conditions or actions after the failed condition will not be executed.

Antonia
Contributor
July 23, 2025

Hi @Marc - Devoteam No, it just runs trough. No error.

Antonia
Contributor
July 23, 2025

I have also used different e-mail addresses in case something is blocked at my company address, but nothing arrives anywhere.

1 vote
Kris Dewachter
Community Champion
July 22, 2025

Hi @Antonia ,

You will have to convert your date to a "Date" format in order for the formatting to work.

Can you try

{{lookupObjects.first.toDate.format("dd/MM/yyyy")}}

Best regards,

Kris

Antonia
Contributor
July 22, 2025

Hi @Kris Dewachter

thx for ur help!

I have tried it, but then no date is displayed in the mail. The attribute field is already in date format, so for the attribute you have to select the date from a calendar, it is not a text field.

Like Susan Waldrip likes this
Kris Dewachter
Community Champion
July 22, 2025

@Antonia ,

As @Marc - Devoteam mentioned, you will probably have to put it in an automation rule variable first, before you can use it in an email.

So put this value in a variable : 

{{lookupObjects.first.DATUM}}

And the in email you can use :

{{<variable-name>.toDate.format("dd/MM/yyyy")}}

 

Like Laurie Sciutti likes this
Antonia
Contributor
July 22, 2025

Hi @Kris Dewachter

thank you, but no in the mail isn't an date.

Where in the rule should I put the action with the variable?

Screenshot 2025-07-23 083240.png

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events