Count the Leads and Send an Alert

reetusharma123
Level 1

Count the Leads and Send an Alert

If any one can help with below requiremnet

 

Data Limit of 2000 leads per day – each day and if threshold meet then alert will send on particular email.

Additional email if over 10K – each day

3 REPLIES 3
SanfordWhiteman
Level 10 - Community Moderator

Re: Count the Leads and Send an Alert

Only with the use of a separate app. There’s no internal trigger/filter for the overall number of records.

reetusharma123
Level 1

Re: Count the Leads and Send an Alert

Thanks @SanfordWhiteman 

 

Could you please provide the app name or we can achieve this with API 

 

Thanks

SanfordWhiteman
Level 10 - Community Moderator

Re: Count the Leads and Send an Alert

You can use the Get Lead Changes API endpoint to see people created since a given timestamp (i.e. check the leads for that day). While that endpoint is quite simple, obviously you’d need some dev experience plus a reliable way to run the code on a schedule.

 

If you want to avoid using the API entirely, you can log new leads to a Google Sheet using a Marketo webhook. See my old blog post to learn how that’s done.

 

Then using a 2nd Marketo webhook, compare the count of rows in the Google Sheet where <created_date_column> = <todays_date>. As a hint, the VQL to accomplish that is:

 

select true where E = date '{{system.datetime}}' LIMIT 1 OFFSET 2000

 

 

If that returns any row with the value "true", that means there are more than 2000 rows matching the query.