Actions5
Overview
This node performs various Salesforce Metadata Tool operations, including executing read-only Tooling API SOQL queries. Specifically, the 'Tooling SOQL Query' operation allows users to run SELECT-only queries against the Salesforce Tooling API to retrieve metadata and other information without performing any data manipulation. This is useful for developers and administrators who need to inspect Salesforce metadata, debug, or gather detailed org information programmatically. For example, it can be used to query Apex classes, triggers, or custom objects metadata.
Use Case Examples
- Querying ApexClass metadata to list all Apex classes in the org.
- Retrieving details about custom fields using a Tooling API SOQL query.
- Fetching soft-deleted records by enabling the 'Include Deleted' option.
Properties
| Name | Meaning |
|---|---|
| Authentication | Method of authenticating with Salesforce, either OAuth2 or JWT Bearer. |
| API Version | Salesforce API version to use for the query, or 'auto' to use the latest version. |
| SOQL | The SELECT-only Tooling API SOQL query string to execute. This query cannot perform DML operations. |
| Max Items | Maximum number of records to return from the query, between 1 and 10,000. |
| Include Deleted | Whether to include soft deleted records in the query results by using queryAll. |
| Raw Response | If true, returns the raw Salesforce API response instead of a sanitized version for inspection. |
Output
JSON
json- The query results as an array of JSON objects representing Salesforce Tooling API records or raw response if selected.
Dependencies
- Salesforce API connection using OAuth2 or JWT Bearer authentication.
Troubleshooting
- Ensure the SOQL query is SELECT-only and does not contain any DML statements, as the Tooling API query operation only supports read-only queries.
- Verify that the API version is compatible with the Salesforce org and the Tooling API features used in the query.
- If 'Include Deleted' is enabled, be aware that soft deleted records will be included, which may affect the result set size and query performance.
- If the node throws authentication errors, check that the OAuth2 or JWT credentials are correctly configured and valid.
- If the node returns an error about unsupported operations, verify that the 'operation' parameter is set to 'toolingQuery' for this use case.