I have a scenario where we want to send the same email from multiple business units every day. The email should get updated daily, but I wanted to have a check in the automations in each business unit to make sure that the email had been updated in the past 24 hours, and stop the automation if it has not. I got the SSJS working just fine, it grabs the email and checks the modified date. I can see the logic working in a Cloud Page, and I've moved it over to a Script.
So, my question is; how do I get the automation to see that my script has failed, or more specifically, how can I get the automation to fail from within a script?
Here's my code (with the suggestions from the answers provided by this post):
This code is working great now!