Issue with Automating Asset Expiration Email Notification in Jira
Asked by Salah Eldin Hassan:

Hello Jira Community,

I'm currently facing an issue while configuring an automation rule in Jira to send an email notification when an asset (object) is about to expire. Specifically, I'm trying to set up an automation that triggers an email notification based on the asset's expiration date. However, I'm encountering problems with the smart value configuration, as the email always comes through with an empty result.

Here's what I've tried so far:

* I've created a custom field for the expiration date.
* Set up a Jira automation rule to trigger when the expiration date is approaching (e.g., 30 days before expiration).
* In the email body, I've used the following smart value: `{{object.ExpirationDate}}` or similar variations.

Unfortunately, every time the rule runs, the email body shows the smart value as blank, and I can't seem to retrieve the expiration date correctly.

Has anyone faced a similar issue or can guide me on the correct smart value or approach to pull the expiration date of an object into the email? Any help or tips would be greatly appreciated!

Thanks in advance for your support!

Best Regards,  
Salah Hassan


Answers:
author: Walter Buggenhout
body: Hi [@Salah Eldin Hassan](/t5/user/viewprofilepage/user-id/5586243) and welcome to the Community!

If you want help with automation rules, please share full details of your automation rule so we can see what you have set up and where you might be missing something.

Apart from that, it might help to replace *"object"* in your smart value by the actual name of the object you are referring to. Suppose you are looking at *licenses* here, use {{license.ExpirationDate}} instead.

Hope this helps!

comments: author: Salah Eldin Hassan
body: Hi [@Walter Buggenhout](/t5/user/viewprofilepage/user-id/783225)

Thank you so much for the quick response and for welcoming me to the Community!

I tried using `{{license.ExpirationDate}}` as you suggested, but unfortunately, it didn't work in my case. I'm still facing the same issue, with the discerption and expiration date not being pulled correctly into the email notification.

To give more clarity, here are the steps I've taken, along with screenshots of each stage:

1. **Created assets (objects) named Licenses** -- this is where I need to pull the description and expiration date from:  
   ![1.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/346141i8C40C552793233F6/image-size/large?v=v2&px=999 "1.jpg")

2. **Created the automation process** to monitor licenses expiring as follows:  
   ![2.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/346142iC96AC55921A3F02F/image-size/large?v=v2&px=999 "2.jpg")

3. **Set an action to send an email** when triggered with the note:  
   ![3.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/346143i44C7720FDB6E72E0/image-size/large?v=v2&px=999 "3.jpg")

4. **Second action to create a task** when triggered:  
   ![4.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/346144i4ECA77FAB9AF92A0/image-size/large?v=v2&px=999 "4.jpg")

5. The result I get:  
   ![5.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/346145i6CD4FBBBC34701B4/image-dimensions/307x104?v=v2 "5.jpg")

I would really appreciate any further guidance or corrections you can point out based on the screenshots.

Thanks again for your help!

Best Regards,  
Salah


author: Walter Buggenhout
body: Hi [@Salah Eldin Hassan](/t5/user/viewprofilepage/user-id/5586243), I see you are using a **Lookup Objects** action to retrieve items from your assets. Which is a good way to retrieve information from assets.

But if you then want to process that information, you need to refer to it, as mentioned in the [smart values documentation](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/).

That I mentioned *License* in my answer is just pure coincidence, as I was guessing from your question that you were trying to manage reminders for expiring licenses. But don't just literally copy what I mentioned there ? - I don't have access to your system and can't possibly know how you named things ...

If you can't figure out the right syntax from the documentation link (check the *Lookup Objects section* specifically), then it might help if you could share the details of your lookup objects action (step 2 of your automation rule). This can return multiple objects, so you may have to keep that in mind when processing the rule.

Anyway, you should refer to the results of your lookup action using {{lookupObjects. Description}} and {{lookupObjects.Expiration Date}}, considering you only get back 1 single result.


author: Salah Eldin Hassan
body: Dear [@Walter Buggenhout](/t5/user/viewprofilepage/user-id/783225)

Thank you so much for the valuable hints! I'm happy to say I found exactly what I needed, and everything worked perfectly once I used the right syntax (`{{lookupObjects.ExpirationDate}}` \& `{{lookupObjects.Description}}`).

Thereafter to ensure I'm only getting expiration dates for licenses expiring in the next 30 days, I updated the query to:

`"Expiration Date" >= now() AND "Expiration Date" < now(30d) AND "Expiration Date" > now(29d)`

for the records, I didn't copy/paste your syntax directly but I made some modifications before applying it though I didn't go into that details in my previous message ;D

Thanks again for your help! Your guidance really made all the difference in solving this.

Best Regards,  
Salah


author: Walter Buggenhout
body: Awesome, great to hear that it helped! If my answer was useful, consider accepting it here; that makes it also easier to find for people looking for a similar solution!


Tags: automation

cloud

jira-service-management

jira-service-management-cloud