I am connecting to salesforce and trying to pull all of the data from a custom object into a file so I can dump it to s3. In the salesforce node I can select the custom object and see the list of all field names in the options section, but we literally have hundreds of fields on this object and field names are often added or removed so selecting them all manually is a no go.
I have not been able to find a way to use an expression to just specify all field names. I can manually type the field names, but I need something dynamic here. N8n clearly can see all the field names, how can I just specify all of them with an expression? There does not seem to be anything to choose from in input, and my google fu is failing me on the expression reference.
What is the error message (if any)?
There’s not really any errors unless I try to get tricky with statements like $json and then everything I’ve tried just says not supported.
Sadly do honestly not know much about Salesforce and do also currently not have an account which has custom objects which I can play around with. Also is the person who created the node currently sadly sick, so also no way to tap into his expertise. So can just be of limited help.
Anyway, think there are two possible solutions:
You check out the API docs and see if it is possible to set a wild-card like * instead of the actual comma separated names/IDs. Then you set it via an expression.
You create a separate HTTP Request node and make a request to /sobjects/{customObjectId}/describe. That will then return all the fields. That data you can then use to set the parameter via an expression to an array of field IDs.
Thanks jan, appreciate the idea. I’ll have to figure out that http request syntax for salesforce and give it a shot. That does give me some ideas on how to use parameters for sf stuff.