Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

Build email extracting a pdf from SFTP

RaulOcana
Level 4
Level 4

Hi guys,

 

I have to send several emails to our customers, each email has it's own database (csv file from SFTP) and it's own attachment (pdf from SFTP).

 

I know how to automatically extract the CSV file to prepare the segmentation and send the emails on a workflow, but is there a way to extract the PDF from the SFTP and attach it to the html before sending it automatically?

 

Thanks!

 

Regards,

Raúl

1 Accepted Solution
ovot
Correct answer by
Level 2
Level 2

@RaulOcana , 
If you know how to process the .csv then it should be similar for the .pdf files.
Then you could use a script in your delivery activity, inside the workflow, to attach the file, like this:

 

var filename = "file.pdf";
delivery.attachment.add(
  <attachment compressMode="print" filterActive="false" label="{filename}"
              nameScriptActive="false" type="normal" upload="false">
    <name>{filename}</name>
  </attachment>)
}

delivery.hasAttachments = true

View solution in original post

1 Reply
ovot
Correct answer by
Level 2
Level 2

@RaulOcana , 
If you know how to process the .csv then it should be similar for the .pdf files.
Then you could use a script in your delivery activity, inside the workflow, to attach the file, like this:

 

var filename = "file.pdf";
delivery.attachment.add(
  <attachment compressMode="print" filterActive="false" label="{filename}"
              nameScriptActive="false" type="normal" upload="false">
    <name>{filename}</name>
  </attachment>)
}

delivery.hasAttachments = true

View solution in original post