Best answer

Find number of records in Salesforce

  • 25 February 2021
  • 5 replies
  • 436 views

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.

icon

Best answer by robschmidt 26 February 2021, 03:53

View original

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

5 replies

Userlevel 7
Badge +14

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?

Userlevel 7
Badge +14

Hi @VinnieTron 

I don’t believe there is.

Userlevel 7
Badge +9

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