Salesforce create Attachment

Describe the problem/error/question

Hi,
I need to create an attachment to Salesforce, and I’m trying to use the native “Create Attachment” node but it is not clear to me which kind of data I have to put in the field: Input Binary Field.
Thank you in advance

What is the error message (if any)?

Please share your workflow

(Select the nodes on your canvas and use the keyboard shortcuts CMD+C/CTRL+C and CMD+V/CTRL+V to copy and paste the workflow.)

Share the output returned by the last node

Information on your n8n setup

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:

It looks like your topic is missing some important information. Could you provide the following if applicable.

  • n8n version:
  • Database (default: SQLite):
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app):
  • Operating system:
  • n8n version: 1.24.1
  • Database (default: SQLite): SQLite
  • n8n EXECUTIONS_PROCESS setting (default: own, main):
  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
  • Operating system: Ububtu 2204

Hi @Zambot1971

The Input Binary Field is used to specify the name of the binary data you want to attach. It is not the actual file or data you want to attach, but the name of the field that contains this data in the previous node.

For example, if you have an HTTP Request node to download a file, the binary data from that file would be stored under a specific name (given that the response format is set to File).
This name is what you would enter in the Input Binary Field.

If you’re not sure what the name of the binary data is, check the output of the HTTP node. The binary data is usually stored under the name “data”, but it could be different depending on your workflow.

If you’re still having trouble, please feel free to share your workflow so we could have a look. :slight_smile:

Thank you Ria,
I will try this and I hope not to have to bother you any further.
regards
Antonio

Hi, I’ve checked…it is one of the way that I have allreadt tryed.

This is my input:
[
{
“method”: “createAttachment”,
“FileName”: “test.txt”,
“case_id”: “500VD000002zwFhYAI”,
“attach”: “aHR0cHM6Ly9mb3J1bXMuaXZhbnRpLmNvbS9zL2FydGljbGUvSG93LXRvLWNyZWF0ZS1hLXdlYi1zZXJ2aWNlLWludGVncmF0aW9uP2xhbmd1YWdlPWVuX1VT”
}
]

And this is the screenshot of the response I got…

The thing that I’m noticing is that the “attach” field is not present in the input of the node (cause before the salesforce node I have a switch).
[
{
“response”: {
“method”: “createAttachment”
}
}
]

I’m going to try to put a “code” node that collects the “attach” field from the original input just before the salesforce node…

thank you!

P.S.
update…


It didn’t work… :frowning:

Could it be the format of the data contained in the attach property?
Althoug it seems that it does not like or “sees” the property itself…