query_records_to_file
Execute SOQL queries on Salesforce SObjects and save the results to CSV or JSON files for export or analysis.
Instructions
Query records from a Salesforce SObject and save to a file. This command allows you to execute a SOQL query against a specified Salesforce SObject in a given Org and save the results to a file. You can specify the SELECT clause (fields, functions like COUNT(), aggregations, etc.), an optional WHERE clause, and save the results in various formats. The results can be saved in CSV format by default, or in other formats if specified. IMPORTANT: Always execute the sobject_list tool first to understand which objects are available in the org, and optionally execute sobject_describe for the specific SObject to understand its fields and structure before querying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | Yes |