Bulk API Salesforce

Problem

I’m trying to access the bulk API via an HTTP request; however, the response that I get is not what I would expect from the creation of a bulk job. I am using a predefined credential from the Salesforce OAuth2 API.

Here is my example HTTP URL:

(https://MyDomain.sandbox.lightning.force.com/services/data/v64.0/jobs/ingest/)

Here is my JSON body for my HTTP POST Request:

{
    "object" : "Product2",
    "externalIdFieldName" : "Macola_Product__c",
    "contentType" : "CSV",
    "operation" : "upsert",
    "lineEnding" : "LF"
}

I’m unsure if n8n has access to the bulk API. I believe the issue that I’m seeing could be due to limitations on the scopes available to Salesforce credentials (i.e. refresh_token, full).

I have reviewed other forum pages such as this one: Bulk API 2.0 Upsert and have enabled the client credentials flow along with an execution user but have been unable to get the correct response.

Any information would be helpful.

Also this is my first post so, I apologize if I miss something or don’t correctly include something.

Workflow

Output

Current Response

[
  {
    "done": true,
    "nextRecordsUrl": null,
    "records": []
  }
]

Expected Response

{
  "id" : "7476gEXAMPLE4X2ZWO",
  "operation" : "upsert",
  "object" : "Product2",
  "createdById" : "0055fEXAMPLEtG4AAM",
  "createdDate" : "2025-07-03T11:00:00.000+0000",
  "systemModstamp" : "2025-07-03T11:00:00.000+0000",
  "state" : "Open",
  "externalIdFieldName" : "Macola_Product__c",
  "concurrencyMode" : "Parallel",
  "contentType" : "CSV",
  "apiVersion" : 64.0,
  "contentUrl" : "services/data/64.0/jobs/ingest/7476gEXAMPLE4X2ZWO/batches",
  "lineEnding" : "LF",
  "columnDelimiter" : "COMMA"
}

Information on your n8n setup

  • n8n version: 1.99.1
  • Database (default: SQLite): Microsoft SQL Server
  • n8n EXECUTIONS_PROCESS setting (default: own, main): ???
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: Windows 11

I figured out what the problem was.

I was using the following URL:

https://domain.sandbox.lightning.force.com/services/data/v64.0/jobs/ingest/

When I needed to be using this URL:

https://domain.sandbox.my.salesforce.com/services/data/v64.0/jobs/ingest/

This is the response that I get now after using the correct URL:

[
  {
    "id": "750QL00000K8DpVYAV",
    "operation": "upsert",
    "object": "Product2",
    "createdById": "005Hq00000KmTtjIAF",
    "createdDate": "2025-07-08T12:59:19.000+0000",
    "systemModstamp": "2025-07-08T12:59:19.000+0000",
    "state": "Open",
    "externalIdFieldName": "Macola_Product__c",
    "concurrencyMode": "Parallel",
    "contentType": "CSV",
    "apiVersion": 64,
    "contentUrl": "services/data/v64.0/jobs/ingest/750QL00000K8DpVYAV/batches",
    "lineEnding": "LF",
    "columnDelimiter": "COMMA"
  }
]
1 Like