Hello Everyone,
Do you know how to attach a CSV file calculated on the workflow to an email or alert activity?
I have tried an approach that was suggested here via attachments on the delivery but I have the bellow error.
I really appreciate any help you can provide.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @DimitrisChatzos,
Use the delivery activity from the Action tab, something like the example below, and place the JavaScript in the Script tab within the delivery activity.
delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{vars.filename}</name>
</attachment>)
delivery.hasAttachments = true
Thanks
Hi @DimitrisChatzos ,
In Delivery's script tab, paste the below script and run it.
delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{vars.filename}</name>
</attachment>);
delivery.hasAttachments = true
Views
Replies
Total Likes
Hi @DimitrisChatzos,
Use the delivery activity from the Action tab, something like the example below, and place the JavaScript in the Script tab within the delivery activity.
delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{vars.filename}</name>
</attachment>)
delivery.hasAttachments = true
Thanks
Views
Replies
Total Likes
Hey @SushantTrimukheD and @ParthaSarathy ,
Thanks a lot for your feedback.
I tried the above but I still have the same issue.
What am I doing wrong?
Thanks,
Views
Replies
Total Likes
@DimitrisChatzos , sometimes it does depends on the size of the attachment. So to check it, Just try to export only 4 or 5 rows in it and check whether you're able to send the file as attachment.
Views
Replies
Total Likes
Hello,
The solution worked in the end when I changed the routing from mid-sorce instance to internal email delivery.
A couple of things were not so clear in the explanation:
The extraction activity should have this format on the naming convention of the file: <%= vars.filename %>yourfilename.csv
and then the code as described above.
delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{vars.filename}</name>
</attachment>)
delivery.hasAttachments = true
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies