Occasional Contributor

Creating an Automated E-mail Job for Anaplan Data Outputs



E-mail functionality to send automated notifications and data outputs can be achieved for Anaplan Customers utilizing Anaplan Connect. This is a solution that utilizes a portion of the error handling script found on community at: https://community.anaplan.com/t5/Knowledge-Base/Integrated-Error-Handling-and-Email-Notification/ta-...




In the event that an automated e-mail needs to be sent out using a data output, a .bat (Windows) or .sh (Linux) script. The following are the steps and items that need to be conducted:


1. Create an Action to output data from a saved view to the file format desired. This output will need to be saved to a drive on the server where Anaplan Connect is installed and has access to. 


2. Create a .bat/.sh script to call the action to output the data.


3. Create an e-mail script using section #6 from the previously noted link utilizing the SMTP server on the server where Anaplan Connect is installed.


4. Depending on the time the output takes, the script can either be run with a stall "waitfor" type logic or run sequentially - but it is key to note how long this takes. Various scripting methods can be used to realize this such that data isn't prematurely sent, or an errored file is not attached.


5. Using either Crontab or Windows Scheduler, this script can be setup to run at specified times, or manually by the server administrator(s).


As previously mentioned, there could be other items / checks that need to be added to such a script.