Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to add dynamatic date in reprot's name

daisy_dai
Tera Contributor

 

I'd like to create a report and send it on a schedule. How can I add a dynamic date in the email's subject and the Excel file name?

For example, if today is 3/6/2025, I want the report to include data from 3/1/2025 to 3/6/2025. The email subject should be 'Incident_3/1/2025 to 3/6/2025', and the Excel file name should also be 'Incident_3/1/2025 to 3/6/2025'.

Next time, the email subject will be 'Incident_3/7/2025 to 3/15/2025', and the Excel file name will follow the same format, and so on... Thanks a lot

1 REPLY 1

Jordan Vignoni
Tera Guru

I think you could make a Notification Email Script, and then call it from the scheduled report.  For example, if your script is named "Dynamic_Date_Subject", you would call it using ${mail_script:Dynamic_Date_Subject}" in the message of the scheduled report.