Salesforce Metadata Tool icon

Salesforce Metadata Tool

AI Tool: retrieve Salesforce metadata & limits for LLM agents

Overview

This node interacts with Salesforce's Metadata API to list metadata components such as Apex classes, flows, custom objects, and more. It supports filtering by metadata types, folders, and API versions. This is useful for users who want to retrieve detailed metadata information from their Salesforce org for analysis, automation, or integration purposes. For example, a user can list all Apex classes or flows in their org to audit or document their Salesforce environment.

Use Case Examples

  1. List all Apex classes and flows in a Salesforce org to review custom development.
  2. Retrieve metadata components from specific folders to manage deployment packages.
  3. Fetch metadata as of a specific API version to ensure compatibility with older Salesforce versions.

Properties

Name Meaning
Authentication Method of authentication to Salesforce API, either OAuth2 or JWT Bearer.
API Version Specific Salesforce API version to use for the request, or 'auto' to use the latest version.
Metadata Types List of metadata component types to include in the listing, such as ApexClass, Flow, CustomObject, etc.
Folders Folder API names to filter folder-based metadata types.
As Of Version Optional Metadata API version to use for the list call.
Raw Response Whether to return the raw Salesforce API response for inspection.

Output

JSON

  • type - Type of the metadata component.
  • fullName - Full API name of the metadata component.
  • fileName - File name of the metadata component, if applicable.
  • namespacePrefix - Namespace prefix of the component, if any.
  • manageableState - Manageable state of the component (e.g., managed, unmanaged).
  • lastModifiedByName - Name of the user who last modified the component.
  • lastModifiedDate - Date when the component was last modified.
  • createdByName - Name of the user who created the component.
  • createdDate - Date when the component was created.
  • id - Unique identifier of the metadata component.

Dependencies

  • Salesforce API connection via OAuth2 or JWT Bearer authentication

Troubleshooting

  • Ensure that at least one metadata type is selected when using the List Metadata Components operation, otherwise an error will be thrown.
  • If the Salesforce API version is set incorrectly or is unsupported, the node may fail to connect or retrieve data.
  • Authentication failures can occur if OAuth2 or JWT credentials are not properly configured or expired.
  • If the 'Raw Response' option is enabled, the output will be the raw Salesforce response which may require additional parsing for use.
  • Errors from Salesforce API calls are mapped and thrown as node errors; enabling 'Continue On Fail' allows partial results with error details.

Discussion