Email output of report activity as attachment in workflow

  • 28 June 2023
  • 1 reply

Badge +4

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?


Best answer by Yeshwanth 18 July 2023, 18:45

View original

1 reply

Userlevel 1
Badge +4

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.
File file = new File("C:\\fileOP.html");

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