Skip to main content

I want to create a Zap which finds the total numer of Salesforce records which hits a certain criteria each week, then output this total to Google Sheets.

I am using the Find Record(s) in Salesforce action and using javascript to count the number of records, however, the zap only ever finds 1 record. I am confident the script is OK and think the issues lines in the Salesforce step.

Am i missing something obvious?

Many thanks in advance.

Hi @VinnieTron 

How search actions work

Salesforce search actions return the most recently created record that meets the search criteria, even if there are multiple records that match.

 


Thanks for this Troy. So is there a way to get a total number of records using the connector?


Hi @VinnieTron 

I don’t believe there is.


Hi @VinnieTron,

You can utilize this SalesForce API endpoint to get the numbers of record an Object have: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/resources_record_count.htm

For this, you’ll have to select Zapier Webhook to make API calls, there might be some learning curve if you have not previously worked with API, but this will get the job done.

 

 


More new skills to learn :grinning: . Thanks for your help @robschmidt