0

I'm new to SSJS and Automation Studio. What I'm trying to achieve is a simple automation based on the CSV File Drop -

File Drop -> Script

After a CSV file was dropped into a specified location, then we execute SSJS script that needs to read the CSV file content create a JSON object out of it and send JSON object to API server.

So my question would be - is there any documentation on how to read a CSV file that was dropped via File Drop step in Automation Studio? I cannot find anything helpful except folder functions - https://developer.salesforce.com/docs/atlas.en-us.noversion.mc-programmatic-content.meta/mc-programmatic-content/ssjs_folderRetrieve.htm

1 Answer 1

4

In order to do this, you will need to import that file into a Data Extension first. None of Marketing Cloud's scripting languages (SSJS, AMPscript, SQL, or GTL) can touch the SFTP or anything on it. You will need to use the Import activity to move this into a Data Extension, which is then something that can be access via SSJS, etc.

So automation would need to be: File Drop > Import > Script

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.