Automate Expiry Reports in JSM Cloud Using Asset Object Attributes

Platform Notice: Cloud Only - This article only applies to Atlassian apps on the cloud platform.

Summary

Configure an Automation Flow that will send automated Reports based on Assets. The criteria won't be covered here, but due to Automation's flexibility, many configurations are possible.

Solution

Setting up the Automation to send Assets reports

Step

Existing Flow behavior

Trigger

Schedule the flow daily or weekly.

Lookup

Use Lookup Objects with an AQL condition for the object type and expiring date-time attribute.

Condition

Continue only when {{lookupObjects.count}} is greater than 0.

Action

Send an email containing the matching object key, user, attribute, date, and object link.

An example Automation Flow to achieve this would be the following. We will break it down to understand what it's doing afterward:

Trigger: Schedule Action: Lookup Objects -> AQL in the appropriate Schema: objectType = <object-type> AND "<DateTime-attribute>" < now(7d) Condition: Advanced Compare: {{lookupObjects.count}} greater than 0 Action: Send Email -> To: <email> Body: Key - User - Attribute - Date {{#lookupObjects}} * <a href="https://site.atlassian.net/jira/servicedesk/assets/object-schema/{{objectType.objectSchemaId}}?typeId={{objectType.id}}&objectId={{id}}">{{Key}}</a> - {{Name}} - ({{Attribute}} - {{Date}} {{/}}

Trigger

An Automation for Reporting can be Triggered in many ways. The most useful is likely to be Scheduling the Flow to run Daily or Weekly at a given time.

Lookup

The Lookup Objects Action will return objects where the AQL's conditions are met. For example, this could be looking for a Software License Expiration as the DateTime Attribute.

Condition

The Advanced Compare Condition is simply to limit emails for when there are Objects to Report on. Note that the Lookup Objects Action can only retrieve up to 500 Objects at a time. To get more than that, the REST API will need to be used via the Send Web Request Action, but that is outside the scope of this article. Another article covers using that functionality here: How to Automate Logging of Asset Value Changes External to Assets.

Action

Finally, the Send Customized Email Action will send an Email to the relevant team. This could be dynamic, since the Send Customized Email Action's To: Field can use Smart Values, such as if the Flow were Triggered by being Executed from an Work Item:

{{reporter.emailAddress}}

The Body of the Email in the above flow is one way to format the information. It should produce a bulleted list of the Objects, with links to the specific Objects in Assets.

Note that the HREF link must be updated to your Site URL. Unfortunately, we have an open Bug regarding the baseUrl Smart Value and Lists in Automation: AUTO-665 - Adding BaseUrl smart value to URL in Send web request action and validating the request is not working.

This email could even be formatted into a proper HTML Table or include additional information.

Verify the report

Before enabling the automation, replace the example site URL in the object link with your site URL, set the object type and date-time attribute, and replace the recipient placeholder with the intended team or smart value. Test with zero matching objects and with at least one matching object.

  1. Run the flow with no matching objects and confirm that no report email is sent.

  2. Run it with one or more matching objects and confirm that the email lists the expected keys, users, attributes, dates, and links.

  3. Confirm the Automation behavior when more than 500 objects match before treating the report as complete.

Further Reading

Updated on October 1, 2026

Still need help?

The Atlassian Community is here for you.