The salesforce_search formula lets you query Salesforce objects like Leads, Opportunities, or Accounts using filters directly from your spreadsheet. The formula returns all matching records in a tabular format.


Demo

https://www.loom.com/share/34de39a1a86b4f3a88f5600805908d47

Syntax

=salesforce_search(object_type, fields, filter_string, settings)

Arguments

Argument Required? Description
object_type Yes The Salesforce object you want to query. Example: "Opportunity", "Lead", "Account"

Not case sensitive. | | fields | Yes | A comma-separated list of fields to return. You can also reference a cell range like A1:A10. | | filter_string | Optional | A string representing the filter logic to apply (see examples below). If omitted, all records are returned. | | settings | Optional | The ability to limit and sort the output as well as include headers. |


Field List Syntax (fields)

The fields parameter defines which fields to return for each matching record. You can:

Direct Field Names

=salesforce_search("Opportunity", "Name, Lifecycle Stage, Amount")

Referencing Header Row