ACC Tips & Tricks, Adobe Campaign

Export data with no access to sftp

Export data with no access to sftp

There might be situations where you need to extract data in Adobe Campaign, but you don’t have access to SFTP or the application server itself to fetch the file. In such cases, I’ll guide you through what we can do.

Original question has been posted on experience league where various options were mentioned from which I like the most are explained in detail in this blog post.

Send file as email attachment

You can extract a file as usual with the Extract activity and then attach the extracted file to an email for sending it to yourself. For enhanced security, you can also encrypt the file if your server has the 7zip or zip command installed. Alternatively, you can use the GPG command to encrypt files with digital signatures using keys.

Encrypt and archive files with password

All examples shown here are based on a Linux operating system. Additionally, you must have administrative rights, and your instance should be on-premises. In that case, you can use execCommand() in any script activity to encrypt and archive your files.

7z a -pYourPassword -mhe -t7z archive.7z your_directory

Replace YourPassword with the password you want to set, archive.7z with the desired name for your 7z archive, and your_directory with the directory you want to compress and encrypt.

In this example, the options used are:

  • -pYourPassword: Sets the password for the archive. Replace YourPassword with your actual password.
  • -mhe: Encrypts file names in the archive.
  • -t7z: Specifies the archive type as 7z.

Please note that handling passwords in commands may pose security risks, and it’s generally better to enter passwords interactively. As this cannot be prompted during the encription of the file within the Adobe Campaign workflow we stick with this option. Also, keep in mind that 7z uses strong AES-256 encryption for protecting the contents of the archive.

zip -e -r --encrypt AES256 -P your_password encrypted_archive.zip your_directory
  • zip: The command-line utility for creating and managing ZIP archives.
  • -e: Specifies that the archive should be encrypted.
  • -r: Recursively includes all files and directories within the specified directory (your_directory) into the archive.
  • --encrypt AES256: Specifies the encryption method to be used. In this case, AES256 (Advanced Encryption Standard with a 256-bit key) is used. AES256 is a strong encryption algorithm widely considered secure.
  • -P your_password: Sets the password for the encrypted ZIP file. Replace your_password with the actual password you want to use. Note that specifying passwords in commands can have security implications, and it’s often better to enter passwords interactively.
  • encrypted_archive.zip: Specifies the name of the ZIP archive that will be created. You can replace this with your desired name.
  • your_directory: Specifies the directory to be compressed and included in the ZIP archive.

So, in summary, the command is creating a ZIP archive (encrypted_archive.zip) that is password-protected and encrypted using AES256, containing all files and directories within your_directory. The password for the encryption is set using the -P option. After running this command, you’ll be prompted to enter the password.

Manual export

You might already be familiar with displaying the population of your workflow. Simply leave your transition disconnected, then right-click on it and choose “Display the target.”

Adobe Campaign Classic - Display target in workflow

You might have done this thousands of times, but there’s a good chance you haven’t realized there’s an export feature lurking under the right-click menu.

Adobe Campaign - Manuelly export data from worklfow

Here we follow the same steps as with the extract activity in workflow.

Automated export

Yes, you heard it right – even without having access to SFTP or the server, you can automatically export the file. Here’s how: use the extract activity to pull out the file, and then simply publish the extracted file as a public resource. You can bypass loops for a single-file publish, and the filename along with its path will be stored under the variable vars.filename, created by the extract activity.

When creating public resources, keep in mind that such files are open to the public, even if the URL is MD5 encoded and challenging to guess. It is a good practice to remove such files after you are done working with them. However, a problem arises – deleting a file from the public resource folder doesn’t remove the file from the actual location but rather from your console. If you host your frontend servers on-premises, ensure that if the file is not removed, you set up a process to delete files. For those using hybrid hosting and midsourcing, it is advisable to check with Adobe Support to confirm if the files have been removed.

Oh hi there 👋
I have a FREE e-book for you.

Sign up now to get an in-depth analysis of Adobe and Salesforce Marketing Clouds!

We don’t spam! Read our privacy policy for more info.

#adobe campaign classic #programming #workflow
Marcel Szimonisz
Marcel Szimonisz
MarTech consultant As a marketing automation consultant, I specialize in problem-solving, process automation, and driving innovation for clients' marketing platforms.

I hold certifications in Adobe Campaign v6 (3x certified) and Salesforce Marketing Cloud (5x certified), as well as 1x Salesforce Associate certified.

Moreover, I serve as a community advisor for Adobe Campaign, providing expert insights and guidance.

Beyond my professional pursuits, I explore various programming languages, CMSs, and frameworks, enhancing my technical expertise and staying at the forefront of industry advancements.
Take a look at our subscription offering in case you are looking for a Marketing Automation Consultant.

Similar posts that you may find useful

Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

Add content variation to the proof subject

1 minute read

When dealing with multiple variants defined within one delivery template featuring dynamic content blocks, stakeholders most likely want to see proofs for each variant. To enhance readability in their mailbox, I tend to add the email variant to the subject line. A simple solution, similar to what we shown you when using salesforce marketing cloud […]

Continue reading
Adobe Campaign Classic API
Adobe Campaign

Adobe Campaign Classic API

3 minutes read

My grandad used to say, ‘When there is a platform, there is an API.’ The same goes for Adobe Campaign Classic, which was equipped with its own programmable interface. With this, we can access various core functionalities of the platform, adding new integrations and functionalities In a world where mentioning API typically brings REST to […]

Continue reading
Adobe Campaign Classic tips
ACC Tips & Tricks, Adobe Campaign, Marketing Automation

How to copy query conditions to another split

1 minute read

Perhaps you’ve encountered an unusual occurrence while attempting to copy complex query conditions to your clipboard. In some instances, only a portion of the content was copied, while in others, nothing was copied at all. I’ve personally faced similar situations over the years but never delved deeper into the matter. However, one day, I reached […]

Continue reading
Salesforce Marketing Cloud vs Adobe Campaign
Adobe Campaign, Marketing Automation, Salesforce Marketing Cloud

Salesforce Marketing Cloud vs Adobe Campaign

1 minute read

Both Salesforce Marketing Cloud and Adobe Campaign Classic are powerful marketing automation platforms that offer a wide range of features to help businesses manage their marketing campaigns. The choice between these two tools ultimately depends on your specific business needs and preferences. Here are some factors to consider when deciding between Salesforce Marketing Cloud and […]

Continue reading
The image is a wide-format representation of a modern coding environment, specifically focused on the latest ES6 JavaScript features. It prominently displays a computer screen with a code editor, where JavaScript code is shown with highlights on ES6 features such as arrow functions, classes, and template literals. The code is adorned with vibrant syntax highlighting, making elements like code brackets and semi-colons stand out, emphasizing the JavaScript language. The background is infused with digital and technological elements like binary code patterns and abstract tech-inspired graphics, symbolizing innovation in coding. The overall color scheme is dynamic and lively, reflecting the advanced and cutting-edge nature of ES6 in the realm of web development.
Adobe Campaign, Marketing Automation

Enable newest ES6 JavaScript features

2 minutes read

You may have noticed, when working with the tool for some time, that the JavaScript used around the Adobe Campaign Classic platform is not the newest version. Adobe Campaign Classic relies on ES5 JavaScript, released in 2012. This may cause some first world problems for those accustomed to modern features like Array.indexOf, Array.find, classes, object […]

Continue reading