Skip to main content

HI All,

I want to send the the output of the report activity in workflow as the attachment in email activity. However when I try to insert variable in attachment tab of email input, it does not give this option:

 

Please help to understand how i can send the report activity output as attachment in email activity?

Hi @KV singh ,

You can set the output path of the report in ‘destinationPath’ input of the activity.

Then in onCompleteScript you can read the file into a file object from the path set and store that to a file variable.
Eg- 
File file = new File("C:\\fileOP.html");
workflow.setVariable("fileVariable",file);

You can then pass that variable as an attachment to the email activity. Please let me know if you need more help in understanding.


Reply