Campaign Delivery- Attachment | Community
Skip to main content
Level 2
March 5, 2019
Solved

Campaign Delivery- Attachment

  • March 5, 2019
  • 19 replies
  • 14302 views

Hi,

I want to export the data in temp work table as csv file & need to attach the file automatically to the email delivery, its fine if i export or import the file to my local machine or from the server. Need some help on this

Regards,

Raaghu

Best answer by Jean-Serge_Biro

Hi Raaghu,

Please do what I mentioned above:

1. add a Delivery activity (NOT a continuous delivery), based on a Delivery Template (model) in which you select the To field as population coming from workflow.

2. In the wfk delivery activity, click on the 2nd tab (Script tab), then paste this:

delivery.attachment.add(
  <attachment compressMode="print" filterActive="false" label="my label"
              nameScriptActive="false" type="normal" upload="false">
    <name>{instance.vars.filename}</name>
  </attachment>)

delivery.hasAttachments = true

That's all

19 replies

RaaghuikAuthor
Level 2
March 7, 2019

Hi Jean,

Finally it worked thanks a lot for the help.

But the problem is the file which is attached is in the CSV delimited with semicolon but I need it in column wise, can you help me on this.

Jean-Serge_Biro
Level 10
March 7, 2019

Hi Raaghu,

Fine:)

Regarding the extract file format, it should be another ticket because it is regarding not the delivery attachement.

Anyway, to make it short, even I don't understand what means "column wise", when default csv format is not convenient, you can choose txt format in Extract activity, even though putting a .csv extension, it allows for more choices about separators, etc.

Regards.
J-Serge

pratibham904108
August 16, 2019

Hi i am also getting error in delivery. Can you please tell me how did you resolve that error?

RaaghuikAuthor
Level 2
August 16, 2019

Hi Pratibha,

Can I know what exactly the error you are mentioning about

Regards,

Raaghu

RaaghuikAuthor
Level 2
August 16, 2019

Hi pratibham90410856,

Can I know what exactly the error you are mentioning about

Regards,

Raaghu

pratibham904108
August 19, 2019

Hi,

i have attached screenshot for error snapshot which am getting in delivery. Please check the attachment and help me to resolve my issues.

pratibham904108
August 19, 2019

PFA delivery script  which i have written in email delivery.

RaaghuikAuthor
Level 2
August 19, 2019

Hi Pratibha,

Find my attachment bellow I can see some modifications in your script, hence you are getting the error, use the same script as below don't change the "vars.filename"  keep it same as the file name is already provided in data extraction activity you will receive the file with same name as mentioned. It works if you keep things same way as i kept below. Hope this helps

pratibham904108
August 19, 2019

Thank You Raghu .. Its working now.

DimitrisChatzos
Level 2
February 27, 2025

Hello @raaghuik and @jean-serge_biro ,

I am using the same approach as above but I always have the same issue related to the mid-source instance.

Can you please advice on what the issue is?

Thanks a lot,