Created
September 4, 2020 15:35
-
-
Save wvpv/eff37cab9c0ad61680ec29e245b8a7cb to your computer and use it in GitHub Desktop.
SFMC SSJS Retrieve Automation with WSProxy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script runat="server"> | |
Platform.Load("Core","1"); | |
var prox = new Script.Util.WSProxy(); | |
try { | |
var cols = ['*']; | |
var filter = { | |
Property: "Name", | |
SimpleOperator: "equals", | |
Value: "YOUR_AUTOMATION_NAME_HERE" | |
}; | |
var res = prox.retrieve("Automation", cols, filter); | |
Write(Stringify(res)); | |
} catch(e) { | |
Write(Stringify(e)); | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment