Skip to content

feat(integrations): add support for salesforce client credentials#5594

Open
aadhitemp wants to merge 1 commit intoNangoHQ:masterfrom
aadhitemp:feat/add-support-salesforce-client-credentials
Open

feat(integrations): add support for salesforce client credentials#5594
aadhitemp wants to merge 1 commit intoNangoHQ:masterfrom
aadhitemp:feat/add-support-salesforce-client-credentials

Conversation

@aadhitemp
Copy link

@aadhitemp aadhitemp commented Mar 10, 2026

Description

This PR adds support for Salesforce (Client Credentials) as a new integration. This allows users to authenticate with Salesforce using the OAuth2 Client Credentials flow.

Added the salesforce-cc provider with full support for the Client Credentials flow, including documentation and a dedicated "How to connect" guide.

Changes:

  • Provider Config: Added salesforce-cc to providers.yaml with OAUTH2_CC auth mode and hostname interpolation.
  • Client Support: Updated ProviderClient to handle token introspection for the new provider.
  • Documentation:
    • Added docs/api-integrations/salesforce-cc.mdx (Integration overview).
    • Added docs/api-integrations/salesforce-cc/connect.mdx (Step-by-step setup guide for Salesforce Connected Apps).
    • Registered the new integration in docs/docs.json.
  • Assets: Added the Salesforce logo for the dashboard.

Issue ticket number and link

None

Testing instructions

(Skip as this is adding/editing providers and documentation)


It also includes connection setup improvements and generated documentation snippets alongside the new integration content.


This summary was automatically generated by @propel-code-bot

propel-code-bot[bot]

This comment was marked as outdated.

propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from ef5e1f6 to 379f592 Compare March 10, 2026 09:31
propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 379f592 to c27aebe Compare March 10, 2026 10:03
propel-code-bot[bot]

This comment was marked as outdated.

@hassan254-prog hassan254-prog self-requested a review March 10, 2026 16:07
@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from c27aebe to 58f61ef Compare March 11, 2026 04:20
@hassan254-prog hassan254-prog requested a review from TBonnin March 11, 2026 09:05
@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 58f61ef to 6099bb8 Compare March 13, 2026 04:43
@aadhitemp aadhitemp requested a review from TBonnin March 13, 2026 05:07
@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 6099bb8 to 9376d0c Compare March 16, 2026 10:17
propel-code-bot[bot]

This comment was marked as outdated.

propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 44c1ac0 to e624401 Compare March 16, 2026 10:45
propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from e624401 to 7e95f08 Compare March 17, 2026 05:12
@aadhitemp aadhitemp requested a review from TBonnin March 17, 2026 05:24
@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 7e95f08 to 94ba9d0 Compare March 19, 2026 05:15
Copy link
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical reliability issue: new provider lacks required credentials, breaking authentication.

Status: Action Required | Risk: High

Issues Identified & Suggestions
  • Define client credentials in provider config to prevent auth failures: packages/providers/providers.yaml
Review Details

📁 8 files reviewed | 💬 1 comments

Instruction Files
└── .claude/
    ├── agents/
    │   └── nango-docs-migrator.md
    └── skills/
        ├── agent-builder-skill/
        │   ├── EXAMPLES.md
        │   └── SKILL.md
        ├── creating-integration-docs/
        │   └── SKILL.md
        └── creating-skills-skill/
            └── SKILL.md

👍 / 👎 individual comments to help improve reviews for you

optional: true
doc_section: '#step-1-finding-your-hostname'

salesforce-cc:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Critical

[Reliability] The new salesforce-cc provider never captures the Client ID/Client Secret that the docs (and the auth flow) require. The Connect UI will only ask for hostname, because there is no credentials section, so connection credentials will not contain client_id/client_secret. When ProviderClient.resolveByType() runs, it reads credentials.client_id / credentials.client_secret and immediately throws client_credentials_missing, so every connection fails before it can obtain a token. Add the credential definitions so the Connect flow stores these fields per connection.

Suggested change
salesforce-cc:
salesforce-cc:
display_name: Salesforce (Client Credentials)
categories:
- crm
auth_mode: OAUTH2_CC
token_url: https://${connectionConfig.hostname}/services/oauth2/token
token_params:
grant_type: client_credentials
token_response_metadata:
- instance_url
proxy:
base_url: ${connectionConfig.instance_url}
docs: https://nango.dev/docs/api-integrations/salesforce-cc
docs_connect: https://nango.dev/docs/api-integrations/salesforce-cc/connect
token_expires_in_ms: 0
credentials:
client_id:
type: string
title: Client ID
description: The Client ID from the Salesforce Connected App
doc_section: '#step-1-create-a-connected-app'
client_secret:
type: string
title: Client Secret
description: The Client Secret from the Salesforce Connected App
secret: true
doc_section: '#step-1-create-a-connected-app'
connection_config:
instance_url:
type: string
title: ''
description: ''
automated: true
hostname:
type: string
title: Hostname
description: The hostname to your Salesforce instance
format: hostname
example: acme.my.salesforce.com
prefix: https://
optional: false
Context for Agents
[**Bug**] The new `salesforce-cc` provider never captures the Client ID/Client Secret that the docs (and the auth flow) require. The Connect UI will only ask for `hostname`, because there is no `credentials` section, so connection credentials will not contain `client_id`/`client_secret`. When `ProviderClient.resolveByType()` runs, it reads `credentials.client_id` / `credentials.client_secret` and immediately throws `client_credentials_missing`, so every connection fails before it can obtain a token. Add the credential definitions so the Connect flow stores these fields per connection.

