Salesforce Sandbox OAuth2 connection failed 22/10/2025 (n8n cloud)

Hi ! I just copy/past a previous issue because i face the exact same

I am trying to connect to salesforce sandbox via OAuth Connection

I’m trying to connect my Salesforce Sandbox to n8n Cloud using the built-in Salesforce OAuth2 credential.

  • n8n version: 1.117.0 (Cloud)

  • Auth type: OAuth2

What I tried:

  1. Created a Connected App in Salesforce with OAuth enabled.

  2. In n8n, set up a new Salesforce credential → selected Environment Type = Sandbox.

  3. When I click Connect my account, it always redirects me to login.salesforce.com (production login), not test.salesforce.com or my sandbox domain.

Since the redirect always goes to login.salesforce.com, my sandbox user credentials are rejected with incorrect email/password, they only work on the sandbox domain.

What am I missing ? Need urgent help with this.

I found that selecting “Use Custom Domain” and entering the sandbox name was a successful workaround when prompted with the login.salesforce.com authentication screen