Possible to include all field names on custom salesforce object with expression?

Describe the issue/error/question

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.

Please share the workflow

Information on your n8n setup

  • n8n version: 0.193.5
  • Database you’re using (default: SQLite):
  • Running n8n with the execution process own(default):
  • Running n8n via Docker

Welcome to the community @cgeno!

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:

  1. 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.
  2. 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.

I hope that is helpful!

1 Like

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.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.