```suggestion
salesforce-cc:
    display_name: Salesforce (Client Credentials)
    categories:
        - crm
    auth_mode: OAUTH2_CC
    token_url: https://${connectionConfig.hostname}/services/oauth2/token
    token_params:
        grant_type: client_credentials
    token_response_metadata:
        - instance_url
    proxy:
        base_url: ${connectionConfig.instance_url}
    docs: https://nango.dev/docs/api-integrations/salesforce-cc
    docs_connect: https://nango.dev/docs/api-integrations/salesforce-cc/connect
    token_expires_in_ms: 0
    credentials:
        client_id:
            type: string
            title: Client ID
            description: The Client ID from the Salesforce Connected App
            doc_section: '#step-1-create-a-connected-app'
        client_secret:
            type: string
            title: Client Secret
            description: The Client Secret from the Salesforce Connected App
            secret: true
            doc_section: '#step-1-create-a-connected-app'
    connection_config:
        instance_url:
            type: string
            title: ''
            description: ''
            automated: true
        hostname:
            type: string
            title: Hostname
            description: The hostname to your Salesforce instance
            format: hostname
            example: acme.my.salesforce.com
            prefix: https://
            optional: false
```


File: packages/providers/providers.yaml
Line: 14057

Copy link
Author

@aadhitemp aadhitemp Mar 19, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've validated that the current configuration works. It does ask for client_id and client_secret, and I was also able to to get the access token and refresh it too. Do I need to make this change?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. @hassan254-prog can you confirm?

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 94ba9d0 to 03017a3 Compare March 23, 2026 04:50
propel-code-bot[bot]

This comment was marked as outdated.

Copy link
Contributor

@hassan254-prog hassan254-prog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution, few comments inline otherwise looks good.

}

const url = `${connectionConfig['instance_url']}/services/oauth2/introspect`;
const url = `${instanceUrl}/services/oauth2/introspect`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For this, you can add functionality to extract the token metadata here so that we can use the same instance_url from the raw token response to introspect tokens.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've made the requested changes, can you take a second look.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be more of:

 const tokenMetadata = getConnectionMetadata(credentials.raw, provider, 'token_response_metadata');

 connectionConfig = {
            ...connectionConfig,
            ...tokenMetadata
  };

which should work since you already have

token_response_metadata:
        - instance_url

in the providers config.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aadhitemp, is it okay for me to take this over and take it to the finish line?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, yeah that works for me, go ahead and take it to the finish line 👍

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 03017a3 to 410cd09 Compare March 25, 2026 09:54
Copy link
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes suggested to align new integration docs with required migration content.

Status: Changes Suggested | Risk: Medium

Issues Identified & Suggestions
  • Add required PreBuiltUseCases snippet in Pre-built syncs/actions section: docs/api-integrations/salesforce-cc.mdx
  • Include standard Integration Guides intro line for consistency: docs/api-integrations/salesforce-cc.mdx
Review Details

📁 9 files reviewed | 💬 2 comments

Instruction Files
└── .claude/
    ├── agents/
    │   └── nango-docs-migrator.md
    └── skills

👍 / 👎 individual comments to help improve reviews for you

Comment on lines +77 to +78


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Important

[Requirements] The “Pre-built syncs & actions” section must include the generated PreBuiltUseCases snippet. Without it, the page won’t display the empty-state messaging and future syncs/actions.

Suggested change
import PreBuiltUseCases from "/snippets/generated/salesforce-cc/PreBuiltUseCases.mdx"
<PreBuiltUseCases />
Context for Agents
[FileRule: .claude/agents/nango-docs-migrator.md] The “Pre-built syncs & actions” section must include the generated PreBuiltUseCases snippet. Without it, the page won’t display the empty-state messaging and future syncs/actions.

```suggestion
import PreBuiltUseCases from "/snippets/generated/salesforce-cc/PreBuiltUseCases.mdx"

<PreBuiltUseCases />

```

File: docs/api-integrations/salesforce-cc.mdx
Line: 78

💡 Applied from Instructions File: .claude/agents/nango-docs-migrator.md

</Steps>

## 📚 Salesforce (Client Credentials) Integration Guides

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommended

[Company Standards] The Integration Guides section is missing the standard intro line (“Nango maintained guides for common use cases.”). This line is required by the migration format for consistency across integrations.

Suggested change
Nango maintained guides for common use cases.
Context for Agents
[FileRule: .claude/agents/nango-docs-migrator.md] The Integration Guides section is missing the standard intro line (“Nango maintained guides for common use cases.”). This line is required by the migration format for consistency across integrations.

```suggestion
Nango maintained guides for common use cases.

```

File: docs/api-integrations/salesforce-cc.mdx
Line: 68

💡 Applied from Instructions File: .claude/agents/nango-docs-migrator.md

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 410cd09 to 1b81ef9 Compare March 25, 2026 10:00
propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 1b81ef9 to 1353b85 Compare March 25, 2026 10:10
propel-code-bot[bot]

This comment was marked as outdated.

@aadhitemp aadhitemp force-pushed the feat/add-support-salesforce-client-credentials branch from 1353b85 to d77d280 Compare March 25, 2026 10:18
Copy link
Contributor

@propel-code-bot propel-code-bot bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review found no issues and the changes appear sound and complete.

Status: No Issues Found | Risk: Low

Review Details

📁 9 files reviewed | 💬 0 comments

Instruction Files
└── .claude/
    ├── agents/
    │   └── nango-docs-migrator.md
    └── skills

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants