Salesforce connection issue with n8n (OAuth Error)

Hi everyone,

I’m having trouble connecting Salesforce to n8n Cloud. I can’t link my account and always end up with an OAuth error.

Describe the problem/error/question

When I try to connect Salesforce via n8n, I get the following message:

OAUTH_APPROVAL_ERROR_GENERIC : An unexpected error has occurred during authentication. Please try again.

Here’s what I’ve already tried:

  • Logging in via our SSO → failed

  • Logging in with our domain name → failed

  • Tried both Production and Sandbox → same issue

  • Signed out/in from Salesforce before connecting via n8n → no change

  • Private browsing and without VPN → no change

  • Removed and recreated the Salesforce credentials in n8n → still fails

My workflow (simplified)

  • Schedule TriggerSalesforce (Get Many Accounts)
    The Salesforce node fails right at the connection step.

What is the error message (if any)?

OAuth Error Salesforce: “We can’t authorize you because of an OAuth error.”

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

{
“nodes”: [
{
“parameters”: {
“rule”: {
“interval”: [
{
“field”: “weeks”,
“triggerAtDay”: [
1
],
“triggerAtHour”: 8
}
]
}
},
“type”: “n8n-nodes-base.scheduleTrigger”,
“typeVersion”: 1.2,
“position”: [
0,
0
],
“id”: “cc3b362d-1093-4f32-b6b0-bfb9d95924bd”,
“name”: “Schedule Trigger”
},
{
“parameters”: {
“resource”: “attachment”,
“operation”: “getAll”,
“options”: {}
},
“type”: “n8n-nodes-base.salesforce”,
“typeVersion”: 1,
“position”: [
208,
0
],
“id”: “abb5efbe-3f6c-442b-9eaa-2c3d4997e377”,
“name”: “Get many attachments”
}
],
“connections”: {
“Schedule Trigger”: {
“main”: [
[
{
“node”: “Get many attachments”,
“type”: “main”,
“index”: 0
}
]
]
}
},
“pinData”: {},
“meta”: {
“templateCredsSetupCompleted”: true,
“instanceId”: “0b09999ee7b7c5f7278a008cad1e20e99323fc06f1f71b05f830e23fcef57303”
}
}

Information on your n8n setup

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

Thanks a lot for your detailed reply @Bringasher :folded_hands:

Just to clarify on my side:

  • I don’t have a Connected App configured since I’m using n8n Cloud.

  • In Salesforce, both Login Hours and Login IP Ranges are completely empty, so there are no restrictions applied.

Given that, do you think the issue could still be related to scopes or callback URL mismatch?

Thanks again for the support!

Thanks for the follow-up @Bringasher :folded_hands:

Just to clarify: I’m on n8n Cloud, using the built-in Salesforce OAuth2 credential.
On Cloud, I don’t have any fields for Client ID / Client Secret – those are handled by the preconfigured Connected App from n8n, so I can’t check or edit them.

When I go through the OAuth process from this credential, n8n Cloud doesn’t show me any Redirect URI either (the “Details” tab is empty). The connection just fails with the same OAUTH_APPROVAL_ERROR_GENERIC error.

Hi everyone,

After a lot of trial and error we finally found the root cause of the OAUTH_APPROVAL_ERROR_GENERIC issue when trying to connect Salesforce with n8n Cloud.

:backhand_index_pointing_right: The fix is on the Salesforce side:

  1. Go to Setup → External Client Apps OAuth Usage

  2. Find and select the n8n app

  3. Click Install

  4. Once installed, you can manage the permissions/policies of the Connected App (e.g. permitted users, IP relaxation, refresh token policy, etc.)

After doing this, the connection from n8n Cloud worked right away. :rocket:

Hopefully this helps anyone running into the same problem!

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