Package Information
Released: 10/8/2025
Downloads: 5 weeklyย /ย 26 monthly
Latest Version: 0.1.13
Documentation
n8n-nodes-salesforce-metadata
Community nodes for n8n that connect to Salesforce and expose metadata-focused operations for architects, admins, and developers.
Features
- ๐ OAuth2 and JWT Bearer credential types with inline validation
- ๐ Describe the global object catalog or a specific SObject via REST
- ๐งฉ List metadata components using the Salesforce Metadata API (powered by jsforce)
- ๐ ๏ธ Run guarded Tooling API SOQL queries (SELECT-only, no DML)
- ๐ Inspect org limits and available REST API versions in a single call
- ๐งผ Normalized outputs with ISO date formats and
_sourcelineage tags for downstream nodes - ๐ค Optional
Salesforce Metadata Toolnode variant designed for n8n AI Agent tool integration
Getting Started
# Install dependencies
npm install
# Build TypeScript โ dist/
npm run build
# Watch for changes during development
npm run dev
# Run unit tests
npm test
Linking into n8n
- From your n8n instance, enable community nodes.
- Run
npm run devin this repo to startn8n-node-dev. - Inside n8n, add the Salesforce Metadata node. Choose OAuth2 or JWT credentials and run the workflow.
Node Operations
| Operation | Description | Output _source |
|---|---|---|
| Describe Global | Lists all SObjects with optional standard/custom/searchable filters | rest-describe |
| Describe SObject | Returns field metadata and record type info for a single SObject | rest-describe |
| List Metadata | Lists components (Apex, Flows, Permission Sets, etc.) via the Metadata API | metadata |
| Tooling Query | Executes a paginated, SELECT-only Tooling API query | tooling |
| Org Limits & API Versions | Combines /limits and /services/data calls |
rest-describe |
AI Agent Tool Variant
The repository also includes a Salesforce Metadata Tool node (salesforceMetadataTool) that exposes the same operations but with descriptions optimized for Large Language Model (LLM) tool selection inside the AI Agent node. Use it when you want an autonomous agent to dynamically choose which Salesforce metadata information to fetch.
Example usage inside an AI Agent setup:
- Add the AI Agent node.
- Under Tools, select the
Salesforce Metadata Tool. - Provide credentials (OAuth2 or JWT) just like the primary node.
- Give the agent instructions such as: "List Apex classes and then describe the Account object fields."
The agent will pick listMetadata followed by describeSObject operations automatically based on its reasoning chain.
Example Workflow JSON
{
"name": "Salesforce Metadata Discovery",
"nodes": [
{
"parameters": {
"operation": "listMetadata",
"types": ["ApexClass", "LightningComponentBundle"],
"apiVersion": "auto"
},
"name": "Salesforce Metadata",
"type": "n8n-nodes-salesforce-metadata.salesforceMetadata",
"typeVersion": 1,
"position": [480, 320],
"credentials": {
"salesforceOAuth2Api": {
"id": "<credential-id>",
"name": "Salesforce OAuth2"
}
}
}
],
"connections": {}
}
Testing
- Guard tests confirm Tooling API SOQL is read-only (
assertSafeSoql). - Serializer tests ensure Metadata API responses become clean JSON with ISO dates.
- Credential tests verify required fields and helper messaging for OAuth2 & JWT flows.
npm test
Publishing Checklist
-
dist/contains compiled.jsfiles with type declarations -
package.jsonincludesn8n.nodesandn8n.credentialsmetadata - ESLint & Prettier keep the codebase consistent (
npm run lint,npm run format) - Vitest provides fast feedback for critical helpers
License
MIT ยฉ 2025