Expand my Community achievements bar.

SOLVED

Creating a calculated attachment where File name is computed at the time of delivery for each recipient (it can depend on the recipient)

Avatar

Employee

Hi,

We are trying to attach a pdf file (from the folder placed on C:// drive for testing because, FTP is not supported) during the email delivery in the template.

  1. Specified the label  to apply to the attachment.
  2. Specified the access path of the file and its personalized name in the definition window (based on the customer name, it picks the respective file to attach).
  3. Uploaded the file to server from local drive in a different workflow as this is a mandatory step.

s_ncs_user_wizard_email_calc_attachement_010.png

I got an error below.

1245681_pastedImage_2.png

Questions:

1. How to resolve this issue?

2. Post the testing of attaching the files from desktop, i would like to do the same from an FTP location. How can i do this (any SFTP/other server location Adobe provides from where i can attach the files)?

PS: We have a hosted version of Adobe Campaign v6.1

Thanks,

Rajesh

1 Accepted Solution

Avatar

Correct answer by
Employee

Hello Rajesh,

This is a known limitation when using calculated attachments uploaded from the local system . The reason is that when the attachment is prepared during delivery analysis , the MTA is responsible for preparing the attachment. The MTA for a hosted environment runs on a debian(linux) server and the local file being on a Windows OS causes a compatibility issue and creates the wrong path for the file by appending usr/local/neolane/ (default location of a campaign instance) ahead of the file name.

To overcome this you can :

1>. Use a file from a public location like this :

calculated attachment.png

2>. Else , like you have mentioned , you can have the file on a SFTP server and mention the path of the server here like :

/sftp/<user>/incoming/<file_name> in place of the public url

3>. Create a workflow to generate the file on the workflow execution and then export the file to the var/<instance_name>/export folder using the data extraction activity and then use the delivery ,attachment name should be : export/<file_name>

Hope this helps

Regards,

Adhiyan

View solution in original post

25 Replies

Avatar

Correct answer by
Employee

Hello Rajesh,

This is a known limitation when using calculated attachments uploaded from the local system . The reason is that when the attachment is prepared during delivery analysis , the MTA is responsible for preparing the attachment. The MTA for a hosted environment runs on a debian(linux) server and the local file being on a Windows OS causes a compatibility issue and creates the wrong path for the file by appending usr/local/neolane/ (default location of a campaign instance) ahead of the file name.

To overcome this you can :

1>. Use a file from a public location like this :

calculated attachment.png

2>. Else , like you have mentioned , you can have the file on a SFTP server and mention the path of the server here like :

/sftp/<user>/incoming/<file_name> in place of the public url

3>. Create a workflow to generate the file on the workflow execution and then export the file to the var/<instance_name>/export folder using the data extraction activity and then use the delivery ,attachment name should be : export/<file_name>

Hope this helps

Regards,

Adhiyan

Avatar

Community Advisor

Hello @Adhiyan .
if you are using midsourcing server, it seems the attachment is also not found, is there any other way then above mentioned to fix it?

Marcel

Avatar

Employee

Hi Adhiyan,

Thank you very much for your quick response. I will try this and get back to you with the concerns, if any.

Thanks,

Rajesh

Avatar

Employee

Hi Adhiyan,

I was trying to test by using a file from a public location (yet to test the SFTP method, though). Placed the files on my google drive and extracted a shareable link to view the files and pasted the link as shown in the screenshot.

1246611_pastedImage_0.png

Got the below error. Not sure, if it accepts, https link from google drive instead of http. Any help?

1246612_pastedImage_1.png

Avatar

Level 3

Hi Rajesh,

I have done it using SFTP below screenshot of my config, hope it help.

1246764_pastedImage_0.png

Avatar

Employee

Hi Adhiyan,

Http not working for me and SFTP is in the process of configuration and yet to be tested, i am trying to test the 3rd approach of creating the file in the workflow.

This works fine if we are extracting the data and then the csv file (which will be attached as a file in the attachment) of that data, as shown below.

1247254_pastedImage_2.png

How can i do this to attach pdf file from the local machine or an ftp account (Campaign FTP Test), in a work flow? Something like below.

1247303_pastedImage_0.png

Avatar

Employee

Hi Ankur,

Is this the SFTP account configured as an external account or is this the SFTP location that sits on the Adobe server (configured by Adobe)?

Avatar

Level 3

Hi Rajesh,

This SFTP location is on Adobe Server. I doubt you can use external SFTP for this.

Regards,

Ankur A.

Avatar

Employee

Hi Ankur/Florent,

We have got the SFTP configured on Adobe server and i used the same for reading the calculated attachment from the sftp server. It is giving me the same error. error screen below.

1266521_pastedImage_0.png

1266522_pastedImage_2.png

Avatar

Level 3

Hi Rajesh,

Is it Adobe Hosted environment or on- premise ?

If, It is Adobe Hosted then as per my experience you need to give SFTP path as /home/customer/<Client Name>/incoming/ ..... to access SFTP in Adobe Campaign application.

Otherwise, can you also make sure the SFTP path is proper and access on folder is define properly.

Regards,

Ankur A.

Avatar

Employee

HI Ankur,

It is a hosted environment (v6.1). Please find the details below and help me in constructing the path. We do not have any password.

I tried...various combinations with the info below and nothing worked.

Access right, i will check and get back. I now have only read access as per the log.

Username: xyz

Host: sftp://xyz@43.251.125.156

Avatar

Level 3

Hi Rajesh,

Adobe Hosted environment SFTP is on the Adobe Serve itself and to access it you just need to give folder path without using SFTP call.

please try below path as is

/home/customer/<Client Name>/incoming/testthree/camp_log_2017

<Client Name>- > replace it with client name.

For me above path works.

If, it doesn't work, I suggest you contact Adobe Support they will be able to provide you correct path.

Avatar

Employee

HI Ankur,

Thank you very much, it worked with the below path.

/sftp/username/incoming/testthree/camp_log_2107.txt

Avatar

Level 3

Glad it worked.

Regards,

Ankur A.

Avatar

Level 2

Hi Adhiyan,

I have a similar issue; however, in my situation we are using an on prem hosted solution on windows server. I am trying to pull a file, dynamically, based off data that is passed in the targeting. The path to the SFTP which has been successfully tested via a file collector is as follows: E:\SFTP_ROOT\sftpuser01\AdobeCampaign\Inbound\AbuseCampaign\

Here is what does work:

1. File collector referencing the above path is able to pull the file, so there is no access issues.

2. Hardcoded File Path attachement --- A delivery is successfully able to attach the file if the attachment setting is set to "File name is specified when creating the delivery template." This works if I put the above sftp location and hardcode the file name. A personalization block does not work here, so dynamic pull of the file does not work here.

option2SS.PNG

Here is what does NOT work:

3. Dynamic file pull test based on target data --- If I select "File name is computed during delivery for each message" and include the file path as either the hardcoded path or one that includes a personalization block, the delivery fails and goes into pending . There is no information in the log about the file. Am I incorrectly referencing this path? Is this feature  not able to pull a file based off the SFTP using a file path that has a dynamic variable produced in the targeting?

option3SS.PNG

Any advice is greatly appreciated.

Best,

Lee

Avatar

Employee

Hello Lee,

When you are using targetData.cAttachment , is the value for cAttachment being passed via a workflow ?

Can you share the logs of the delivery which is failing , it can provide some idea about the failure .

Regards,

Adhiyan

Avatar

Level 2

Hi Adhiyan,

Yes the file name is being passed in the target data. The data in flat file is reconciled to the recipient in nms:recipient and then the target data from the file is still passed for dynamic use. This setup works fine when there is no attachment involved. If I do a standard delivery (no attachment) the file attachment data is populated successfully in the content of the delivery within the <%= targetData.cAttachment %> block, so there is no issue of the file name being directly passed correctly.

See screenshot:

ss1_10_20.PNG

Here is a screenshot of the logs -- it failed and went into retry pending. It looks like it was due to adobe appending the location with the standard linux sftp location. How do i prevent this since we are not adobe hosted and I do not want the path to be appended, and still remain dynamic

ss2_10_20.PNG

General question. Is it possible to do a dynamic pull of a file from an on prem sftp with this delivery setup? Am I setting up the delivery correctly? The file path works fine when using a file collector/export.... which is why I find this strange.

Avatar

Employee

Hello Lee,

The SFTP path appears to be correct and if the same location syntax works for file collector it should work in delivery attachment as well.

It does look like though a Linux server is involved . May I know which mode you send the delivery from, are you using a mid-sourced server by any chance ?

Regards,
Adhiyan

Avatar

Level 2

Hello Adhiyan,

Yes we are using a mid-sourced server.

Is there a way to prevent the path from being appended with the linux file path?

Thanks,

Lee

Avatar

Level 2

Hi Adhiyan​ do you happen to have an idea about the above?