Skip to main content
Best answer

Find number of records in Salesforce

  • February 25, 2021
  • 5 replies
  • 516 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.

Best answer by robschmidt

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.

 

 

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

Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34064 replies
  • February 25, 2021

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.

 


  • Author
  • Beginner
  • 5 replies
  • February 25, 2021

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


Troy Tessalone
Zapier Orchestrator & Solution Partner
Forum|alt.badge.img+14
  • Zapier Orchestrator & Solution Partner
  • 34064 replies
  • February 25, 2021

Hi @VinnieTron 

I don’t believe there is.


robschmidt
Forum|alt.badge.img+9
  • Zapier Solution Partner
  • 617 replies
  • Answer
  • February 26, 2021

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.

 

 


  • Author
  • Beginner
  • 5 replies
  • February 26, 2021

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