I have a requirement to connect Salesforce to an SFTP. The SFTP will contain a zip file with one csv and multiple pdfs. Each row on the csv will represent each pdf and have columns with specific data. I want to connect to the SFTP, download and unzip the zip file, create a Salesforce Case, and attach the corresponding pdf (as a File preferably although I’ll take an attachment at this point) to the new case. My workflow works, but when I click on the pdf in salesforce, it doesn’t resolve. Claude has indicated this is a limitation of n8n: “We are going in circles because of one core problem: n8n cloud cannot expose binary data as base64 from code nodes”. Is this true?! Can n8n not generate a Salesforce File or Attachment?
I don’t think this is an n8n Cloud limitation in the general sense.
What you’re trying to do is a pretty normal pattern: pull the ZIP from SFTP, unpack it, create the Case, then attach the matching PDF. If the record gets created but the PDF won’t open in Salesforce, I’d look at the binary handling in the workflow before blaming base64 or the Cloud environment.
If you want this as a proper Salesforce File, I’d use Salesforce → Document → Upload instead of the legacy Attachment → Create. Create the Case first, then set Link To Object ID to the new Case ID so the PDF gets published against that Case.
The places I’d check first are the usual trouble spots:
a Set node rebuilding the item and dropping binary
a Code node touching the file and turning it into text/JSON somewhere along the way
the Salesforce node pointing at the wrong Input Binary Field
missing or incorrect filename / MIME type after unzip
So personally, I wouldn’t spend more time trying to manually force base64 out of a Code node unless you absolutely have to. I’d keep the PDF as binary end-to-end and pass that binary directly into the Salesforce upload step.
If you can share the part of the workflow between unzip and Salesforce, especially any Set, Code, or Merge nodes, I think the issue will show up pretty quickly.